From 358db4f39055513318aa1b7db571c7d166be2cfb Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Thu, 14 Nov 2019 14:54:12 +0100 Subject: [PATCH 1/3] Dreamchecker compatibility changes, part 2. --- code/__DEFINES/_globals.dm | 6 ++++ code/_globalvars/lists/flavor_misc.dm | 6 ++-- code/_globalvars/lists/mapping.dm | 2 +- .../dynamic/dynamic_rulesets_midround.dm | 2 +- code/modules/clothing/gloves/_gloves.dm | 2 +- code/modules/clothing/shoes/_shoes.dm | 2 +- .../modules/mob/dead/new_player/new_player.dm | 5 +--- .../modules/mob/living/carbon/damage_procs.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 2 +- code/modules/surgery/bodyparts/bodyparts.dm | 8 ++--- .../surgery/experimental_dissection.dm | 2 +- code/modules/surgery/organs/heart.dm | 1 - code/modules/surgery/organs/organ_internal.dm | 3 -- .../code/modules/arousal/arousal.dm | 2 +- .../living/silicon/robot/dogborg_equipment.dm | 2 +- .../reagents/chemistry/reagents/MKUltra.dm | 6 ++-- .../chemistry/reagents/eigentstasium.dm | 4 +-- .../reagents/chemistry/recipes/fermi.dm | 30 +++++++++---------- 18 files changed, 43 insertions(+), 44 deletions(-) diff --git a/code/__DEFINES/_globals.dm b/code/__DEFINES/_globals.dm index e5f5929a95..8c0c99eefd 100644 --- a/code/__DEFINES/_globals.dm +++ b/code/__DEFINES/_globals.dm @@ -41,6 +41,12 @@ //Create a list global that is initialized as an empty list #define GLOBAL_LIST_EMPTY(X) GLOBAL_LIST_INIT(X, list()) +// Create a typed list global with an initializer expression +#define GLOBAL_LIST_INIT_TYPED(X, Typepath, InitValue) GLOBAL_RAW(/list##Typepath/X); GLOBAL_MANAGED(X, InitValue) + +// 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()) + //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/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index a2135b93b2..0ac8a61183 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -7,15 +7,15 @@ GLOBAL_LIST_EMPTY(facial_hair_styles_list) //stores /datum/sprite_accessory/faci GLOBAL_LIST_EMPTY(facial_hair_styles_male_list) //stores only hair names GLOBAL_LIST_EMPTY(facial_hair_styles_female_list) //stores only hair names //Underwear -GLOBAL_LIST_EMPTY(underwear_list) //stores /datum/sprite_accessory/underwear/bottom indexed by name +GLOBAL_LIST_EMPTY_TYPED(underwear_list, /datum/sprite_accessory/underwear/bottom) //stores bottoms indexed by name GLOBAL_LIST_EMPTY(underwear_m) //stores only underwear name GLOBAL_LIST_EMPTY(underwear_f) //stores only underwear name //Undershirts -GLOBAL_LIST_EMPTY(undershirt_list) //stores /datum/sprite_accessory/underwear/top indexed by name +GLOBAL_LIST_EMPTY_TYPED(undershirt_list, /datum/sprite_accessory/underwear/top) //stores tops indexed by name GLOBAL_LIST_EMPTY(undershirt_m) //stores only undershirt name GLOBAL_LIST_EMPTY(undershirt_f) //stores only undershirt name //Socks -GLOBAL_LIST_EMPTY(socks_list) //stores /datum/sprite_accessory/underwear/socks indexed by name +GLOBAL_LIST_EMPTY_TYPED(socks_list, /datum/sprite_accessory/underwear/socks) //stores socks indexed by name //Lizard Bits (all datum lists indexed by name) GLOBAL_LIST_EMPTY(body_markings_list) GLOBAL_LIST_EMPTY(tails_list_lizard) diff --git a/code/_globalvars/lists/mapping.dm b/code/_globalvars/lists/mapping.dm index 0cb61949a0..27ba3d3d30 100644 --- a/code/_globalvars/lists/mapping.dm +++ b/code/_globalvars/lists/mapping.dm @@ -35,6 +35,6 @@ GLOBAL_LIST_EMPTY(vr_spawnpoints) //used by jump-to-area etc. Updated by area/updateName() GLOBAL_LIST_EMPTY(sortedAreas) /// An association from typepath to area instance. Only includes areas with `unique` set. -GLOBAL_LIST_EMPTY(areas_by_type) +GLOBAL_LIST_EMPTY_TYPED(areas_by_type, /area) GLOBAL_LIST_EMPTY(all_abstract_markers) diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm index f24301d716..1951bd16c8 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm @@ -145,7 +145,7 @@ finish_setup(new_character, i) assigned += applicant - notify_ghosts("[new_character] has been picked for the ruleset [name]!", source = new_character, action = NOTIFY_ORBIT, header="Something Interesting!") + notify_ghosts("[new_character] has been picked for the ruleset [name]!", source = new_character, action = NOTIFY_ORBIT) /datum/dynamic_ruleset/midround/from_ghosts/proc/generate_ruleset_body(mob/applicant) var/mob/living/carbon/human/new_character = makeBody(applicant) diff --git a/code/modules/clothing/gloves/_gloves.dm b/code/modules/clothing/gloves/_gloves.dm index 6b674c8595..3fce94171c 100644 --- a/code/modules/clothing/gloves/_gloves.dm +++ b/code/modules/clothing/gloves/_gloves.dm @@ -14,7 +14,7 @@ /obj/item/clothing/gloves/ComponentInitialize() . = ..() - RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, /obj/item/clothing/gloves/clean_blood) + RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_blood) /obj/item/clothing/gloves/clean_blood(datum/source, strength) . = ..() diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index 37ab2b2bf4..5a2a0af01b 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -23,7 +23,7 @@ /obj/item/clothing/shoes/ComponentInitialize() . = ..() - RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, /obj/item/clothing/shoes/clean_blood) + RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_blood) /obj/item/clothing/shoes/suicide_act(mob/living/carbon/user) if(rand(2)>1) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 4d253a4693..d789fc6f5a 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -473,10 +473,7 @@ var/free_space = 0 for(var/list/category in list(GLOB.command_positions) + list(GLOB.supply_positions) + list(GLOB.engineering_positions) + list(GLOB.nonhuman_positions - "pAI") + list(GLOB.civilian_positions) + list(GLOB.medical_positions) + list(GLOB.science_positions) + list(GLOB.security_positions)) var/cat_color = "fff" //random default - if(SSjob.name_occupations && SSjob.name_occupations[category[1]]) - cat_color = SSjob.name_occupations[category[1]].selection_color //use the color of the first job in the category (the department head) as the category color - else - cat_color = SSjob.occupations[category[1]].selection_color + cat_color = SSjob.name_occupations[category[1]].selection_color //use the color of the first job in the category (the department head) as the category color dat += "
" dat += "[SSjob.name_occupations[category[1]].exp_type_department]" diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index 7d1e5320fc..a8a69be0f1 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -43,7 +43,7 @@ adjustStaminaLoss(damage_amount, forced = forced) //citadel code if(AROUSAL) - adjustArousalLoss(damage_amount, forced = forced) + adjustArousalLoss(damage_amount) return TRUE diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a737844f10..b912a085b8 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -32,7 +32,7 @@ if(CONFIG_GET(flag/disable_stambuffer)) togglesprint() - RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, /mob/living/carbon/human/clean_blood) + RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_blood) /mob/living/carbon/human/ComponentInitialize() diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm index 9aa89dcaf5..3fba237c23 100644 --- a/code/modules/surgery/bodyparts/bodyparts.dm +++ b/code/modules/surgery/bodyparts/bodyparts.dm @@ -354,7 +354,7 @@ if("legs" in S.default_features) if(body_zone == BODY_ZONE_L_LEG || body_zone == BODY_ZONE_R_LEG) if(DIGITIGRADE in S.species_traits) - digitigrade_type = lowertext(H.dna.features.["legs"]) + digitigrade_type = lowertext(H.dna.features["legs"]) else digitigrade_type = null @@ -363,9 +363,9 @@ Smark = GLOB.mam_body_markings_list[H.dna.features["mam_body_markings"]] if(Smark) body_markings_icon = Smark.icon - if(H.dna.features.["mam_body_markings"] != "None") - body_markings = lowertext(H.dna.features.["mam_body_markings"]) - aux_marking = lowertext(H.dna.features.["mam_body_markings"]) + if(H.dna.features["mam_body_markings"] != "None") + body_markings = lowertext(H.dna.features["mam_body_markings"]) + aux_marking = lowertext(H.dna.features["mam_body_markings"]) else body_markings = "plain" aux_marking = "plain" diff --git a/code/modules/surgery/experimental_dissection.dm b/code/modules/surgery/experimental_dissection.dm index 3172496146..40fe90a829 100644 --- a/code/modules/surgery/experimental_dissection.dm +++ b/code/modules/surgery/experimental_dissection.dm @@ -110,4 +110,4 @@ requires_tech = TRUE replaced_by = null -#undef EXPDIS_FAIL_MSG \ No newline at end of file +#undef BASE_HUMAN_REWARD \ No newline at end of file diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index a9830f36df..94512dc597 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -212,7 +212,6 @@ obj/item/organ/heart/cybernetic/upgraded/on_life() ramount += regen_amount /obj/item/organ/heart/cybernetic/upgraded/proc/used_dose() - . = ..() addtimer(VARSET_CALLBACK(src, dose_available, TRUE), 5 MINUTES) ramount = 0 diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 194a10f4c4..466f618cf3 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -1,6 +1,3 @@ -#define STANDARD_ORGAN_THRESHOLD 100 -#define STANDARD_ORGAN_HEALING 0.001 - /obj/item/organ name = "organ" icon = 'icons/obj/surgery.dmi' diff --git a/modular_citadel/code/modules/arousal/arousal.dm b/modular_citadel/code/modules/arousal/arousal.dm index 6c9da17289..ed28185bb7 100644 --- a/modular_citadel/code/modules/arousal/arousal.dm +++ b/modular_citadel/code/modules/arousal/arousal.dm @@ -159,7 +159,7 @@ to_chat(M, "Arousal is disabled. Feature is unavailable.") -/mob/living/proc/mob_climax()//This is just so I can test this shit without being forced to add actual content to get rid of arousal. Will be a very basic proc for a while. +/mob/living/proc/mob_climax(forced_climax = FALSE)//This is just so I can test this shit without being forced to add actual content to get rid of arousal. Will be a very basic proc for a while. set name = "Masturbate" set category = "IC" if(canbearoused && !restrained() && !stat) diff --git a/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm b/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm index 99ba9ad3e2..2f94725b9d 100644 --- a/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm +++ b/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm @@ -253,7 +253,7 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm ! if(!do_after(R, 50, target = target)) return //If they moved away, you can't eat them. to_chat(R, "You finish off \the [target.name].") - var/obj/item/stock_parts/cell.C = target + var/obj/item/stock_parts/cell/C = target R.cell.charge = R.cell.charge + (C.charge / 3) //Instant full cell upgrades op idgaf qdel(target) return diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/MKUltra.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/MKUltra.dm index 4e80f42d87..f582026bfb 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/MKUltra.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/MKUltra.dm @@ -163,9 +163,9 @@ Creating a chem with a low purity will make you permanently fall in love with so creator = get_mob_by_key(creatorID) /datum/reagent/fermi/enthrall/on_new(list/data) - creatorID = data.["creatorID"] - creatorGender = data.["creatorGender"] - creatorName = data.["creatorName"] + creatorID = data["creatorID"] + creatorGender = data["creatorGender"] + creatorName = data["creatorName"] creator = get_mob_by_key(creatorID) /datum/reagent/fermi/enthrall/on_mob_add(mob/living/carbon/M) diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/eigentstasium.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/eigentstasium.dm index bf915d5b6f..00c6338ac3 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/eigentstasium.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/eigentstasium.dm @@ -32,7 +32,7 @@ can_synth = TRUE /datum/reagent/fermi/eigenstate/on_new(list/data) - location_created = data.["location_created"] + location_created = data["location_created"] //Main functions /datum/reagent/fermi/eigenstate/on_mob_life(mob/living/M) //Teleports to chemistry! @@ -54,7 +54,7 @@ to_chat(M, "You feel your wavefunction split!") if(purity > 0.9) //Teleports you home if it's pure enough if(!location_created && data) //Just in case - location_created = data.["location_created"] + location_created = data["location_created"] log_game("FERMICHEM: [M] ckey: [M.key] returned to [location_created] using eigenstasium") do_sparks(5,FALSE,M) do_teleport(M, location_created, 0, asoundin = 'sound/effects/phasein.ogg') diff --git a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm index 7fcae0eb13..5fe7d58f1c 100644 --- a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm +++ b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm @@ -131,7 +131,7 @@ var/turf/open/location = get_turf(my_atom) if(location) E.location_created = location - E.data.["location_created"] = location + E.data["location_created"] = location //serum @@ -314,16 +314,16 @@ for(var/mob/M in seen) to_chat(M, "The reaction splutters and fails to react properly.") //Just in case E.purity = 0 - if (B.data.["gender"] == "female") - E.data.["creatorGender"] = "Mistress" + if (B.data["gender"] == "female") + E.data["creatorGender"] = "Mistress" E.creatorGender = "Mistress" else - E.data.["creatorGender"] = "Master" + E.data["creatorGender"] = "Master" E.creatorGender = "Master" - E.data["creatorName"] = B.data.["real_name"] - E.creatorName = B.data.["real_name"] - E.data.["creatorID"] = B.data.["ckey"] - E.creatorID = B.data.["ckey"] + E.data["creatorName"] = B.data["real_name"] + E.creatorName = B.data["real_name"] + E.data["creatorID"] = B.data["ckey"] + E.creatorID = B.data["ckey"] //So slimes can play too. /datum/chemical_reaction/fermi/enthrall/slime @@ -337,16 +337,16 @@ for(var/mob/M in seen) to_chat(M, "The reaction splutters and fails to react.") //Just in case E.purity = 0 - if (B.data.["gender"] == "female") - E.data.["creatorGender"] = "Mistress" + if (B.data["gender"] == "female") + E.data["creatorGender"] = "Mistress" E.creatorGender = "Mistress" else - E.data.["creatorGender"] = "Master" + E.data["creatorGender"] = "Master" E.creatorGender = "Master" - E.data["creatorName"] = B.data.["real_name"] - E.creatorName = B.data.["real_name"] - E.data.["creatorID"] = B.data.["ckey"] - E.creatorID = B.data.["ckey"] + E.data["creatorName"] = B.data["real_name"] + E.creatorName = B.data["real_name"] + E.data["creatorID"] = B.data["ckey"] + E.creatorID = B.data["ckey"] /datum/chemical_reaction/fermi/enthrall/FermiExplode(datum/reagents, var/atom/my_atom, volume, temp, pH) var/turf/T = get_turf(my_atom) From 7603db2e8b4156f900e4a61a9e111ef6b0dcc892 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Thu, 14 Nov 2019 15:10:32 +0100 Subject: [PATCH 2/3] Bad habit of pushing things before the compile. --- code/modules/clothing/gloves/_gloves.dm | 2 +- code/modules/clothing/shoes/_shoes.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/clothing/gloves/_gloves.dm b/code/modules/clothing/gloves/_gloves.dm index 3fce94171c..06104b1dd6 100644 --- a/code/modules/clothing/gloves/_gloves.dm +++ b/code/modules/clothing/gloves/_gloves.dm @@ -14,7 +14,7 @@ /obj/item/clothing/gloves/ComponentInitialize() . = ..() - RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_blood) + RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, atom.proc/clean_blood) /obj/item/clothing/gloves/clean_blood(datum/source, strength) . = ..() diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index 5a2a0af01b..92df8af7ee 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -23,7 +23,7 @@ /obj/item/clothing/shoes/ComponentInitialize() . = ..() - RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_blood) + RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, atom.proc/clean_blood) /obj/item/clothing/shoes/suicide_act(mob/living/carbon/user) if(rand(2)>1) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index b912a085b8..a3a9c9bfe6 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -32,7 +32,7 @@ if(CONFIG_GET(flag/disable_stambuffer)) togglesprint() - RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_blood) + RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, atom.proc/clean_blood) /mob/living/carbon/human/ComponentInitialize() From baedb7e09142cf841dc17fb582e79269f8214695 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Thu, 14 Nov 2019 15:16:06 +0100 Subject: [PATCH 3/3] I'm unprofessional. --- code/modules/clothing/gloves/_gloves.dm | 2 +- code/modules/clothing/shoes/_shoes.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/clothing/gloves/_gloves.dm b/code/modules/clothing/gloves/_gloves.dm index 06104b1dd6..ac491c2bc5 100644 --- a/code/modules/clothing/gloves/_gloves.dm +++ b/code/modules/clothing/gloves/_gloves.dm @@ -14,7 +14,7 @@ /obj/item/clothing/gloves/ComponentInitialize() . = ..() - RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, atom.proc/clean_blood) + RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, /atom.proc/clean_blood) /obj/item/clothing/gloves/clean_blood(datum/source, strength) . = ..() diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index 92df8af7ee..91d8d51801 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -23,7 +23,7 @@ /obj/item/clothing/shoes/ComponentInitialize() . = ..() - RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, atom.proc/clean_blood) + RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, /atom.proc/clean_blood) /obj/item/clothing/shoes/suicide_act(mob/living/carbon/user) if(rand(2)>1) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a3a9c9bfe6..c5cd1ab166 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -32,7 +32,7 @@ if(CONFIG_GET(flag/disable_stambuffer)) togglesprint() - RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, atom.proc/clean_blood) + RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, /atom.proc/clean_blood) /mob/living/carbon/human/ComponentInitialize()