mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Removes move delay after clicking
This commit is contained in:
@@ -103,10 +103,6 @@
|
||||
// A is your location but is not a turf; or is on you (backpack); or is on something on you (box in backpack); sdepth is needed here because contents depth does not equate inventory storage depth.
|
||||
var/sdepth = A.storage_depth(src)
|
||||
if((!isturf(A) && A == loc) || (sdepth != -1 && sdepth <= 1))
|
||||
// faster access to objects already on you
|
||||
if(A.loc != src)
|
||||
setMoveCooldown(10) //getting something out of a backpack
|
||||
|
||||
if(W)
|
||||
var/resolved = W.resolve_attackby(A, src)
|
||||
if(!resolved && A && W)
|
||||
@@ -127,8 +123,6 @@
|
||||
sdepth = A.storage_depth_turf()
|
||||
if(isturf(A) || isturf(A.loc) || (sdepth != -1 && sdepth <= 1))
|
||||
if(A.Adjacent(src)) // see adjacent.dm
|
||||
setMoveCooldown(5)
|
||||
|
||||
if(W)
|
||||
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
|
||||
var/resolved = W.resolve_attackby(A,src)
|
||||
@@ -198,15 +192,8 @@
|
||||
if((LASER in mutations) && a_intent == I_HURT)
|
||||
LaserEyes(A) // moved into a proc below
|
||||
else if(TK in mutations)
|
||||
switch(get_dist(src,A))
|
||||
if(1 to 5) // not adjacent may mean blocked by window
|
||||
setMoveCooldown(2)
|
||||
if(5 to 7)
|
||||
setMoveCooldown(5)
|
||||
if(8 to tk_maxrange)
|
||||
setMoveCooldown(10)
|
||||
else
|
||||
return
|
||||
if(get_dist(src, A) > tk_maxrange)
|
||||
return
|
||||
A.attack_tk(src)
|
||||
/*
|
||||
Restrained ClickOn
|
||||
|
||||
@@ -107,20 +107,11 @@ var/const/tk_maxrange = 15
|
||||
return
|
||||
|
||||
var/d = get_dist(user, target)
|
||||
if(focus) d = max(d,get_dist(user,focus)) // whichever is further
|
||||
switch(d)
|
||||
if(0)
|
||||
;
|
||||
if(1 to 5) // not adjacent may mean blocked by window
|
||||
if(!proximity)
|
||||
user.setMoveCooldown(2)
|
||||
if(5 to 7)
|
||||
user.setMoveCooldown(5)
|
||||
if(8 to tk_maxrange)
|
||||
user.setMoveCooldown(10)
|
||||
else
|
||||
user << "<span class='notice'>Your mind won't reach that far.</span>"
|
||||
return
|
||||
if(focus)
|
||||
d = max(d, get_dist(user, focus)) // whichever is further
|
||||
if(d > tk_maxrange)
|
||||
user << "<span class='notice'>Your mind won't reach that far.</span>"
|
||||
return
|
||||
|
||||
if(!focus)
|
||||
focus_object(target, user)
|
||||
|
||||
Reference in New Issue
Block a user