From 836139bb0b56d19ae7001abeeb2b06b1259a0cb4 Mon Sep 17 00:00:00 2001 From: fallcon Date: Wed, 25 Sep 2024 09:30:11 -0500 Subject: [PATCH] two tweaks to fix bugs with null default_ammo_types --- code/modules/projectiles/guns/ballistic.dm | 2 +- code/modules/projectiles/guns/energy.dm | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index ad042d2b7d5f..6db5af362338 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -40,7 +40,7 @@ bolt_locked = TRUE update_appearance() return - if (!magazine) + if (!magazine && default_ammo_type) magazine = new default_ammo_type(src) if (!default_ammo_type) get_ammo_list (drop_all = TRUE) diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 40ee322d504e..a7cbfa81dcff 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -61,8 +61,6 @@ . = ..() if(default_ammo_type) cell = new default_ammo_type(src) - else - cell = new(src) if(dead_cell) cell.use(cell.maxcharge) update_ammo_types()