mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +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
|
||||
break
|
||||
|
||||
if(target.loc != target_loc || user.get_active_hand() != holding)
|
||||
if(target.loc != target_loc)
|
||||
. = 0
|
||||
break
|
||||
|
||||
if(user.get_active_hand() != holding)
|
||||
. = 0
|
||||
break
|
||||
|
||||
if (progbar)
|
||||
qdel(progbar)
|
||||
|
||||
@@ -218,10 +223,6 @@ Proc for attack log creation, because really why not
|
||||
|
||||
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
|
||||
if (progress)
|
||||
progbar = new(user, delay, target)
|
||||
@@ -243,12 +244,6 @@ Proc for attack log creation, because really why not
|
||||
break
|
||||
|
||||
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)
|
||||
. = 0
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user