mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-12 08:43:26 +01:00
Merge pull request #1942 from CHOMPStationBot/upstream-merge-10298
[MIRROR] Tweak synth stuff
This commit is contained in:
+15
-12
@@ -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)
|
||||
warning("Global [replacetext("[I]", "InitGlobal", "")] slept during initialization!")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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."))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -97,21 +97,8 @@
|
||||
|
||||
// This is the 'mechanical' check for synthetic-ness, not appearance
|
||||
// Returns the company that made the synthetic
|
||||
/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/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
|
||||
if(!skip_emote_update)
|
||||
update_emotes()
|
||||
return synthetic
|
||||
return FALSE
|
||||
/mob/living/carbon/human/isSynthetic()
|
||||
return synthetic
|
||||
|
||||
// Would an onlooker know this person is synthetic?
|
||||
// Based on sort of logical reasoning, 'Look at head, look at torso'
|
||||
|
||||
@@ -217,8 +217,7 @@
|
||||
|
||||
if(isSynthetic())
|
||||
output += "Current Battery Charge: [nutrition]\n"
|
||||
|
||||
if(isSynthetic())
|
||||
|
||||
var/toxDam = getToxLoss()
|
||||
if(toxDam)
|
||||
output += "System Instability: <span class='warning'>[toxDam > 25 ? "Severe" : "Moderate"]</span>. Seek charging station for cleanup.\n"
|
||||
|
||||
@@ -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"
|
||||
return faction != "neutral" ? "synthetic_evil" : "machine"
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -89,6 +89,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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user