Skip to content

Commit

Permalink
right addtimer fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskog committed Jul 9, 2020
1 parent f9ed2ab commit bdb1c29
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions code/game/objects/effects/glowshroom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
else //if on the floor, glowshroom on-floor sprite
icon_state = base_icon_state

timers["spread"] = addtimer(CALLBACK(src, .proc/Spread), delay_spread)
timers["decay"] = addtimer(CALLBACK(src, .proc/Decay), delay_decay, FALSE) // Start decaying the plant
addtimer(CALLBACK(src, .proc/Spread), delay_spread)
addtimer(CALLBACK(src, .proc/Decay), delay_decay, FALSE) // Start decaying the plant

/**
* Causes glowshroom spreading across the floor/walls.
Expand Down Expand Up @@ -149,9 +149,9 @@
shrooms_planted++

CHECK_TICK
if(shrooms_planted <= myseed.yield) //if we didn't get all possible shrooms planted, try again later
if(!QDELETED(src) && shrooms_planted <= myseed.yield) //if we didn't get all possible shrooms planted, try again later
myseed.adjust_yield(-shrooms_planted)
timers["spread"] = addtimer(CALLBACK(src, .proc/Spread), delay_spread)
addtimer(CALLBACK(src, .proc/Spread), delay_spread)

/obj/structure/glowshroom/proc/CalcDir(turf/location = loc)
var/direction = 16
Expand Down Expand Up @@ -198,7 +198,7 @@
else // Timed decay
myseed.endurance -= 1
if (myseed.endurance > 0)
timers["decay"] = addtimer(CALLBACK(src, .proc/Decay), delay_decay, FALSE) // Recall decay timer
addtimer(CALLBACK(src, .proc/Decay), delay_decay, FALSE) // Recall decay timer
return
if (myseed.endurance < 1) // Plant is gone
qdel(src)
Expand Down

0 comments on commit bdb1c29

Please sign in to comment.