mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-11 07:02:32 +01:00
mob/living/Life() now handles mutations and radiation.
This commit is contained in:
@@ -14,9 +14,6 @@
|
||||
// GROW!
|
||||
update_progression()
|
||||
|
||||
// Radiation.
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
// Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
@@ -33,7 +30,7 @@
|
||||
/mob/living/carbon/alien/proc/handle_chemicals_in_body()
|
||||
return // Nothing yet. Maybe check it out at a later date.
|
||||
|
||||
/mob/living/carbon/alien/proc/handle_mutations_and_radiation()
|
||||
/mob/living/carbon/alien/handle_mutations_and_radiation()
|
||||
|
||||
// Currently both Dionaea and larvae like to eat radiation, so I'm defining the
|
||||
// rad absorbtion here. This will need to be changed if other baby aliens are added.
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
..()
|
||||
|
||||
if(stat != DEAD)
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
@@ -26,7 +23,7 @@
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
/mob/living/carbon/brain/proc/handle_mutations_and_radiation()
|
||||
/mob/living/carbon/brain/handle_mutations_and_radiation()
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
//to find it.
|
||||
blinded = null
|
||||
fire_alert = 0 //Reset this here, because both breathe() and handle_environment() have a chance to set it.
|
||||
..()
|
||||
|
||||
//TODO: seperate this out
|
||||
// update the current life tick, can be used to e.g. only do something every 4 ticks
|
||||
@@ -65,9 +66,6 @@
|
||||
//Updates the number of stored chemicals for powers
|
||||
handle_changeling()
|
||||
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
@@ -119,6 +117,10 @@
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
G.process()
|
||||
|
||||
/mob/living/carbon/human/breathe()
|
||||
if(!in_stasis)
|
||||
..()
|
||||
|
||||
// Calculate how vulnerable the human is to under- and overpressure.
|
||||
// Returns 0 (equals 0 %) if sealed in an undamaged suit, 1 if unprotected (equals 100%).
|
||||
// Suitdamage can modifiy this in 10% steps.
|
||||
@@ -248,7 +250,10 @@
|
||||
// as cloneloss
|
||||
adjustCloneLoss(0.1)
|
||||
|
||||
/mob/living/carbon/human/proc/handle_mutations_and_radiation()
|
||||
/mob/living/carbon/human/handle_mutations_and_radiation()
|
||||
if(in_stasis)
|
||||
return
|
||||
|
||||
if(getFireLoss())
|
||||
if((COLD_RESISTANCE in mutations) || (prob(1)))
|
||||
heal_organ_damage(0,1)
|
||||
|
||||
@@ -12,16 +12,20 @@
|
||||
//Breathing, if applicable
|
||||
handle_breathing()
|
||||
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
. = 1
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
if(environment)
|
||||
handle_environment(environment)
|
||||
|
||||
return .
|
||||
|
||||
/mob/living/proc/handle_breathing()
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_mutations_and_radiation()
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_environment(var/datum/gas_mixture/environment)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user