mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 00:55:20 +01:00
Code cleanup: Sorting (#83017)
## About The Pull Request 1. Removes code duplication 2. Fully documents `sortTim()` 3. Makes a define with default sortTim behavior, straight and to the point for 95% of cases 4. Migrates other sorts into the same file 5. Removes some redundancy where they're reassigning a variable using an in place sorter For the record, we only use timSort ## Why It's Good For The Game More documentation, easier to read, uses `length` over `len`, etc Should be no gameplay effect at all
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
/datum/computer_file/program/emojipedia/New()
|
||||
. = ..()
|
||||
// Sort the emoji list so it's easier to find things and we don't have to keep sorting on ui_data since the number of emojis can not change in-game.
|
||||
emoji_list = sortTim(emoji_list, /proc/cmp_text_asc)
|
||||
sortTim(emoji_list, /proc/cmp_text_asc)
|
||||
|
||||
/datum/computer_file/program/emojipedia/ui_static_data(mob_user)
|
||||
var/list/data = list()
|
||||
|
||||
Reference in New Issue
Block a user