From 0bcbe8767d7a781bfded7392e152f18232e72fb6 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Sun, 1 Jun 2025 19:23:46 +0200 Subject: [PATCH] Fixes revolver reloading, again (#91414) ## About The Pull Request Closes #91110, broke due to lazyloaded bullets being considered empty This needs a unit test, maybe will write one later in a separate PR ## Changelog :cl: fix: Fixed revolver reloading, again /:cl: --- code/modules/projectiles/boxes_magazines/internal/_cylinder.dm | 2 +- code/modules/projectiles/guns/ballistic/revolver.dm | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/code/modules/projectiles/boxes_magazines/internal/_cylinder.dm b/code/modules/projectiles/boxes_magazines/internal/_cylinder.dm index 7f467881a9d..93e96105871 100644 --- a/code/modules/projectiles/boxes_magazines/internal/_cylinder.dm +++ b/code/modules/projectiles/boxes_magazines/internal/_cylinder.dm @@ -44,7 +44,7 @@ for(var/i in 1 to stored_ammo.len) var/obj/item/ammo_casing/bullet = stored_ammo[i] - if (istype(bullet) && bullet.loaded_projectile) + if (!istype(bullet) || bullet.loaded_projectile) continue // found a spent ammo stored_ammo[i] = R diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index 19feca04b16..06a8b50c566 100644 --- a/code/modules/projectiles/guns/ballistic/revolver.dm +++ b/code/modules/projectiles/guns/ballistic/revolver.dm @@ -21,7 +21,6 @@ if(.) last_fire = world.time - /obj/item/gun/ballistic/revolver/chamber_round(spin_cylinder = TRUE, replace_new_round) if(!magazine) //if it mag was qdel'd somehow. CRASH("revolver tried to chamber a round without a magazine!") @@ -58,7 +57,6 @@ if(play_click) playsound(src, 'sound/items/weapons/gun/general/ballistic_click.ogg', fire_sound_volume, vary_fire_sound, frequency = click_frequency_to_use) - /obj/item/gun/ballistic/revolver/verb/spin() set name = "Spin Chamber" set category = "Object"