mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Made missing limbs not process.
Moved code in processing so that ORGAN_DESTROYED limbs won't process wounds and chemicals. They still need to process once to actually fall off (too lazy to change that) Made dropping limbs remove all wounds and germs. Instead, one big wound is spawned on parent organ. Damage depends on the organ. Removed missing limbs bleeding on their own, since that's what that wound is for now. They still would ache until surgically mended anyway. Fixed possible issue with amputation not fixing the rotten limb.
This commit is contained in:
@@ -128,8 +128,6 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
continue
|
||||
for(var/datum/wound/W in temp.wounds) if(W.bleeding())
|
||||
blood_max += W.damage / 4
|
||||
if(temp.status & ORGAN_DESTROYED && !(temp.status & ORGAN_GAUZED) && !temp.amputated)
|
||||
blood_max += 20 //Yer missing a fucking limb.
|
||||
if (temp.open)
|
||||
blood_max += 2 //Yer stomach is cut open
|
||||
drip(blood_max)
|
||||
|
||||
@@ -291,6 +291,8 @@ This function completely restores a damaged organ to perfect condition.
|
||||
//Determines if we even need to process this organ.
|
||||
|
||||
/datum/organ/external/proc/need_process()
|
||||
if(destspawn) //Missing limb is missing
|
||||
return 0
|
||||
if(status && status != ORGAN_ROBOT) // If it's robotic, that's fine it will have a status.
|
||||
return 1
|
||||
if(brute_dam || burn_dam)
|
||||
@@ -305,17 +307,6 @@ This function completely restores a damaged organ to perfect condition.
|
||||
return 0
|
||||
|
||||
/datum/organ/external/process()
|
||||
// Process wounds, doing healing etc. Only do this every few ticks to save processing power
|
||||
if(owner.life_tick % wound_update_accuracy == 0)
|
||||
update_wounds()
|
||||
|
||||
//Chem traces slowly vanish
|
||||
if(owner.life_tick % 10 == 0)
|
||||
for(var/chemID in trace_chemicals)
|
||||
trace_chemicals[chemID] = trace_chemicals[chemID] - 1
|
||||
if(trace_chemicals[chemID] <= 0)
|
||||
trace_chemicals.Remove(chemID)
|
||||
|
||||
//Dismemberment
|
||||
if(status & ORGAN_DESTROYED)
|
||||
if(!destspawn && config.limbs_can_break)
|
||||
@@ -327,6 +318,17 @@ This function completely restores a damaged organ to perfect condition.
|
||||
owner.update_body(1)
|
||||
return
|
||||
|
||||
// Process wounds, doing healing etc. Only do this every few ticks to save processing power
|
||||
if(owner.life_tick % wound_update_accuracy == 0)
|
||||
update_wounds()
|
||||
|
||||
//Chem traces slowly vanish
|
||||
if(owner.life_tick % 10 == 0)
|
||||
for(var/chemID in trace_chemicals)
|
||||
trace_chemicals[chemID] = trace_chemicals[chemID] - 1
|
||||
if(trace_chemicals[chemID] <= 0)
|
||||
trace_chemicals.Remove(chemID)
|
||||
|
||||
//Bone fracurtes
|
||||
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & ORGAN_ROBOT))
|
||||
src.fracture()
|
||||
@@ -585,13 +587,25 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
src.status &= ~ORGAN_BROKEN
|
||||
src.status &= ~ORGAN_BLEEDING
|
||||
src.status &= ~ORGAN_SPLINTED
|
||||
src.status &= ~ORGAN_DEAD
|
||||
for(var/implant in implants)
|
||||
del(implant)
|
||||
|
||||
germ_level = 0
|
||||
|
||||
//Replace all wounds on that arm with one wound on parent organ.
|
||||
wounds.Cut()
|
||||
if (parent)
|
||||
var/wound_type = get_wound_type(CUT, max_damage)
|
||||
if(wound_type)
|
||||
var/datum/wound/W = new wound_type(max_damage)
|
||||
parent.wounds += W
|
||||
parent.update_damages()
|
||||
update_damages()
|
||||
|
||||
// If any organs are attached to this, destroy them
|
||||
for(var/datum/organ/external/O in owner.organs)
|
||||
if(O.parent == src)
|
||||
O.droplimb(1)
|
||||
for(var/datum/organ/external/O in children)
|
||||
O.droplimb(1)
|
||||
|
||||
var/obj/organ //Dropped limb object
|
||||
switch(body_part)
|
||||
|
||||
Reference in New Issue
Block a user