diff --git a/code/__DEFINES/__globals.dm b/code/__DEFINES/__globals.dm index 3639d559255..ce71ead9242 100644 --- a/code/__DEFINES/__globals.dm +++ b/code/__DEFINES/__globals.dm @@ -49,6 +49,14 @@ /// Create a typed list global that is initialized as an empty list #define GLOBAL_LIST_EMPTY_TYPED(X, Typepath) GLOBAL_LIST_INIT_TYPED(X, Typepath, list()) +// VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) +/// Create an alist global with an initializer expression +#define GLOBAL_ALIST_INIT(X, InitValue) GLOBAL_RAW(/alist/##X); GLOBAL_MANAGED(X, InitValue) + +// Create an alist global that is initialized as an empty list +#define GLOBAL_ALIST_EMPTY(X) GLOBAL_ALIST_INIT(X, alist()) + +// VOIDCREW EDIT CHANGE END /// Create a typed global with an initializer expression #define GLOBAL_DATUM_INIT(X, Typepath, InitValue) GLOBAL_RAW(Typepath/##X); GLOBAL_MANAGED(X, InitValue) diff --git a/code/__DEFINES/atmospherics/atmos_piping.dm b/code/__DEFINES/atmospherics/atmos_piping.dm index 188798f95d2..15d2cbaaf6c 100644 --- a/code/__DEFINES/atmospherics/atmos_piping.dm +++ b/code/__DEFINES/atmospherics/atmos_piping.dm @@ -68,9 +68,11 @@ #define TANK_MERGE_OVERPRESSURE "tank_overpressure" // Indices for the reaction_results returned by explosion_information() /// Reactions that have happened in the tank. -#define TANK_RESULTS_REACTION 1 +// VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) +#define TANK_RESULTS_REACTION "results_reaction" /// Additional information of the tank. -#define TANK_RESULTS_MISC 2 +#define TANK_RESULTS_MISC "results_misc" +// VOIDCREW EDIT CHANGE END /// Color used by omni-color pipes #define ATMOS_COLOR_OMNI COLOR_VERY_LIGHT_GRAY diff --git a/code/__DEFINES/food.dm b/code/__DEFINES/food.dm index 6238e3e6638..7e7303123b0 100644 --- a/code/__DEFINES/food.dm +++ b/code/__DEFINES/food.dm @@ -121,7 +121,7 @@ DEFINE_BITFIELD(foodtypes, list( #define FOOD_COMPLEXITY_5 5 /// Labels for food quality -GLOBAL_LIST_INIT(food_quality_description, list( +GLOBAL_ALIST_INIT(food_quality_description, alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) FOOD_QUALITY_NORMAL = "okay", FOOD_QUALITY_NICE = "nice", FOOD_QUALITY_GOOD = "good", @@ -132,7 +132,8 @@ GLOBAL_LIST_INIT(food_quality_description, list( )) /// Mood events for food quality -GLOBAL_LIST_INIT(food_quality_events, list( +// VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list(); upstream deleted this list before its alist pass +GLOBAL_ALIST_INIT(food_quality_events, alist( FOOD_QUALITY_NORMAL = /datum/mood_event/food, FOOD_QUALITY_NICE = /datum/mood_event/food/nice, FOOD_QUALITY_GOOD = /datum/mood_event/food/good, @@ -143,7 +144,7 @@ GLOBAL_LIST_INIT(food_quality_events, list( )) /// Weighted lists of crafted food buffs randomly given according to crafting_complexity unless the food has a specific buff -GLOBAL_LIST_INIT(food_buffs, list( +GLOBAL_ALIST_INIT(food_buffs, alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) FOOD_COMPLEXITY_1 = list( /datum/status_effect/food/haste = 1, ), diff --git a/code/__DEFINES/research.dm b/code/__DEFINES/research.dm index c8a5b1d6e9b..72c08bbf6a7 100644 --- a/code/__DEFINES/research.dm +++ b/code/__DEFINES/research.dm @@ -66,8 +66,10 @@ //Defines how many percent of vat grown atoms come out as hue shifted color mutants. A flat chance for now, maybe in the future dependant on the cell line. #define CYTO_SHINY_CHANCE 15 -#define SCIPAPER_COOPERATION_INDEX 1 -#define SCIPAPER_FUNDING_INDEX 2 +// VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) +#define SCIPAPER_COOPERATION_INDEX "cooperation" +#define SCIPAPER_FUNDING_INDEX "funding" +// VOIDCREW EDIT CHANGE END #define SCIENTIFIC_COOPERATION_PURCHASE_MULTIPLIER 0.01 /// How much money is one point of gain worth. #define SCIPAPER_GAIN_TO_MONEY 125 diff --git a/code/controllers/subsystem/dynamic/_dynamic_ruleset.dm b/code/controllers/subsystem/dynamic/_dynamic_ruleset.dm index 2ca15349339..b506922a5fd 100644 --- a/code/controllers/subsystem/dynamic/_dynamic_ruleset.dm +++ b/code/controllers/subsystem/dynamic/_dynamic_ruleset.dm @@ -30,7 +30,7 @@ * Or * - A single weight for all tiers. */ - var/list/weight = 0 + var/alist/weight = 0 // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) /** * The min population for which this ruleset is available. * @@ -40,7 +40,7 @@ * Or * - A single min population for all tiers. */ - var/list/min_pop = 0 + var/alist/min_pop = 0 // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) /// List of roles that are blacklisted from this ruleset /// For roundstart rulesets, it will prevent players from being selected for this ruleset if they have one of these roles /// For latejoin or midround rulesets, it will prevent players from being assigned to this ruleset if they have one of these roles @@ -116,47 +116,17 @@ return FALSE return ..() -/// Used to create tier lists for weights and min_pop values +// VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) +/// Used to create tier alists for weights and min_pop values /datum/dynamic_ruleset/proc/load_tier_list(list/incoming_list) PRIVATE_PROC(TRUE) - var/list/tier_list = new /list(4) - // loads a list of list("2" = 1, "3" = 3) into a list(null, 1, 3, null) + var/alist/tier_list = alist() + // loads a list of list("2" = 1, "3" = 3) into an alist(2 = 1, 3 = 3) for(var/tier in incoming_list) tier_list[text2num(tier)] = incoming_list[tier] - // turn list(null, 1, 3, null) into list(1, 1, 3, null) - for(var/i in 1 to length(tier_list)) - var/val = tier_list[i] - if(isnum(val)) - break - for(var/j in i to length(tier_list)) - var/other_val = tier_list[j] - if(!isnum(other_val)) - continue - tier_list[i] = other_val - break - - // turn list(1, 1, 3, null) into list(1, 1, 3, 3) - for(var/i in length(tier_list) to 1 step -1) - var/val = tier_list[i] - if(isnum(val)) - break - for(var/j in i to 1 step -1) - var/other_val = tier_list[j] - if(!isnum(other_val)) - continue - tier_list[i] = other_val - break - - // we can assert that tier[1] and tier[4] are not null, but we cannot say the same for tier[2] and tier[3] - // this can be happen due to the following setup: list(1, null, null, 4) - // (which is an invalid config, and should be fixed by the operator) - if(isnull(tier_list[2])) - tier_list[2] = tier_list[1] - if(isnull(tier_list[3])) - tier_list[3] = tier_list[4] - + // VOIDCREW EDIT CHANGE END return tier_list /** @@ -165,6 +135,27 @@ /datum/dynamic_ruleset/proc/can_be_selected() return TRUE +// VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) +/// Gets the list value for the given tier, otherwise use next highest tier, +/// or failing that, next lowest +/datum/dynamic_ruleset/proc/get_tier_specific_value(alist/values, tier) + PRIVATE_PROC(TRUE) + if(isnum(values[tier])) + return values[tier] + + // search higher tiers + for(var/i in tier to 4) + if(isnum(values[i])) + return values[i] + + // no dice, lower tiers? + for(var/i in tier to 1 step -1) + if(isnum(values[i])) + return values[i] + + return 0 + +// VOIDCREW EDIT CHANGE END /** * Calculates the weight of this ruleset for the given tier. * @@ -178,11 +169,13 @@ return 0 if(!can_be_selected()) return 0 - var/final_minpop = islist(min_pop) ? min_pop[tier] : min_pop + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + var/final_minpop = islist(min_pop) ? get_tier_specific_value(min_pop, tier) : min_pop if(final_minpop > population_size) return 0 - var/final_weight = islist(weight) ? weight[tier] : weight + var/final_weight = islist(weight) ? get_tier_specific_value(weight, tier) : weight + // VOIDCREW EDIT CHANGE END for(var/datum/dynamic_ruleset/other_ruleset as anything in SSdynamic.executed_rulesets) if(other_ruleset == src) continue diff --git a/code/controllers/subsystem/dynamic/dynamic_ruleset_midround.dm b/code/controllers/subsystem/dynamic/dynamic_ruleset_midround.dm index 2058df26c0e..6622913ff97 100644 --- a/code/controllers/subsystem/dynamic/dynamic_ruleset_midround.dm +++ b/code/controllers/subsystem/dynamic/dynamic_ruleset_midround.dm @@ -26,7 +26,7 @@ midround_type = HEAVY_MIDROUND false_alarm_able = TRUE ruleset_flags = RULESET_INVADER - weight = list( + weight = alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DYNAMIC_TIER_LOW = 0, DYNAMIC_TIER_LOWMEDIUM = 0, DYNAMIC_TIER_MEDIUMHIGH = 1, @@ -271,7 +271,7 @@ pref_flag = ROLE_WIZARD_MIDROUND jobban_flag = ROLE_WIZARD ruleset_flags = RULESET_INVADER|RULESET_HIGH_IMPACT - weight = list( + weight = alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DYNAMIC_TIER_LOW = 0, DYNAMIC_TIER_LOWMEDIUM = 0, DYNAMIC_TIER_MEDIUMHIGH = 1, @@ -294,7 +294,7 @@ pref_flag = ROLE_OPERATIVE_MIDROUND jobban_flag = ROLE_OPERATIVE ruleset_flags = RULESET_INVADER|RULESET_HIGH_IMPACT - weight = list( + weight = alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DYNAMIC_TIER_LOW = 0, DYNAMIC_TIER_LOWMEDIUM = 1, DYNAMIC_TIER_MEDIUMHIGH = 3, @@ -378,7 +378,7 @@ false_alarm_able = TRUE pref_flag = ROLE_BLOB ruleset_flags = RULESET_INVADER - weight = list( + weight = alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DYNAMIC_TIER_LOW = 0, DYNAMIC_TIER_LOWMEDIUM = 1, DYNAMIC_TIER_MEDIUMHIGH = 3, @@ -415,7 +415,7 @@ false_alarm_able = TRUE pref_flag = ROLE_ALIEN ruleset_flags = RULESET_INVADER - weight = list( + weight = alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DYNAMIC_TIER_LOW = 0, DYNAMIC_TIER_LOWMEDIUM = 1, DYNAMIC_TIER_MEDIUMHIGH = 5, @@ -502,7 +502,7 @@ false_alarm_able = TRUE pref_flag = ROLE_SPACE_DRAGON ruleset_flags = RULESET_INVADER - weight = list( + weight = alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DYNAMIC_TIER_LOW = 0, DYNAMIC_TIER_LOWMEDIUM = 3, DYNAMIC_TIER_MEDIUMHIGH = 5, @@ -572,7 +572,7 @@ midround_type = HEAVY_MIDROUND pref_flag = ROLE_NINJA ruleset_flags = RULESET_INVADER - weight = list( + weight = alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DYNAMIC_TIER_LOW = 0, DYNAMIC_TIER_LOWMEDIUM = 0, DYNAMIC_TIER_MEDIUMHIGH = 1, @@ -1077,7 +1077,7 @@ pref_flag = ROLE_MALF_MIDROUND jobban_flag = ROLE_MALF ruleset_flags = RULESET_HIGH_IMPACT - weight = list( + weight = alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DYNAMIC_TIER_LOW = 0, DYNAMIC_TIER_LOWMEDIUM = 1, DYNAMIC_TIER_MEDIUMHIGH = 3, @@ -1105,7 +1105,7 @@ midround_type = HEAVY_MIDROUND pref_flag = ROLE_BLOB_INFECTION jobban_flag = ROLE_BLOB - weight = list( + weight = alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DYNAMIC_TIER_LOW = 0, DYNAMIC_TIER_LOWMEDIUM = 1, DYNAMIC_TIER_MEDIUMHIGH = 3, @@ -1129,7 +1129,7 @@ midround_type = LIGHT_MIDROUND pref_flag = ROLE_OBSESSED blacklisted_roles = list() - weight = list( + weight = alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DYNAMIC_TIER_LOW = 5, DYNAMIC_TIER_LOWMEDIUM = 5, DYNAMIC_TIER_MEDIUMHIGH = 3, diff --git a/code/controllers/subsystem/dynamic/dynamic_ruleset_roundstart.dm b/code/controllers/subsystem/dynamic/dynamic_ruleset_roundstart.dm index 1bdfe947615..2ece98feced 100644 --- a/code/controllers/subsystem/dynamic/dynamic_ruleset_roundstart.dm +++ b/code/controllers/subsystem/dynamic/dynamic_ruleset_roundstart.dm @@ -49,7 +49,7 @@ pref_flag = ROLE_MALF preview_antag_datum = /datum/antagonist/malf_ai ruleset_flags = RULESET_HIGH_IMPACT - weight = list( + weight = alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DYNAMIC_TIER_LOW = 0, DYNAMIC_TIER_LOWMEDIUM = 1, DYNAMIC_TIER_MEDIUMHIGH = 3, @@ -116,7 +116,7 @@ preview_antag_datum = /datum/antagonist/wizard pref_flag = ROLE_WIZARD ruleset_flags = RULESET_INVADER|RULESET_HIGH_IMPACT - weight = list( + weight = alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DYNAMIC_TIER_LOW = 0, DYNAMIC_TIER_LOWMEDIUM = 0, DYNAMIC_TIER_MEDIUMHIGH = 1, @@ -147,7 +147,7 @@ preview_antag_datum = /datum/antagonist/cult pref_flag = ROLE_CULTIST ruleset_flags = RULESET_HIGH_IMPACT - weight = list( + weight = alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DYNAMIC_TIER_LOW = 0, DYNAMIC_TIER_LOWMEDIUM = 1, DYNAMIC_TIER_MEDIUMHIGH = 3, @@ -208,7 +208,7 @@ preview_antag_datum = /datum/antagonist/nukeop pref_flag = ROLE_OPERATIVE ruleset_flags = RULESET_INVADER|RULESET_HIGH_IMPACT - weight = list( + weight = alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DYNAMIC_TIER_LOW = 0, DYNAMIC_TIER_LOWMEDIUM = 1, DYNAMIC_TIER_MEDIUMHIGH = 3, @@ -292,7 +292,7 @@ preview_antag_datum = /datum/antagonist/rev/head pref_flag = ROLE_REV_HEAD ruleset_flags = RULESET_HIGH_IMPACT - weight = list( + weight = alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DYNAMIC_TIER_LOW = 0, DYNAMIC_TIER_LOWMEDIUM = 1, DYNAMIC_TIER_MEDIUMHIGH = 3, @@ -367,7 +367,7 @@ config_tag = "Roundstart Spies" preview_antag_datum = /datum/antagonist/spy pref_flag = ROLE_SPY - weight = list( + weight = alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DYNAMIC_TIER_LOW = 0, DYNAMIC_TIER_LOWMEDIUM = 1, DYNAMIC_TIER_MEDIUMHIGH = 3, diff --git a/code/controllers/subsystem/processing/station.dm b/code/controllers/subsystem/processing/station.dm index 45a10f3a974..65a366abe93 100644 --- a/code/controllers/subsystem/processing/station.dm +++ b/code/controllers/subsystem/processing/station.dm @@ -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()) // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) ///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 diff --git a/code/controllers/subsystem/timer.dm b/code/controllers/subsystem/timer.dm index 20fe4eb47b6..01b25879ee4 100644 --- a/code/controllers/subsystem/timer.dm +++ b/code/controllers/subsystem/timer.dm @@ -519,30 +519,34 @@ SUBSYSTEM_DEF(timer) #if defined(TIMER_DEBUG) // Generate debug-friendly list for timer, more complex but also more expensive timer_info = list( - 1 = id, - 2 = timeToRun, - 3 = wait, - 4 = flags, - 5 = callBack, /* Safe to hold this directly because it's never del'd */ - 6 = "[callBack.object]", - 7 = text_ref(callBack.object), - 8 = getcallingtype(), - 9 = callBack.delegate, - 10 = callBack.arguments ? callBack.arguments.Copy() : null, - 11 = "[source]" + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + /* 1 = */ id, + /* 2 = */ timeToRun, + /* 3 = */ wait, + /* 4 = */ flags, + /* 5 = */ callBack, /* Safe to hold this directly because it's never del'd */ + /* 6 = */ "[callBack.object]", + /* 7 = */ text_ref(callBack.object), + /* 8 = */ getcallingtype(), + /* 9 = */ callBack.delegate, + /* 10 = */ callBack.arguments ? callBack.arguments.Copy() : null, + /* 11 = */ "[source]" + // VOIDCREW EDIT CHANGE END ) #else // Generate a debuggable list for the timer, simpler but wayyyy cheaper, string generation (and ref/copy memes) is a bitch and this saves a LOT of time timer_info = list( - 1 = id, - 2 = timeToRun, - 3 = wait, - 4 = flags, - 5 = callBack, /* Safe to hold this directly because it's never del'd */ - 6 = "[callBack.object]", - 7 = getcallingtype(), - 8 = callBack.delegate, - 9 = "[source]" + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + /* 1 = */ id, + /* 2 = */ timeToRun, + /* 3 = */ wait, + /* 4 = */ flags, + /* 5 = */ callBack, /* Safe to hold this directly because it's never del'd */ + /* 6 = */ "[callBack.object]", + /* 7 = */ getcallingtype(), + /* 8 = */ callBack.delegate, + /* 9 = */ "[source]" + // VOIDCREW EDIT CHANGE END ) #endif diff --git a/code/datums/hud.dm b/code/datums/hud.dm index e81ded951fe..5f06b10c6b4 100644 --- a/code/datums/hud.dm +++ b/code/datums/hud.dm @@ -7,7 +7,7 @@ GLOBAL_LIST_EMPTY(all_huds) GLOBAL_LIST_EMPTY(huds_by_category) //GLOBAL HUD LIST -GLOBAL_LIST_INIT(huds, list( +GLOBAL_ALIST_INIT(huds, alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) DATA_HUD_SECURITY_BASIC = new /datum/atom_hud/data/human/security/basic(), DATA_HUD_SECURITY_ADVANCED = new /datum/atom_hud/data/human/security/advanced(), DATA_HUD_MEDICAL_BASIC = new /datum/atom_hud/data/human/medical/basic(), diff --git a/code/datums/quirks/neutral_quirks/transhumanist.dm b/code/datums/quirks/neutral_quirks/transhumanist.dm index cbd85150e76..f40246d5cfe 100644 --- a/code/datums/quirks/neutral_quirks/transhumanist.dm +++ b/code/datums/quirks/neutral_quirks/transhumanist.dm @@ -66,7 +66,7 @@ else if(organ.organ_flags & ORGAN_ORGANIC) organic_bodytypes += 0.02 - return list( + return alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) BODYPART_SCORE_ORGANIC = organic_bodytypes, BODYPART_SCORE_SILICON = silicon_bodytypes, BODYPART_SCORE_OTHER_BODYTYPES = other_bodytypes, @@ -76,7 +76,7 @@ /datum/quirk/transhumanist/proc/calculate_bodypart_score() SIGNAL_HANDLER - var/list/score = get_bodypart_score(quirk_holder) + var/alist/score = get_bodypart_score(quirk_holder) // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) var/organic_bodytypes = score[BODYPART_SCORE_ORGANIC] var/silicon_bodytypes = score[BODYPART_SCORE_SILICON] var/other_bodytypes = score[BODYPART_SCORE_OTHER_BODYTYPES] @@ -177,7 +177,7 @@ continue if(iscarbon(target)) - var/list/score = get_bodypart_score(target, limbs_only = TRUE) + var/alist/score = get_bodypart_score(target, limbs_only = TRUE) // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) // For an average human, they'll need 2 augmented limbs to not get counted as an organic nor a silicon. // If some monstrosity has 20-30 organic limbs, they'll likely need more. if(score[BODYPART_SCORE_OVERALL] < 1) diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 04ba0e52439..3662b5f261d 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -8,12 +8,14 @@ /* DATA HUD DATUMS */ /atom/proc/add_to_all_human_data_huds() - for(var/datum/atom_hud/data/human/hud in GLOB.huds) - hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + for(var/hud_key, hud_type in GLOB.huds) + astype(hud_type, /datum/atom_hud/data/human)?.add_atom_to_hud(src) /atom/proc/remove_from_all_data_huds() - for(var/datum/atom_hud/data/hud in GLOB.huds) - hud.remove_atom_from_hud(src) + for(var/hud_key, hud_type in GLOB.huds) + astype(hud_type, /datum/atom_hud/data)?.remove_atom_from_hud(src) + // VOIDCREW EDIT CHANGE END /datum/atom_hud/data diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 30a969532b7..b66dae5f041 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -179,8 +179,10 @@ damage_deflection = AIRLOCK_DAMAGE_DEFLECTION_R prepare_huds() - for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds) - diag_hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC] + diag_hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE END diag_hud_set_electrified() @@ -308,8 +310,10 @@ close_others.Cut() QDEL_NULL(note) QDEL_NULL(seal) - for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds) - diag_hud.remove_atom_from_hud(src) + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC] + diag_hud.remove_atom_from_hud(src) + // VOIDCREW EDIT CHANGE END return ..() /obj/machinery/door/airlock/Exited(atom/movable/gone, direction) diff --git a/code/game/machinery/launch_pad.dm b/code/game/machinery/launch_pad.dm index 471e43f9413..80d9b8da752 100644 --- a/code/game/machinery/launch_pad.dm +++ b/code/game/machinery/launch_pad.dm @@ -38,8 +38,10 @@ /obj/machinery/launchpad/Initialize(mapload) . = ..() prepare_huds() - for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds) - diag_hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC] + diag_hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE END update_hud() @@ -57,8 +59,10 @@ return ..() /obj/machinery/launchpad/Destroy() - for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds) - diag_hud.remove_atom_from_hud(src) + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC] + diag_hud.remove_atom_from_hud(src) + // VOIDCREW EDIT CHANGE END return ..() /obj/machinery/launchpad/examine(mob/user) diff --git a/code/modules/admin/smites/boneless.dm b/code/modules/admin/smites/boneless.dm index a3031ce13ff..a9c595c5b80 100644 --- a/code/modules/admin/smites/boneless.dm +++ b/code/modules/admin/smites/boneless.dm @@ -11,7 +11,7 @@ var/mob/living/carbon/carbon_target = target for(var/obj/item/bodypart/limb as anything in carbon_target.bodyparts) - var/severity = pick_weight(list( + var/severity = pick_weight(alist( // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) WOUND_SEVERITY_MODERATE = 1, WOUND_SEVERITY_SEVERE = 2, WOUND_SEVERITY_CRITICAL = 2, diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 7a76dc6ec4e..25aeb66198e 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -7,10 +7,12 @@ //Builds a list of gas id to reaction group for(var/gas_id in GLOB.meta_gas_info) priority_reactions[gas_id] = list( - PRIORITY_PRE_FORMATION = list(), - PRIORITY_FORMATION = list(), - PRIORITY_POST_FORMATION = list(), - PRIORITY_FIRE = list() + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + /* PRIORITY_PRE_FORMATION = */ list(), + /* PRIORITY_FORMATION = */ list(), + /* PRIORITY_POST_FORMATION = */ list(), + /* PRIORITY_FIRE = */ list() + // VOIDCREW EDIT CHANGE END ) for(var/datum/gas_reaction/reaction as anything in subtypesof(/datum/gas_reaction)) diff --git a/code/modules/mob/living/basic/bots/_bots.dm b/code/modules/mob/living/basic/bots/_bots.dm index 4cdf7f8ecf3..e6861aa212d 100644 --- a/code/modules/mob/living/basic/bots/_bots.dm +++ b/code/modules/mob/living/basic/bots/_bots.dm @@ -131,8 +131,10 @@ GLOBAL_LIST_INIT(command_strings, list( //Adds bot to the diagnostic HUD system prepare_huds() - for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds) - diag_hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC] + diag_hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE END diag_hud_set_bothealth() diag_hud_set_botstat() diag_hud_set_botmode() diff --git a/code/modules/mob/living/basic/drone/_drone.dm b/code/modules/mob/living/basic/drone/_drone.dm index 6ddaea0e51a..7f9705200f4 100644 --- a/code/modules/mob/living/basic/drone/_drone.dm +++ b/code/modules/mob/living/basic/drone/_drone.dm @@ -133,8 +133,10 @@ shy_update() alert_drones(DRONE_NET_CONNECT) - for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds) - diag_hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC] + diag_hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE END add_traits(list( TRAIT_VENTCRAWLER_ALWAYS, diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 4778809a828..3360d49f0ec 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -8,8 +8,10 @@ set_name() var/datum/atom_hud/data/human/medical/advanced/medhud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED] medhud.add_atom_to_hud(src) - for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds) - diag_hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC] + diag_hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE END faction += "[REF(src)]" GLOB.mob_living_list += src // VOIDCREW EDIT: mobs created on a planet inherit that footprint's native alliance. diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index b8c1c7d281f..9c37a342d0a 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -59,8 +59,10 @@ faction += FACTION_SILICON if(ispath(radio)) radio = new radio(src) - for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds) - diag_hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC] + diag_hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE END diag_hud_set_status() diag_hud_set_health() add_sensors() diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index cb740063e55..586164a0582 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -183,8 +183,10 @@ //Adds bot to the diagnostic HUD system prepare_huds() - for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds) - diag_hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC] + diag_hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE END diag_hud_set_bothealth() diag_hud_set_botstat() diag_hud_set_botmode() diff --git a/code/modules/mob_spawn/corpses/mining_corpses.dm b/code/modules/mob_spawn/corpses/mining_corpses.dm index 9edfbeddf8b..838f7077776 100644 --- a/code/modules/mob_spawn/corpses/mining_corpses.dm +++ b/code/modules/mob_spawn/corpses/mining_corpses.dm @@ -261,7 +261,7 @@ else backpack_contents += backpack_loot if(prob(30)) - backpack_contents += list(/obj/item/stack/sheet/mineral/bananium = pick_weight(list( 1 = 3, 2 = 2, 3 = 1))) + backpack_contents += list(/obj/item/stack/sheet/mineral/bananium = pick_weight(alist( 1 = 3, 2 = 2, 3 = 1))) // VOIDCREW EDIT CHANGE - BYOND 516.1670+ rejects number keys in list() (tg #93801) if(prob(10)) l_pocket = pick_weight(list( /obj/item/bikehorn/golden = 3, diff --git a/code/modules/research/ordnance/_scipaper.dm b/code/modules/research/ordnance/_scipaper.dm index f1d94af7631..815abddc40a 100644 --- a/code/modules/research/ordnance/_scipaper.dm +++ b/code/modules/research/ordnance/_scipaper.dm @@ -102,12 +102,14 @@ if(!tier || !experiment_path || !tracked_variable) return FALSE var/gain = calculate_gains(tier) - for (var/gain_type in 1 to gains.len) - gains[gain_type] = gain + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + for (var/gain_index in gains) + gains[gain_index] = gain if(!partner_path) continue var/datum/scientific_partner/partner = locate(partner_path) in SSresearch.scientific_partners - gains[gain_type] *= partner.multipliers[gain_type] + gains[gain_index] *= partner.multipliers[gain_index] + // VOIDCREW EDIT CHANGE END /** Fully check if our paper have all the required variables, and prevent duplicate papers being published in the same tier. * Things to check: tier, gain, and partner here. ex_path and record datums in subtypes. @@ -151,23 +153,25 @@ /datum/scientific_paper/proc/return_gist() var/list/gist = list() var/list/transcripted_gains = list(SCIPAPER_COOPERATION_INDEX, SCIPAPER_FUNDING_INDEX) - for (var/index in 1 to transcripted_gains.len) + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + for (var/gain_index in transcripted_gains) if (!gains) - transcripted_gains[index] = "None" + transcripted_gains[gain_index] = "None" continue - switch (round(gains[index])) + switch (round(gains[gain_index])) if(-INFINITY to 0) - transcripted_gains[index] = "None" + transcripted_gains[gain_index] = "None" if(1 to 24) - transcripted_gains[index] = "Little" + transcripted_gains[gain_index] = "Little" if(25 to 49) - transcripted_gains[index] = "Moderate" + transcripted_gains[gain_index] = "Moderate" if(50 to 99) - transcripted_gains[index] = "Significant" + transcripted_gains[gain_index] = "Significant" if(100 to INFINITY) - transcripted_gains[index] = "Huge" + transcripted_gains[gain_index] = "Huge" else - transcripted_gains[index] = "Undefined" + transcripted_gains[gain_index] = "Undefined" + // VOIDCREW EDIT CHANGE END gist["gains"] = transcripted_gains gist["title"] = title gist["author"] = author diff --git a/code/modules/vehicles/mecha/_mecha.dm b/code/modules/vehicles/mecha/_mecha.dm index b2e64b15edf..bcecbc8b0e2 100644 --- a/code/modules/vehicles/mecha/_mecha.dm +++ b/code/modules/vehicles/mecha/_mecha.dm @@ -249,8 +249,10 @@ log_message("[src.name] created.", LOG_MECHA) GLOB.mechas_list += src //global mech list prepare_huds() - for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds) - diag_hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC] + diag_hud.add_atom_to_hud(src) + // VOIDCREW EDIT CHANGE END diag_hud_set_mechhealth() diag_hud_set_mechcell() diag_hud_set_mechstat() @@ -305,8 +307,10 @@ QDEL_NULL(chassis_camera) GLOB.mechas_list -= src //global mech list - for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds) - diag_hud.remove_atom_from_hud(src) //YEET + // VOIDCREW EDIT CHANGE START - BYOND 516.1670+ rejects number keys in list() (tg #93801) + var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC] + diag_hud.remove_atom_from_hud(src) //YEET + // VOIDCREW EDIT CHANGE END return ..() ///Add parts on mech spawning. Skipped in manual construction. diff --git a/interface/stylesheet.dm b/interface/stylesheet.dm index 65fda5e4237..4dcf60d4e5d 100644 --- a/interface/stylesheet.dm +++ b/interface/stylesheet.dm @@ -136,21 +136,9 @@ h1.alert, h2.alert {color: #000000;} .clown {color: #FF69Bf; font-size: 3; font-family: "Comic Sans MS", cursive, sans-serif; font-weight: bold;} .singing {font-family: "Trebuchet MS", cursive, sans-serif; font-style: italic;} .his_grace {color: #15D512; font-family: "Courier New", cursive, sans-serif; font-style: italic;} -.hypnophrase {color: #3bb5d3; font-weight: bold; animation: hypnocolor 1500ms infinite; animation-direction: alternate;} - @keyframes hypnocolor { - 0% {color: #0d0d0d;} - 25% {color: #410194;} - 50% {color: #7f17d8;} - 75% {color: #410194;} - 100% {color: #3bb5d3;} -} - -.phobia {color: #dd0000; font-weight: bold; animation: phobia 750ms infinite;} - @keyframes phobia { - 0% {color: #0d0d0d;} - 50% {color: #dd0000;} - 100% {color: #0d0d0d;} -} +.hypnophrase {color: #3bb5d3; font-weight: bold;} + +.phobia {color: #dd0000; font-weight: bold;} .icon {height: 1em; width: auto;} diff --git a/tgui/packages/tgui/interfaces/NtosScipaper.jsx b/tgui/packages/tgui/interfaces/NtosScipaper.jsx index 16ecad2e837..0551dd561f6 100644 --- a/tgui/packages/tgui/interfaces/NtosScipaper.jsx +++ b/tgui/packages/tgui/interfaces/NtosScipaper.jsx @@ -196,7 +196,8 @@ const PaperPublishing = (props) => { icon="info-circle" /> {' Cooperation: '} -
{gains[coopIndex - 1]}
+ {/* VOIDCREW EDIT CHANGE - BYOND 516.1670+ string gain keys (tg #93801) */} +
{gains[coopIndex]}