Apply suggestions from code review

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
Samman166
2023-05-16 23:07:34 -02:30
committed by GitHub
co-authored by SteelSlayer
parent 7f189f38d7
commit 669e869afe
3 changed files with 8 additions and 10 deletions
+6 -8
View File
@@ -402,9 +402,8 @@
var/atom/Uloc = user.loc
var/drifting = FALSE
if(!allow_moving)
if(!user.Process_Spacemove(0) && user.inertia_dir)
drifting = TRUE
if(!allow_moving && !user.Process_Spacemove(0) && user.inertia_dir)
drifting = TRUE
var/holding = user.get_active_hand()
@@ -434,7 +433,7 @@
if(drifting && !user.inertia_dir)
drifting = FALSE
Uloc = user.loc
if((!drifting && user.loc != Uloc))
if(!drifting && user.loc != Uloc)
. = FALSE
break
@@ -446,10 +445,9 @@
. = FALSE
break
if(must_be_held)
if(target.loc != user)
. = FALSE
break
if(must_be_held && target.loc != user)
. = FALSE
break
if(needhand)
//This might seem like an odd check, but you can still need a hand even when it's empty
+1 -1
View File
@@ -129,7 +129,7 @@
var/multi_sprite_step = AMMO_MULTI_SPRITE_STEP_NONE // see update_icon_state() for details
var/caliber
var/multiload = 1
var/slow_loading = 0
var/slow_loading = FALSE
var/list/initial_mats //For calculating refund values.
/obj/item/ammo_box/Initialize(mapload)
@@ -259,7 +259,7 @@
max_ammo = 20
multi_sprite_step = 4
multiload = 0
slow_loading = 1
slow_loading = TRUE
w_class = WEIGHT_CLASS_NORMAL
///A var to check if the mag is being loaded
var/being_loaded = FALSE