This commit is contained in:
EmeraldSundisk
2020-07-04 21:33:29 -07:00
parent 99168e3ed0
commit c6b5bac0d8
871 changed files with 411113 additions and 96055 deletions
+4 -5
View File
@@ -6,7 +6,6 @@
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/next_tick //The scheduled time for the next tick.
var/mob/living/owner //The mob affected by the status effect.
var/on_remove_on_mob_delete = FALSE //if we call on_remove() when the mob is deleted
var/examine_text //If defined, this text will appear when the mob is examined - to use he, she etc. use "SUBJECTPRONOUN" and replace it in the examines themselves
@@ -32,7 +31,7 @@
return
if(duration != -1)
duration = world.time + duration
next_tick = world.time + tick_interval
tick_interval = world.time + tick_interval
if(alert_type)
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
@@ -53,9 +52,9 @@
if(!owner)
qdel(src)
return
if(next_tick < world.time)
if(tick_interval < world.time)
tick()
next_tick = world.time + tick_interval
tick_interval = world.time + initial(tick_interval)
if(duration != -1 && duration < world.time)
qdel(src)
@@ -222,7 +221,7 @@
threshold_crossed = FALSE //resets threshold effect if we fall below threshold so threshold effect can trigger again
on_threshold_drop()
if(stacks_added > 0)
next_tick += delay_before_decay //refreshes time until decay
tick_interval += delay_before_decay //refreshes time until decay
stacks = min(stacks, max_stacks)
status_overlay.icon_state = "[overlay_state][stacks]"
status_underlay.icon_state = "[underlay_state][stacks]"