mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] Shadekin and Xenochimera variable refactor (#10872)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
5b1679c8c7
commit
c6b9ab647c
@@ -142,17 +142,21 @@
|
||||
/decl/chemical_reaction/instant/xenolazarus/on_reaction(var/datum/reagents/holder, var/created_volume) //literally all this does is mash the regenerate button
|
||||
if(ishuman(holder.my_atom))
|
||||
var/mob/living/carbon/human/H = holder.my_atom
|
||||
if(H.stat == DEAD && (/mob/living/carbon/human/proc/reconstitute_form in H.verbs)) //no magical regen for non-regenners, and can't force the reaction on live ones
|
||||
if(H.hasnutriment()) // make sure it actually has the conditions to revive
|
||||
if(H.revive_ready >= 1) // if it's not reviving, start doing so
|
||||
H.revive_ready = REVIVING_READY // overrides the normal cooldown
|
||||
H.visible_message(span_info("[H] shudders briefly, then relaxes, faint movements stirring within."))
|
||||
H.chimera_regenerate()
|
||||
else if (/mob/living/carbon/human/proc/hatch in H.verbs)// already reviving, check if they're ready to hatch
|
||||
H.chimera_hatch()
|
||||
H.visible_message(span_danger(span_huge("[H] violently convulses and then bursts open, revealing a new, intact copy in the pool of viscera."))) // Hope you were wearing waterproofs, doc...
|
||||
H.adjustBrainLoss(10) // they're reviving from dead, so take 10 brainloss
|
||||
else //they're already reviving but haven't hatched. Give a little message to tell them to wait.
|
||||
H.visible_message(span_info("[H] stirs faintly, but doesn't appear to be ready to wake up yet."))
|
||||
else
|
||||
H.visible_message(span_info("[H] twitches for a moment, but remains still.")) // no nutriment
|
||||
var/datum/component/xenochimera/comp = H.GetComponent(/datum/component/xenochimera)
|
||||
if(!comp)
|
||||
return
|
||||
else
|
||||
if(H.stat == DEAD)
|
||||
if(H.hasnutriment()) // make sure it actually has the conditions to revive
|
||||
if(comp.revive_ready >= 1) // if it's not reviving, start doing so
|
||||
comp.revive_ready = REVIVING_READY // overrides the normal cooldown
|
||||
H.visible_message(span_info("[H] shudders briefly, then relaxes, faint movements stirring within."))
|
||||
H.chimera_regenerate()
|
||||
else if(comp.revive_ready == REVIVING_DONE)// already reviving, check if they're ready to hatch
|
||||
H.chimera_hatch()
|
||||
H.visible_message(span_danger(span_huge("[H] violently convulses and then bursts open, revealing a new, intact copy in the pool of viscera."))) // Hope you were wearing waterproofs, doc...
|
||||
H.adjustBrainLoss(10) // they're reviving from dead, so take 10 brainloss
|
||||
else //they're already reviving but haven't hatched. Give a little message to tell them to wait.
|
||||
H.visible_message(span_info("[H] stirs faintly, but doesn't appear to be ready to wake up yet."))
|
||||
else
|
||||
H.visible_message(span_info("[H] twitches for a moment, but remains still.")) // no nutriment
|
||||
|
||||
@@ -101,10 +101,11 @@
|
||||
M.adjust_nutrition(alt_nutriment_factor * removed)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.feral > 0 && H.nutrition > 150 && H.traumatic_shock < 20 && H.jitteriness < 100) //Same check as feral triggers to stop them immediately re-feralling
|
||||
H.feral -= removed * 3 // should calm them down quick, provided they're actually in a state to STAY calm.
|
||||
if (H.feral <=0) //check if they're unferalled
|
||||
H.feral = 0
|
||||
var/datum/component/xenochimera/xc = M.get_xenochimera_component()
|
||||
if(xc && xc.feral > 0 && H.nutrition > 150 && H.traumatic_shock < 20 && H.jitteriness < 100) //Same check as feral triggers to stop them immediately re-feralling
|
||||
xc.feral -= removed * 3 // should calm them down quick, provided they're actually in a state to STAY calm.
|
||||
if (xc.feral <=0) //check if they're unferalled
|
||||
xc.feral = 0
|
||||
to_chat(H, span_info("Your mind starts to clear, soothed into a state of clarity as your senses return."))
|
||||
log_and_message_admins("is no longer feral.", H)
|
||||
|
||||
@@ -466,10 +467,11 @@
|
||||
M.nutrition += (alt_nutriment_factor * removed)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.feral > 0 && H.nutrition > 100 && H.traumatic_shock < min(60, H.nutrition/10) && H.jitteriness < 100) // same check as feral triggers to stop them immediately re-feralling
|
||||
H.feral -= removed * 3 // should calm them down quick, provided they're actually in a state to STAY calm.
|
||||
if (H.feral <=0) //check if they're unferalled
|
||||
H.feral = 0
|
||||
var/datum/component/xenochimera/xc = M.get_xenochimera_component()
|
||||
if(xc && xc.feral > 0 && H.nutrition > 100 && H.traumatic_shock < min(60, H.nutrition/10) && H.jitteriness < 100) // same check as feral triggers to stop them immediately re-feralling
|
||||
xc.feral -= removed * 3 // should calm them down quick, provided they're actually in a state to STAY calm.
|
||||
if (xc.feral <=0) //check if they're unferalled
|
||||
xc.feral = 0
|
||||
to_chat(H, span_info("Your mind starts to clear, soothed into a state of clarity as your senses return."))
|
||||
log_and_message_admins("is no longer feral.", H)
|
||||
|
||||
@@ -555,10 +557,11 @@
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.feral > 0 && H.nutrition > 150 && H.traumatic_shock < 20 && H.jitteriness < 100) //Same check as feral triggers to stop them immediately re-feralling
|
||||
H.feral -= removed * 3 //Should calm them down quick, provided they're actually in a state to STAY calm.
|
||||
if(H.feral <=0) //Check if they're unferalled
|
||||
H.feral = 0
|
||||
var/datum/component/xenochimera/xc = M.get_xenochimera_component()
|
||||
if(xc && xc.feral > 0 && H.nutrition > 150 && H.traumatic_shock < 20 && H.jitteriness < 100) //Same check as feral triggers to stop them immediately re-feralling
|
||||
xc.feral -= removed * 3 //Should calm them down quick, provided they're actually in a state to STAY calm.
|
||||
if(xc.feral <=0) //Check if they're unferalled
|
||||
xc.feral = 0
|
||||
to_chat(H, span_info("Your mind starts to clear, soothed into a state of clarity as your senses return."))
|
||||
log_and_message_admins("is no longer feral.", H)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user