From a06e872c51eb8606da61f5009f5c6ba885590fb0 Mon Sep 17 00:00:00 2001 From: Chompstation Bot Date: Tue, 11 May 2021 22:04:18 +0000 Subject: [PATCH 01/13] Tweak synth stuff --- code/controllers/globals.dm | 27 ++++++++------- .../mob/living/carbon/human/human_helpers.dm | 20 +++++++++++ .../mob/living/carbon/human/human_powers.dm | 3 +- code/modules/organs/internal/stomach.dm | 2 ++ code/modules/organs/subtypes/nano.dm | 4 +++ code/modules/organs/subtypes/standard.dm | 34 ++++++++++++++----- 6 files changed, 67 insertions(+), 23 deletions(-) diff --git a/code/controllers/globals.dm b/code/controllers/globals.dm index 56a9244347..9c98866dba 100644 --- a/code/controllers/globals.dm +++ b/code/controllers/globals.dm @@ -43,19 +43,22 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars) return FALSE return ..() -/datum/controller/global_vars/Initialize(var/exclude_these) +/datum/controller/global_vars/Initialize() gvars_datum_init_order = list() - gvars_datum_protected_varlist = list("gvars_datum_protected_varlist") - - //See https://github.com/tgstation/tgstation/issues/26954 - for(var/I in typesof(/datum/controller/global_vars/proc)) - var/CLEANBOT_RETURNS = "[I]" - pass(CLEANBOT_RETURNS) - - for(var/I in (vars - gvars_datum_in_built_vars)) + gvars_datum_protected_varlist = list(NAMEOF(src, gvars_datum_protected_varlist) = TRUE) + var/list/global_procs = typesof(/datum/controller/global_vars/proc) + var/expected_len = vars.len - gvars_datum_in_built_vars.len + if(global_procs.len != expected_len) + warning("Unable to detect all global initialization procs! Expected [expected_len] got [global_procs.len]!") + if(global_procs.len) + var/list/expected_global_procs = vars - gvars_datum_in_built_vars + for(var/I in global_procs) + expected_global_procs -= replacetext("[I]", "InitGlobal", "") + var/english_missing = expected_global_procs.Join(", ") + log_world("Missing procs: [english_missing]") + for(var/I in global_procs) var/start_tick = world.time - call(src, "InitGlobal[I]")() + call(src, I)() var/end_tick = world.time if(end_tick - start_tick) - warning("Global [I] slept during initialization!") - QDEL_NULL(exclude_these) \ No newline at end of file + warning("Global [replacetext("[I]", "InitGlobal", "")] slept during initialization!") diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 83a5b301ab..aecb21f00e 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -97,6 +97,7 @@ // This is the 'mechanical' check for synthetic-ness, not appearance // Returns the company that made the synthetic +<<<<<<< HEAD /mob/living/carbon/human/isSynthetic() if(synthetic) return synthetic //Your synthetic-ness is not going away @@ -111,6 +112,25 @@ update_emotes() return synthetic return FALSE +||||||| parent of 8c427b1f05... Merge pull request #10298 from VOREStation/Arokha/synthtweak +/mob/living/carbon/human/isSynthetic(var/skip_emote_update) + if(synthetic) + return synthetic //Your synthetic-ness is not going away + var/obj/item/organ/external/T = organs_by_name[BP_TORSO] + if(T && T.robotic >= ORGAN_ROBOT) + src.verbs += /mob/living/carbon/human/proc/self_diagnostics + src.verbs += /mob/living/carbon/human/proc/reagent_purge //VOREStation Add + src.verbs += /mob/living/carbon/human/proc/setmonitor_state + var/datum/robolimb/R = all_robolimbs[T.model] + synthetic = R + if(!skip_emote_update) + update_emotes() + return synthetic + return FALSE +======= +/mob/living/carbon/human/isSynthetic() + return synthetic +>>>>>>> 8c427b1f05... Merge pull request #10298 from VOREStation/Arokha/synthtweak // Would an onlooker know this person is synthetic? // Based on sort of logical reasoning, 'Look at head, look at torso' diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm index d7c66d5289..33fb57356b 100644 --- a/code/modules/mob/living/carbon/human/human_powers.dm +++ b/code/modules/mob/living/carbon/human/human_powers.dm @@ -217,8 +217,7 @@ if(isSynthetic()) output += "Current Battery Charge: [nutrition]\n" - - if(isSynthetic()) + var/toxDam = getToxLoss() if(toxDam) output += "System Instability: [toxDam > 25 ? "Severe" : "Moderate"]. Seek charging station for cleanup.\n" diff --git a/code/modules/organs/internal/stomach.dm b/code/modules/organs/internal/stomach.dm index 2ebfefea61..390a86db44 100644 --- a/code/modules/organs/internal/stomach.dm +++ b/code/modules/organs/internal/stomach.dm @@ -58,6 +58,8 @@ acidtype = "sacid" + organ_verbs = list(/mob/living/carbon/human/proc/reagent_purge) //VOREStation Add + /obj/item/organ/internal/stomach/machine/handle_organ_proc_special() ..() if(owner && owner.stat != DEAD) diff --git a/code/modules/organs/subtypes/nano.dm b/code/modules/organs/subtypes/nano.dm index de89fef1d5..1565cbd57e 100644 --- a/code/modules/organs/subtypes/nano.dm +++ b/code/modules/organs/subtypes/nano.dm @@ -78,6 +78,10 @@ organ_tag = O_ORCH parent_organ = BP_TORSO vital = TRUE + organ_verbs = list( + /mob/living/carbon/human/proc/self_diagnostics, + /mob/living/carbon/human/proc/reagent_purge + ) /obj/item/organ/internal/nano/refactory name = "refactory module" diff --git a/code/modules/organs/subtypes/standard.dm b/code/modules/organs/subtypes/standard.dm index 85b6328472..e175a5c920 100644 --- a/code/modules/organs/subtypes/standard.dm +++ b/code/modules/organs/subtypes/standard.dm @@ -24,14 +24,23 @@ base_miss_chance = 10 /obj/item/organ/external/chest/robotize() - if(..() && robotic != ORGAN_NANOFORM) //VOREStation Edit - // Give them fancy new organs. - owner.internal_organs_by_name[O_CELL] = new /obj/item/organ/internal/cell(owner,1) - owner.internal_organs_by_name[O_VOICE] = new /obj/item/organ/internal/voicebox/robot(owner, 1) - owner.internal_organs_by_name[O_PUMP] = new /obj/item/organ/internal/heart/machine(owner,1) - owner.internal_organs_by_name[O_CYCLER] = new /obj/item/organ/internal/stomach/machine(owner,1) - owner.internal_organs_by_name[O_HEATSINK] = new /obj/item/organ/internal/robotic/heatsink(owner,1) - owner.internal_organs_by_name[O_DIAGNOSTIC] = new /obj/item/organ/internal/robotic/diagnostic(owner,1) + if(..() && owner) + if(robotic != ORGAN_NANOFORM) //VOREStation Edit + // Give them fancy new organs. + owner.internal_organs_by_name[O_CELL] = new /obj/item/organ/internal/cell(owner,1) + owner.internal_organs_by_name[O_VOICE] = new /obj/item/organ/internal/voicebox/robot(owner, 1) + owner.internal_organs_by_name[O_PUMP] = new /obj/item/organ/internal/heart/machine(owner,1) + owner.internal_organs_by_name[O_CYCLER] = new /obj/item/organ/internal/stomach/machine(owner,1) + owner.internal_organs_by_name[O_HEATSINK] = new /obj/item/organ/internal/robotic/heatsink(owner,1) + owner.internal_organs_by_name[O_DIAGNOSTIC] = new /obj/item/organ/internal/robotic/diagnostic(owner,1) + + var/datum/robolimb/R = all_robolimbs[model] // company should be set in parent by now + if(!R) + log_error("A torso was robotize() but has no model that can be found: [model]. May affect FBPs.") + owner.synthetic = R + owner.update_emotes() + return FALSE + /obj/item/organ/external/chest/handle_germ_effects() . = ..() //Should return an infection level @@ -279,7 +288,14 @@ return ..() /obj/item/organ/external/head/robotize(var/company, var/skip_prosthetics, var/keep_organs) - return ..(company, skip_prosthetics, 1) + . = ..(company, skip_prosthetics, 1) + if(model) + var/datum/robolimb/robohead = all_robolimbs[model] + if(robohead?.monitor_styles && robohead?.monitor_icon) + LAZYDISTINCTADD(organ_verbs, /mob/living/carbon/human/proc/setmonitor_state) + else + LAZYREMOVE(organ_verbs, /mob/living/carbon/human/proc/setmonitor_state) + handle_organ_mod_special() /obj/item/organ/external/head/removed() if(owner) From e57b2771e06fcd28e042a00ada99333139cba3f8 Mon Sep 17 00:00:00 2001 From: Razgriz Date: Tue, 11 May 2021 15:57:47 -0700 Subject: [PATCH 02/13] Update human_helpers.dm --- .../mob/living/carbon/human/human_helpers.dm | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index aecb21f00e..20ac966e40 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -97,40 +97,8 @@ // This is the 'mechanical' check for synthetic-ness, not appearance // Returns the company that made the synthetic -<<<<<<< HEAD -/mob/living/carbon/human/isSynthetic() - if(synthetic) - return synthetic //Your synthetic-ness is not going away - var/obj/item/organ/external/T = organs_by_name[BP_TORSO] - if(T && T.robotic >= ORGAN_ROBOT) - src.verbs += /mob/living/carbon/human/proc/self_diagnostics - src.verbs += /mob/living/carbon/human/proc/setmonitor_state//YWadd, early port, remove comment when it comes from upstream - src.verbs += /mob/living/carbon/human/proc/reagent_purge //VOREStation Add - src.verbs += /mob/living/carbon/human/proc/setmonitor_state - var/datum/robolimb/R = all_robolimbs[T.model] - synthetic = R - update_emotes() - return synthetic - return FALSE -||||||| parent of 8c427b1f05... Merge pull request #10298 from VOREStation/Arokha/synthtweak -/mob/living/carbon/human/isSynthetic(var/skip_emote_update) - if(synthetic) - return synthetic //Your synthetic-ness is not going away - var/obj/item/organ/external/T = organs_by_name[BP_TORSO] - if(T && T.robotic >= ORGAN_ROBOT) - src.verbs += /mob/living/carbon/human/proc/self_diagnostics - src.verbs += /mob/living/carbon/human/proc/reagent_purge //VOREStation Add - src.verbs += /mob/living/carbon/human/proc/setmonitor_state - var/datum/robolimb/R = all_robolimbs[T.model] - synthetic = R - if(!skip_emote_update) - update_emotes() - return synthetic - return FALSE -======= /mob/living/carbon/human/isSynthetic() return synthetic ->>>>>>> 8c427b1f05... Merge pull request #10298 from VOREStation/Arokha/synthtweak // Would an onlooker know this person is synthetic? // Based on sort of logical reasoning, 'Look at head, look at torso' From e5113a09848f7079bb5571d57a913fc6b1189a1d Mon Sep 17 00:00:00 2001 From: Nadyr <41974248+Darlantanis@users.noreply.github.com> Date: Wed, 12 May 2021 17:59:16 -0400 Subject: [PATCH 03/13] powder that makes you say yes --- code/modules/emotes/definitions/exertion.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/emotes/definitions/exertion.dm b/code/modules/emotes/definitions/exertion.dm index 9d85bbb39a..ac0061cca3 100644 --- a/code/modules/emotes/definitions/exertion.dm +++ b/code/modules/emotes/definitions/exertion.dm @@ -5,7 +5,7 @@ emote_message_3p = "is sweating heavily." /decl/emote/exertion/biological/check_user(mob/living/user) - if(istype(user) && !user.isSynthetic(skip_emote_update = TRUE)) + if(istype(user) && !user.isSynthetic()) return ..() return FALSE @@ -30,7 +30,7 @@ emote_message_3p = "USER's actuators whine with strain." /decl/emote/exertion/synthetic/check_user(mob/living/user) - if(istype(user) && user.isSynthetic(skip_emote_update = TRUE)) + if(istype(user) && user.isSynthetic()) return ..() return FALSE From 6f027544462efb76ec48cbded8a707d1074cb7c2 Mon Sep 17 00:00:00 2001 From: Nadyr <41974248+Darlantanis@users.noreply.github.com> Date: Wed, 12 May 2021 18:03:53 -0400 Subject: [PATCH 04/13] powder that makes you say yes --- code/modules/emotes/definitions/human.dm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/modules/emotes/definitions/human.dm b/code/modules/emotes/definitions/human.dm index 182e8df51a..0b4efc811a 100644 --- a/code/modules/emotes/definitions/human.dm +++ b/code/modules/emotes/definitions/human.dm @@ -1,5 +1,11 @@ +/decl/emote/human + key = "vomit" + /decl/emote/human/check_user(var/mob/living/carbon/human/user) - return istype(user) + return (istype(user))//VOREStation Edit - What does a mouth have to do with wagging?? && user.check_has_mouth() && !user.isSynthetic()) + +/decl/emote/human/do_emote(var/mob/living/carbon/human/user) + user.vomit() /decl/emote/human/deathgasp key = "deathgasp" From aba0ea1150b7d41035b6164a90a729e8bddc0651 Mon Sep 17 00:00:00 2001 From: Nadyr <41974248+Darlantanis@users.noreply.github.com> Date: Wed, 12 May 2021 18:04:54 -0400 Subject: [PATCH 05/13] powder that makes you say yes --- code/modules/emotes/definitions/synthetics.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/emotes/definitions/synthetics.dm b/code/modules/emotes/definitions/synthetics.dm index 659a1eff44..2e31a07f8f 100644 --- a/code/modules/emotes/definitions/synthetics.dm +++ b/code/modules/emotes/definitions/synthetics.dm @@ -4,7 +4,7 @@ emote_sound = 'sound/machines/twobeep.ogg' /decl/emote/audible/synth/check_user(var/mob/living/user) - if(istype(user) && user.isSynthetic(skip_emote_update = TRUE)) + if(istype(user) && user.isSynthetic()) return ..() return FALSE From 43a3fa4cb3604be6046423b535de48c4b08909a1 Mon Sep 17 00:00:00 2001 From: Nadyr <41974248+Darlantanis@users.noreply.github.com> Date: Wed, 12 May 2021 18:06:49 -0400 Subject: [PATCH 06/13] powder that makes you say yes --- code/modules/emotes/definitions/visible_vomit.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/emotes/definitions/visible_vomit.dm b/code/modules/emotes/definitions/visible_vomit.dm index f60522eeeb..1ec79dea6a 100644 --- a/code/modules/emotes/definitions/visible_vomit.dm +++ b/code/modules/emotes/definitions/visible_vomit.dm @@ -4,7 +4,7 @@ /decl/emote/visible/vomit/do_emote(var/atom/user, var/extra_params) if(isliving(user)) var/mob/living/M = user - if(!M.isSynthetic(skip_emote_update = TRUE)) + if(!M.isSynthetic()) M.vomit() return to_chat(src, SPAN_WARNING("You are unable to vomit.")) From 21d0f89b11f694bef3dcff5f3f6b36b15c09f137 Mon Sep 17 00:00:00 2001 From: Nadyr <41974248+Darlantanis@users.noreply.github.com> Date: Wed, 12 May 2021 18:07:50 -0400 Subject: [PATCH 07/13] powder that makes you say yes --- code/modules/emotes/emote_define.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/emotes/emote_define.dm b/code/modules/emotes/emote_define.dm index 2d311f2ceb..845a5202d3 100644 --- a/code/modules/emotes/emote_define.dm +++ b/code/modules/emotes/emote_define.dm @@ -172,7 +172,7 @@ return key /decl/emote/proc/check_synthetic(var/mob/living/user) - . = istype(user) && user.isSynthetic(skip_emote_update = TRUE) + . = istype(user) && user.isSynthetic() if(!. && ishuman(user) && message_type == AUDIBLE_MESSAGE) var/mob/living/carbon/human/H = user if(H.should_have_organ(O_LUNGS)) From ccc7fbab6268843c26477c3320e2785fce2103a0 Mon Sep 17 00:00:00 2001 From: Nadyr <41974248+Darlantanis@users.noreply.github.com> Date: Wed, 12 May 2021 18:09:36 -0400 Subject: [PATCH 08/13] powder that makes you say yes --- code/modules/mob/living/bot/bot.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/mob/living/bot/bot.dm b/code/modules/mob/living/bot/bot.dm index 89068554ba..e2ba25cec0 100644 --- a/code/modules/mob/living/bot/bot.dm +++ b/code/modules/mob/living/bot/bot.dm @@ -456,6 +456,5 @@ else return !D.check_access(ID) // it's a real, air blocking door return 0 - -/mob/living/bot/isSynthetic(var/skip_emote_update) //Robots are synthetic, no? +/mob/living/bot/isSynthetic() //Robots are synthetic, no? return 1 From c6572af5dec0b77d7676cd085aa32b111d0e2b61 Mon Sep 17 00:00:00 2001 From: Nadyr <41974248+Darlantanis@users.noreply.github.com> Date: Wed, 12 May 2021 18:10:59 -0400 Subject: [PATCH 09/13] powder that makes you say yes --- code/modules/mob/living/carbon/brain/brain.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm index fff4159f9b..89ff4151fb 100644 --- a/code/modules/mob/living/carbon/brain/brain.dm +++ b/code/modules/mob/living/carbon/brain/brain.dm @@ -42,7 +42,7 @@ canmove = 0 return canmove -/mob/living/carbon/brain/isSynthetic(var/skip_emote_update) +/mob/living/carbon/brain/isSynthetic() return istype(loc, /obj/item/device/mmi) /mob/living/carbon/brain/set_typing_indicator(var/state) From 294abf2ee2feeb0ff97f4a0d91bf4e7c15733343 Mon Sep 17 00:00:00 2001 From: Nadyr <41974248+Darlantanis@users.noreply.github.com> Date: Wed, 12 May 2021 18:12:16 -0400 Subject: [PATCH 10/13] powder that makes you say yes --- code/modules/mob/living/carbon/human/emote.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 794f0f1308..a705f03450 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -33,6 +33,7 @@ var/list/_human_default_emotes = list( /decl/emote/audible/grunt, /decl/emote/audible/slap, /decl/emote/audible/crack, + /decl/emote/human, /decl/emote/human/deathgasp, /decl/emote/audible/giggle, /decl/emote/audible/scream, From 3bce32f1e01f0c98967b1b432f0068443b4d30d0 Mon Sep 17 00:00:00 2001 From: Nadyr <41974248+Darlantanis@users.noreply.github.com> Date: Wed, 12 May 2021 18:15:43 -0400 Subject: [PATCH 11/13] powder that makes you say yes --- .../mob/living/simple_mob/subtypes/mechanical/mechanical.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/mechanical.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/mechanical.dm index beba4b35fc..e6c997fc63 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/mechanical.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/mechanical.dm @@ -18,8 +18,8 @@ poison_resist = 1.0 shock_resist = -0.5 -/mob/living/simple_mob/mechanical/isSynthetic(var/skip_emote_update) +/mob/living/simple_mob/mechanical/isSynthetic() return TRUE /mob/living/simple_mob/mechanical/speech_bubble_appearance() - return faction != "neutral" ? "synthetic_evil" : "machine" \ No newline at end of file + return faction != "neutral" ? "synthetic_evil" : "machine" From 2a16c0d6e5d7c279daa0199226151a0e21ee62e7 Mon Sep 17 00:00:00 2001 From: Nadyr <41974248+Darlantanis@users.noreply.github.com> Date: Wed, 12 May 2021 18:18:47 -0400 Subject: [PATCH 12/13] powder that makes you say yes --- code/modules/mob/mob.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 7a9ad45242..f21ada00f7 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1073,7 +1073,7 @@ mob/verb/shifteast() if(src.throw_icon) src.throw_icon.icon_state = "act_throw_on" -/mob/proc/isSynthetic(var/skip_emote_update) +/mob/proc/isSynthetic() return 0 /mob/proc/is_muzzled() From 31b47bc0d1fa6a6f16a2fdedef004d1d38d0effb Mon Sep 17 00:00:00 2001 From: Nadyr <41974248+Darlantanis@users.noreply.github.com> Date: Wed, 12 May 2021 18:20:23 -0400 Subject: [PATCH 13/13] powder that makes you say yes --- code/modules/mob/mob_helpers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 4679565c60..3df55d2715 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -33,7 +33,7 @@ return L.mob_size <= MOB_MINISCULE return 0 -/mob/living/silicon/isSynthetic(var/skip_emote_update) +/mob/living/silicon/isSynthetic() return 1 /mob/proc/isMonkey()