mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 02:56:14 +01:00
Adds a Trait system (#4048)
* Works on trait system, wip. * Finalizes traits. Fixes a few bugs with medical machines assuming a max health of 100.
This commit is contained in:
@@ -142,6 +142,16 @@ var/const/CE_STABLE_THRESHOLD = 0.5
|
||||
//Bleeding out
|
||||
var/blood_max = 0
|
||||
var/blood_loss_divisor = 30 //lower factor = more blood loss
|
||||
|
||||
// Some modifiers can make bleeding better or worse. Higher multiplers = more bleeding.
|
||||
var/blood_loss_modifier_multiplier = 1.0
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.bleeding_rate_percent))
|
||||
blood_loss_modifier_multiplier += (M.bleeding_rate_percent - 1.0)
|
||||
|
||||
blood_loss_divisor /= blood_loss_modifier_multiplier
|
||||
|
||||
|
||||
//This 30 is the "baseline" of a cut in the "vital" regions (head and torso).
|
||||
for(var/obj/item/organ/external/temp in bad_external_organs)
|
||||
if(!(temp.status & ORGAN_BLEEDING) || (temp.robotic >= ORGAN_ROBOT))
|
||||
|
||||
@@ -79,6 +79,11 @@
|
||||
brainmob.dna = H.dna.Clone()
|
||||
brainmob.timeofhostdeath = H.timeofdeath
|
||||
|
||||
// Copy modifiers.
|
||||
for(var/datum/modifier/M in H.modifiers)
|
||||
if(M.flags & MODIFIER_GENETIC)
|
||||
brainmob.add_modifier(M.type)
|
||||
|
||||
if(H.mind)
|
||||
H.mind.transfer_to(brainmob)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user