From 99ca73c6874ffcbba73dbf7fbae427758d2600b4 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 29 Jul 2023 09:24:34 +0200 Subject: [PATCH] [MIRROR] fixes revolvers losing ammo capacity when you load in ammo [MDB IGNORE] (#22762) * fixes revolvers losing ammo capacity when you load in ammo (#77157) ## About The Pull Request fixes https://github.com/tgstation/tgstation/issues/76681 Unfortunately, for revolvers, chambered is whatever is first on the list of stored_ammo rather than that ammo being removed from the magazine. If something works like a revolver does, we don't remove chambered from stored_ammo. ## Why It's Good For The Game The way revolvers work is literally so that we can have russian roulette, just so you know. ## Changelog :cl: fix: Fixes revolvers losing ammo capacity when you reload them. /:cl: * fixes revolvers losing ammo capacity when you load in ammo --------- Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com> --- code/modules/projectiles/guns/ballistic.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 5da546268ed..d2801ed4d6b 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -377,7 +377,8 @@ if (bolt_type == BOLT_TYPE_NO_BOLT || internal_magazine) if (chambered && !chambered.loaded_projectile) chambered.forceMove(drop_location()) - magazine?.stored_ammo -= chambered + if(chambered != magazine?.stored_ammo[1]) + magazine.stored_ammo -= chambered chambered = null var/num_loaded = magazine?.attackby(A, user, params, TRUE) if (num_loaded)