refactor another spawn cooldown (#1392)
This commit is contained in:
committed by
kevinz000
parent
1c1cbe8e5b
commit
9023e0ff67
@@ -111,7 +111,7 @@
|
||||
"<span class='warning'>You bop [M] on the head!</span>")
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1, -1)
|
||||
if(2)
|
||||
if(!scooldown)
|
||||
if(scooldown < world.time)
|
||||
if(M.health >= 0)
|
||||
if(ishuman(M)||ismonkey(M))
|
||||
M.electrocute_act(5, "[user]", safety = 1)
|
||||
@@ -128,11 +128,9 @@
|
||||
"<span class='danger'>You shock [M] to no effect.</span>")
|
||||
playsound(loc, 'sound/effects/sparks2.ogg', 50, 1, -1)
|
||||
user.cell.charge -= 500
|
||||
scooldown = TRUE
|
||||
spawn(20)
|
||||
scooldown = FALSE
|
||||
scooldown = world.time + 20
|
||||
if(3)
|
||||
if(!ccooldown)
|
||||
if(ccooldown < world.time)
|
||||
if(M.health >= 0)
|
||||
if(ishuman(M))
|
||||
user.visible_message("<span class='userdanger'>[user] crushes [M] in their grip!</span>", \
|
||||
@@ -143,9 +141,7 @@
|
||||
playsound(loc, 'sound/weapons/smash.ogg', 50, 1, -1)
|
||||
M.adjustBruteLoss(15)
|
||||
user.cell.charge -= 300
|
||||
ccooldown = TRUE
|
||||
spawn(10)
|
||||
ccooldown = FALSE
|
||||
ccooldown = world.time + 10
|
||||
|
||||
/obj/item/borg/cyborghug/peacekeeper
|
||||
shockallowed = TRUE
|
||||
|
||||
Reference in New Issue
Block a user