mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Tweak synth stuff
This commit is contained in:
@@ -43,19 +43,22 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars)
|
|||||||
return FALSE
|
return FALSE
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/datum/controller/global_vars/Initialize(var/exclude_these)
|
/datum/controller/global_vars/Initialize()
|
||||||
gvars_datum_init_order = list()
|
gvars_datum_init_order = list()
|
||||||
gvars_datum_protected_varlist = list("gvars_datum_protected_varlist")
|
gvars_datum_protected_varlist = list(NAMEOF(src, gvars_datum_protected_varlist) = TRUE)
|
||||||
|
var/list/global_procs = typesof(/datum/controller/global_vars/proc)
|
||||||
//See https://github.com/tgstation/tgstation/issues/26954
|
var/expected_len = vars.len - gvars_datum_in_built_vars.len
|
||||||
for(var/I in typesof(/datum/controller/global_vars/proc))
|
if(global_procs.len != expected_len)
|
||||||
var/CLEANBOT_RETURNS = "[I]"
|
warning("Unable to detect all global initialization procs! Expected [expected_len] got [global_procs.len]!")
|
||||||
pass(CLEANBOT_RETURNS)
|
if(global_procs.len)
|
||||||
|
var/list/expected_global_procs = vars - gvars_datum_in_built_vars
|
||||||
for(var/I in (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
|
var/start_tick = world.time
|
||||||
call(src, "InitGlobal[I]")()
|
call(src, I)()
|
||||||
var/end_tick = world.time
|
var/end_tick = world.time
|
||||||
if(end_tick - start_tick)
|
if(end_tick - start_tick)
|
||||||
warning("Global [I] slept during initialization!")
|
warning("Global [replacetext("[I]", "InitGlobal", "")] slept during initialization!")
|
||||||
QDEL_NULL(exclude_these)
|
|
||||||
|
|||||||
@@ -97,6 +97,7 @@
|
|||||||
|
|
||||||
// This is the 'mechanical' check for synthetic-ness, not appearance
|
// This is the 'mechanical' check for synthetic-ness, not appearance
|
||||||
// Returns the company that made the synthetic
|
// Returns the company that made the synthetic
|
||||||
|
<<<<<<< HEAD
|
||||||
/mob/living/carbon/human/isSynthetic()
|
/mob/living/carbon/human/isSynthetic()
|
||||||
if(synthetic)
|
if(synthetic)
|
||||||
return synthetic //Your synthetic-ness is not going away
|
return synthetic //Your synthetic-ness is not going away
|
||||||
@@ -111,6 +112,25 @@
|
|||||||
update_emotes()
|
update_emotes()
|
||||||
return synthetic
|
return synthetic
|
||||||
return FALSE
|
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?
|
// Would an onlooker know this person is synthetic?
|
||||||
// Based on sort of logical reasoning, 'Look at head, look at torso'
|
// Based on sort of logical reasoning, 'Look at head, look at torso'
|
||||||
|
|||||||
@@ -218,7 +218,6 @@
|
|||||||
if(isSynthetic())
|
if(isSynthetic())
|
||||||
output += "Current Battery Charge: [nutrition]\n"
|
output += "Current Battery Charge: [nutrition]\n"
|
||||||
|
|
||||||
if(isSynthetic())
|
|
||||||
var/toxDam = getToxLoss()
|
var/toxDam = getToxLoss()
|
||||||
if(toxDam)
|
if(toxDam)
|
||||||
output += "System Instability: <span class='warning'>[toxDam > 25 ? "Severe" : "Moderate"]</span>. Seek charging station for cleanup.\n"
|
output += "System Instability: <span class='warning'>[toxDam > 25 ? "Severe" : "Moderate"]</span>. Seek charging station for cleanup.\n"
|
||||||
|
|||||||
@@ -58,6 +58,8 @@
|
|||||||
|
|
||||||
acidtype = "sacid"
|
acidtype = "sacid"
|
||||||
|
|
||||||
|
organ_verbs = list(/mob/living/carbon/human/proc/reagent_purge) //VOREStation Add
|
||||||
|
|
||||||
/obj/item/organ/internal/stomach/machine/handle_organ_proc_special()
|
/obj/item/organ/internal/stomach/machine/handle_organ_proc_special()
|
||||||
..()
|
..()
|
||||||
if(owner && owner.stat != DEAD)
|
if(owner && owner.stat != DEAD)
|
||||||
|
|||||||
@@ -78,6 +78,10 @@
|
|||||||
organ_tag = O_ORCH
|
organ_tag = O_ORCH
|
||||||
parent_organ = BP_TORSO
|
parent_organ = BP_TORSO
|
||||||
vital = TRUE
|
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
|
/obj/item/organ/internal/nano/refactory
|
||||||
name = "refactory module"
|
name = "refactory module"
|
||||||
|
|||||||
@@ -24,7 +24,8 @@
|
|||||||
base_miss_chance = 10
|
base_miss_chance = 10
|
||||||
|
|
||||||
/obj/item/organ/external/chest/robotize()
|
/obj/item/organ/external/chest/robotize()
|
||||||
if(..() && robotic != ORGAN_NANOFORM) //VOREStation Edit
|
if(..() && owner)
|
||||||
|
if(robotic != ORGAN_NANOFORM) //VOREStation Edit
|
||||||
// Give them fancy new organs.
|
// 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_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_VOICE] = new /obj/item/organ/internal/voicebox/robot(owner, 1)
|
||||||
@@ -33,6 +34,14 @@
|
|||||||
owner.internal_organs_by_name[O_HEATSINK] = new /obj/item/organ/internal/robotic/heatsink(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)
|
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()
|
/obj/item/organ/external/chest/handle_germ_effects()
|
||||||
. = ..() //Should return an infection level
|
. = ..() //Should return an infection level
|
||||||
if(!. || (status & ORGAN_DEAD)) return //If it's already above 2, it's become necrotic and we can just not worry about it.
|
if(!. || (status & ORGAN_DEAD)) return //If it's already above 2, it's become necrotic and we can just not worry about it.
|
||||||
@@ -279,7 +288,14 @@
|
|||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/item/organ/external/head/robotize(var/company, var/skip_prosthetics, var/keep_organs)
|
/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()
|
/obj/item/organ/external/head/removed()
|
||||||
if(owner)
|
if(owner)
|
||||||
|
|||||||
Reference in New Issue
Block a user