diff --git a/code/datums/status_effects/status_effect.dm b/code/datums/status_effects/status_effect.dm index 74abf104465..2580b1c9935 100644 --- a/code/datums/status_effects/status_effect.dm +++ b/code/datums/status_effects/status_effect.dm @@ -5,7 +5,7 @@ /datum/status_effect var/id = "effect" //Used for screen alerts. var/duration = -1 //How long the status effect lasts in DECISECONDS. Enter -1 for an effect that never ends unless removed through some means. - var/tick_interval = 10 //How many deciseconds between ticks, approximately. Leave at 10 for every second. + var/tick_interval = 10 //How many deciseconds between ticks, approximately. Leave at 10 for every second. Setting this to -1 will stop processing if duration is also unlimited. var/mob/living/owner //The mob affected by the status effect. var/status_type = STATUS_EFFECT_UNIQUE //How many of the effect can be on one mob, and what happens when you try to add another var/on_remove_on_mob_delete = FALSE //if we call on_remove() when the mob is deleted @@ -31,7 +31,8 @@ var/obj/screen/alert/status_effect/A = owner.throw_alert(id, alert_type) A.attached_effect = src //so the alert can reference us, if it needs to linked_alert = A //so we can reference the alert, if we need to - START_PROCESSING(SSfastprocess, src) + if(duration > 0 || initial(tick_interval) > 0) //don't process if we don't care + START_PROCESSING(SSfastprocess, src) return TRUE /datum/status_effect/Destroy() diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index f21978db625..4af48e7050a 100644 --- a/code/modules/mining/equipment/kinetic_crusher.dm +++ b/code/modules/mining/equipment/kinetic_crusher.dm @@ -65,6 +65,8 @@ user.drop_l_hand() return var/datum/status_effect/crusher_damage/C = target.has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) + if(!C) + C = target.apply_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) var/target_health = target.health ..() for(var/t in trophies) @@ -101,6 +103,8 @@ if(!CM || CM.hammer_synced != src || !L.remove_status_effect(STATUS_EFFECT_CRUSHERMARK)) return var/datum/status_effect/crusher_damage/C = L.has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) + if(!C) + C = L.apply_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) var/target_health = L.health for(var/t in trophies) var/obj/item/crusher_trophy/T = t diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm index 4ce66ccd1d5..eed05d55e91 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm @@ -43,7 +43,6 @@ . = ..() if(internal_type && true_spawn) internal = new internal_type(src) - apply_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) for(var/action_type in attack_action_types) var/datum/action/innate/megafauna_attack/attack_action = new action_type() attack_action.Grant(src) diff --git a/code/modules/mob/living/simple_animal/hostile/mining/mining.dm b/code/modules/mob/living/simple_animal/hostile/mining/mining.dm index 7c7200e8588..a888fa7ee9a 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/mining.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/mining.dm @@ -23,10 +23,6 @@ var/icon_aggro = null var/crusher_drop_mod = 25 -/mob/living/simple_animal/hostile/asteroid/Initialize(mapload) - . = ..() - apply_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) - /mob/living/simple_animal/hostile/asteroid/Aggro() ..() if(vision_range != aggro_vision_range)