From d8179e74dd9daa7929dbff52c7607487a8bd49c5 Mon Sep 17 00:00:00 2001 From: Kirie Saito <77302679+Kitsunemitsu@users.noreply.github.com> Date: Thu, 9 May 2024 17:19:24 -0400 Subject: [PATCH] various fixes --- code/modules/projectiles/guns/ego_gun.dm | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/code/modules/projectiles/guns/ego_gun.dm b/code/modules/projectiles/guns/ego_gun.dm index 7d226fc180aa..7649a3e73944 100644 --- a/code/modules/projectiles/guns/ego_gun.dm +++ b/code/modules/projectiles/guns/ego_gun.dm @@ -150,16 +150,19 @@ return ..() /obj/item/gun/ego_gun/attack_self(mob/user) - if(reloadtime) - is_reloading = TRUE - to_chat(user,span_notice("You start loading a new magazine.")) - playsound(src, 'sound/weapons/gun/general/slide_lock_1.ogg', 50, TRUE) - if(do_after(user, reloadtime, src)) //gotta reload - playsound(src, 'sound/weapons/gun/general/bolt_rack.ogg', 50, TRUE) - shotsleft = initial(shotsleft) - is_reloading = FALSE + if(reloadtime && !is_reloading) + INVOKE_ASYNC(src, PROC_REF(reload_ego), user) ..() +/obj/item/gun/ego_gun/proc/reload_ego(mob/user) + is_reloading = TRUE + to_chat(user,span_notice("You start loading a new magazine.")) + playsound(src, 'sound/weapons/gun/general/slide_lock_1.ogg', 50, TRUE) + if(do_after(user, reloadtime, src)) //gotta reload + playsound(src, 'sound/weapons/gun/general/bolt_rack.ogg', 50, TRUE) + shotsleft = initial(shotsleft) + is_reloading = FALSE + //Examine text for pistols. /obj/item/gun/ego_gun/pistol/examine(mob/user) . = ..()