Tabletop Simulator

Tabletop Simulator

评价数不足
Deck Alphabetizer [Broken]
   
奖励
收藏
已收藏
取消收藏
Game Category: Card Games
Number of Players: 1, 2, 3, 4
Assets: Scripting
文件大小
发表于
更新日期
8.336 KB
2017 年 9 月 6 日 上午 12:27
2017 年 9 月 6 日 下午 3:48
2 项改动说明 ( 查看 )

订阅以下载
Deck Alphabetizer [Broken]

描述
**20/02/2019**
I have been notified that this Deck Alphabetizer is no longer functional. It is here for example purposes only now.

**Outdated**
This simple table will take a deck of cards and put them in alphabetical order.

Each card must be given a name in order for this to work.

This worked for my purposes; I hope it will be useful to some of you!
8 条留言
Indimeco  [作者] 2019 年 2 月 19 日 下午 11:54 
@3tamatulg Thanks, I have done so.
3tamatulg 2019 年 2 月 19 日 下午 12:58 
I'd say just stick [BROKEN] at the end of the title - seeing the way someone's done something can be really useful. Maybe someone will come along and fix it, might just be a couple of lines.
Indimeco  [作者] 2019 年 2 月 19 日 上午 1:53 
@3tamatulg There's a good chance it is as I made it a really long time ago and TTS has undergone lots of scripting changes. If you can confirm that it doesn't work for you I'll hide it in the workshop so nobody gets misled.
3tamatulg 2019 年 2 月 18 日 上午 7:02 
Is this currently broken?
H3xx 2017 年 9 月 16 日 上午 10:47 
This would be great with a deck of NPC cards... made using my scripted note cards </shameless.self.plug>
darleth 2017 年 9 月 6 日 下午 11:35 
Thanks a lot...
Indimeco  [作者] 2017 年 9 月 6 日 下午 3:50 
@dzikakulka Ah yeah. I didn't think table.sort() would work with key/value pairs without messing up the table but I figured it out. Thanks.
dzikakulka 2017 年 9 月 6 日 上午 7:24 
Hey, nice job, just wanted to note that you don't need to search for the "highest" (earliest in the alphabet) name in the table each time, Lua compares strings alphabetically by default. You can just slap a table.sort() with default comparison and go ahead :)