Merge pull request #6048 from Heroman3003/promcore-decay-fix

Fixes promethean cores decaying pointlessly
This commit is contained in:
Neerti
2019-04-08 12:01:02 -04:00
committed by VirgoBot
parent 8a20635d9e
commit fd4dc97a8b
2 changed files with 20 additions and 18 deletions

View File

@@ -152,6 +152,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
name = "slime core"
desc = "A complex, organic knot of jelly and crystalline particles."
icon_state = "core"
decays = FALSE
parent_organ = BP_TORSO
clone_source = TRUE
flags = OPENCONTAINER

View File

@@ -6,30 +6,31 @@ var/list/organ_cache = list()
germ_level = 0
// Strings.
var/organ_tag = "organ" // Unique identifier.
var/parent_organ = BP_TORSO // Organ holding this object.
var/organ_tag = "organ" // Unique identifier.
var/parent_organ = BP_TORSO // Organ holding this object.
// Status tracking.
var/status = 0 // Various status flags
var/vital // Lose a vital limb, die immediately.
var/damage = 0 // Current damage to the organ
var/status = 0 // Various status flags
var/vital // Lose a vital limb, die immediately.
var/damage = 0 // Current damage to the organ
var/robotic = 0
// Reference data.
var/mob/living/carbon/human/owner // Current mob owning the organ.
var/list/transplant_data // Transplant match data.
var/list/autopsy_data = list() // Trauma data for forensics.
var/list/trace_chemicals = list() // Traces of chemicals in the organ.
var/datum/dna/dna // Original DNA.
var/datum/species/species // Original species.
var/mob/living/carbon/human/owner // Current mob owning the organ.
var/list/transplant_data // Transplant match data.
var/list/autopsy_data = list() // Trauma data for forensics.
var/list/trace_chemicals = list() // Traces of chemicals in the organ.
var/datum/dna/dna // Original DNA.
var/datum/species/species // Original species.
// Damage vars.
var/min_bruised_damage = 10 // Damage before considered bruised
var/min_broken_damage = 30 // Damage before becoming broken
var/max_damage // Damage cap
var/can_reject = 1 // Can this organ reject?
var/rejecting // Is this organ already being rejected?
var/preserved = 0 // If this is 1, prevents organ decay.
var/min_bruised_damage = 10 // Damage before considered bruised
var/min_broken_damage = 30 // Damage before becoming broken
var/max_damage // Damage cap
var/can_reject = 1 // Can this organ reject?
var/rejecting // Is this organ already being rejected?
var/decays = TRUE // Can this organ decay at all?
var/preserved = 0 // If this is 1, prevents organ decay.
// Language vars. Putting them here in case we decide to do something crazy with sign-or-other-nonverbal languages.
var/list/will_assist_languages = list()
@@ -135,7 +136,7 @@ var/list/organ_cache = list()
if(B && prob(40))
reagents.remove_reagent("blood",0.1)
blood_splatter(src,B,1)
if(config.organs_decay) damage += rand(1,3)
if(config.organs_decay && decays) damage += rand(1,3)
if(damage >= max_damage)
damage = max_damage
adjust_germ_level(rand(2,6))