mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
Renames COOLDOWN_CHECK, fixes some uses (#51763)
This commit is contained in:
@@ -63,7 +63,8 @@
|
||||
|
||||
#define COOLDOWN_START(cd_source, cd_index, cd_time) (cd_source.cd_index = world.time + cd_time)
|
||||
|
||||
#define COOLDOWN_CHECK(cd_source, cd_index) (cd_source.cd_index < world.time)
|
||||
//Returns true if the cooldown has run its course, false otherwise
|
||||
#define COOLDOWN_FINISHED(cd_source, cd_index) (cd_source.cd_index < world.time)
|
||||
|
||||
#define COOLDOWN_RESET(cd_source, cd_index) cd_source.cd_index = 0
|
||||
|
||||
|
||||
@@ -537,7 +537,7 @@
|
||||
if(!isturf(owner.loc)) //Don't let the player use this to escape mechs/welded closets.
|
||||
to_chat(owner, "<span class='warning'>You need more space to activate this implant!</span>")
|
||||
return
|
||||
if(COOLDOWN_CHECK(src, box_cooldown))
|
||||
if(!COOLDOWN_FINISHED(src, box_cooldown))
|
||||
return
|
||||
COOLDOWN_START(src, box_cooldown, 10 SECONDS)
|
||||
var/box = new boxtype(owner.drop_location())
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
damage *= 0.75
|
||||
|
||||
|
||||
if(!COOLDOWN_CHECK(src, caltrop_cooldown))
|
||||
if(COOLDOWN_FINISHED(src, caltrop_cooldown))
|
||||
COOLDOWN_START(src, caltrop_cooldown, 1 SECONDS) //cooldown to avoid message spam.
|
||||
var/atom/A = parent
|
||||
if(!H.incapacitated(ignore_restraints = TRUE))
|
||||
|
||||
@@ -404,7 +404,7 @@
|
||||
/obj/machinery/door/airlock/proc/shock(mob/living/user, prb)
|
||||
if(!istype(user) || !hasPower()) // unpowered, no shock
|
||||
return FALSE
|
||||
if(COOLDOWN_CHECK(src, shockCooldown))
|
||||
if(!COOLDOWN_FINISHED(src, shockCooldown))
|
||||
return FALSE //Already shocked someone recently?
|
||||
if(!prob(prb))
|
||||
return FALSE //you lucked out, no shock for you
|
||||
|
||||
Reference in New Issue
Block a user