mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Shortens the in-hand check
This commit is contained in:
@@ -201,9 +201,14 @@ Proc for attack log creation, because really why not
|
|||||||
. = 0
|
. = 0
|
||||||
break
|
break
|
||||||
|
|
||||||
if(target.loc != target_loc || user.get_active_hand() != holding)
|
if(target.loc != target_loc)
|
||||||
. = 0
|
. = 0
|
||||||
break
|
break
|
||||||
|
|
||||||
|
if(user.get_active_hand() != holding)
|
||||||
|
. = 0
|
||||||
|
break
|
||||||
|
|
||||||
if (progbar)
|
if (progbar)
|
||||||
qdel(progbar)
|
qdel(progbar)
|
||||||
|
|
||||||
@@ -218,10 +223,6 @@ Proc for attack log creation, because really why not
|
|||||||
|
|
||||||
var/holding = user.get_active_hand()
|
var/holding = user.get_active_hand()
|
||||||
|
|
||||||
var/holdingnull = 1 //User's hand started out empty, check for an empty hand
|
|
||||||
if(holding)
|
|
||||||
holdingnull = 0 //Users hand started holding something, check to see if it's still holding that
|
|
||||||
|
|
||||||
var/datum/progressbar/progbar
|
var/datum/progressbar/progbar
|
||||||
if (progress)
|
if (progress)
|
||||||
progbar = new(user, delay, target)
|
progbar = new(user, delay, target)
|
||||||
@@ -243,12 +244,6 @@ Proc for attack log creation, because really why not
|
|||||||
break
|
break
|
||||||
|
|
||||||
if(needhand)
|
if(needhand)
|
||||||
//This might seem like an odd check, but you can still need a hand even when it's empty
|
|
||||||
//i.e the hand is used to pull some item/tool out of the construction
|
|
||||||
if(!holdingnull)
|
|
||||||
if(!holding)
|
|
||||||
. = 0
|
|
||||||
break
|
|
||||||
if(user.get_active_hand() != holding)
|
if(user.get_active_hand() != holding)
|
||||||
. = 0
|
. = 0
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user