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

@@ -29,6 +29,7 @@ var/list/organ_cache = list()
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.
@@ -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))