mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 03:55:11 +01:00
Rewrites to fix compiler errors on 516.1670+ (#93801)
## About The Pull Request Fixes all instances of numbers being used as assoc list keys in things that aren't alists, either by turning them into alists or changing the keys to something else. Also adds new macros to support creating global alists, as a few global lists became alists. Most of these are pretty simple and self-explanatory but - The GLOB.huds one necessitated rewriting because code depended on it being a non-assoc list, which it technically was because the defines it used as keys were numbers so BYOND turned it into a regular list, most of this was for loops through all the subtypes of `/datum/atom_hud/data/diagnostic` of which there's only one, so I just changed it to get that type directly by key - NT Frontier used number indexes which it looped through for some reason and also passed to TGUI, changed these to strings and adjusted the TGUI to match, I tested this and it works fine ## Why It's Good For The Game Makes the code compile, I couldn't test everything but I tried to check all usages of affected vars to make sure they wouldn't break from being switched to alists, a TM might be in order just to be sure nothing's fucked ## Changelog 🆑 refactor: rewrote all cases of numbers being used as keys in non-alist associative lists /🆑
This commit is contained in:
@@ -7,7 +7,7 @@ PROCESSING_SUBSYSTEM_DEF(station)
|
||||
///A list of currently active station traits
|
||||
var/list/station_traits = list()
|
||||
///Assoc list of trait type || assoc list of traits with weighted value. Used for picking traits from a specific category.
|
||||
var/list/selectable_traits_by_types = list(STATION_TRAIT_POSITIVE = list(), STATION_TRAIT_NEUTRAL = list(), STATION_TRAIT_NEGATIVE = list())
|
||||
var/alist/selectable_traits_by_types = alist(STATION_TRAIT_POSITIVE = list(), STATION_TRAIT_NEUTRAL = list(), STATION_TRAIT_NEGATIVE = list())
|
||||
///Currently active announcer. Starts as a type but gets initialized after traits are selected
|
||||
var/datum/centcom_announcer/announcer = /datum/centcom_announcer/default
|
||||
///A list of trait roles that should be protected from antag
|
||||
|
||||
Reference in New Issue
Block a user