From 669e869afe8f0fb07f2d8e95a0de68792b12243a Mon Sep 17 00:00:00 2001 From: Samman166 <67894653+Samman166@users.noreply.github.com> Date: Tue, 16 May 2023 23:07:34 -0230 Subject: [PATCH] Apply suggestions from code review Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> --- code/__HELPERS/mob_helpers.dm | 14 ++++++-------- code/modules/projectiles/ammunition.dm | 2 +- code/modules/projectiles/ammunition/magazines.dm | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/code/__HELPERS/mob_helpers.dm b/code/__HELPERS/mob_helpers.dm index 62199022b10..0a7c096beec 100644 --- a/code/__HELPERS/mob_helpers.dm +++ b/code/__HELPERS/mob_helpers.dm @@ -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 diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index a0d25ee80a1..2c9a2d54caf 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -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) diff --git a/code/modules/projectiles/ammunition/magazines.dm b/code/modules/projectiles/ammunition/magazines.dm index 8d027d3ba42..6757852194c 100644 --- a/code/modules/projectiles/ammunition/magazines.dm +++ b/code/modules/projectiles/ammunition/magazines.dm @@ -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