Get your clicks out of my movement code

This commit is contained in:
Aronai Sieyes
2020-04-30 15:40:41 -04:00
parent 03e2c9b5a5
commit 99fa98f437
15 changed files with 24 additions and 29 deletions
@@ -1398,7 +1398,7 @@
set desc = "Pop a joint back into place. Extremely painful."
set src in view(1)
if(!isliving(usr) || !usr.canClick())
if(!isliving(usr) || !usr.checkClickCooldown())
return
usr.setClickCooldown(20)
+1 -1
View File
@@ -895,7 +895,7 @@ default behaviour is:
set name = "Resist"
set category = "IC"
if(!incapacitated(INCAPACITATION_KNOCKOUT) && canClick())
if(!incapacitated(INCAPACITATION_KNOCKOUT) && checkClickCooldown())
setClickCooldown(20)
resist_grab()
if(!weakened)
+1 -1
View File
@@ -912,7 +912,7 @@ mob/proc/yank_out_object()
set desc = "Remove an embedded item at the cost of bleeding and pain."
set src in view(1)
if(!isliving(usr) || !usr.canClick())
if(!isliving(usr) || !usr.checkClickCooldown())
return
usr.setClickCooldown(20)
+1 -2
View File
@@ -7,8 +7,7 @@
var/datum/mind/mind
var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak
var/move_delay = null // For movement speed delays.
var/next_move = null // For click delay, despite the misleading name.
var/next_move = null // world.time when mob is next allowed to self-move.
//Not in use yet
var/obj/effect/organstructure/organStructure = null
+1 -1
View File
@@ -239,7 +239,7 @@
return
if(state == GRAB_UPGRADING)
return
if(!assailant.canClick())
if(!assailant.checkClickCooldown())
return
if(world.time < (last_action + UPGRADE_COOLDOWN))
return