From 98f0c9abd65e73d7ce89b48ff02eee8073f27be2 Mon Sep 17 00:00:00 2001 From: thgvr Date: Sat, 5 Oct 2024 09:58:48 -0700 Subject: [PATCH] unused var, no sushi stacks --- .../projectiles/ammunition/_ammo_casing.dm | 15 ++++++--------- .../boxes_magazines/ammo_stacks/_ammo_stack.dm | 2 +- .../ammo_stacks/prefab_stacks/_premade_stacks.dm | 3 +-- shiptest.dme | 9 ++++++++- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/code/modules/projectiles/ammunition/_ammo_casing.dm b/code/modules/projectiles/ammunition/_ammo_casing.dm index b4d44c938b91..23afe19ea294 100644 --- a/code/modules/projectiles/ammunition/_ammo_casing.dm +++ b/code/modules/projectiles/ammunition/_ammo_casing.dm @@ -47,8 +47,6 @@ ///What this casing can be stacked into. var/obj/item/ammo_box/magazine/stack_type = /obj/item/ammo_box/magazine/ammo_stack - ///TRUE if the ammo stack is generic and we should give it info based on the casing - var/generic_stacking = TRUE ///Maximum stack size of ammunition var/stack_size = 12 @@ -105,15 +103,15 @@ if(user) to_chat(user, span_warning("[src] can't be stacked.")) return - if(caliber != other_casing.caliber) + if(name != other_casing.name) //Has to match exactly if(user) - to_chat(user, span_warning("You can't stack different calibers.")) + to_chat(user, span_warning("You can't stack different types of ammunition.")) return if(stack_type != other_casing.stack_type) if(user) to_chat(user, span_warning("You can't stack [other_casing] with [src].")) return - if(!BB || !other_casing.BB) + if(!BB || !other_casing.BB) //maybe allow empty casing stacking at a later date, when there's a feature to recycle casings if(user) to_chat(user, span_warning("You can't stack empty casings.")) return @@ -129,10 +127,9 @@ /obj/item/ammo_casing/proc/stack_with(obj/item/ammo_casing/other_casing) var/obj/item/ammo_box/magazine/ammo_stack/ammo_stack = new stack_type(drop_location()) - if(generic_stacking) - ammo_stack.name = "handful of [caliber] rounds" - ammo_stack.base_icon_state = initial(icon_state) - ammo_stack.caliber = caliber + ammo_stack.name = "handful of [name]s" //"handful of .9mm bullet casings" + ammo_stack.base_icon_state = other_casing.icon_state + ammo_stack.caliber = caliber ammo_stack.max_ammo = stack_size ammo_stack.give_round(src) ammo_stack.give_round(other_casing) diff --git a/code/modules/projectiles/boxes_magazines/ammo_stacks/_ammo_stack.dm b/code/modules/projectiles/boxes_magazines/ammo_stacks/_ammo_stack.dm index 852798ec11ac..f1e84780cb1e 100644 --- a/code/modules/projectiles/boxes_magazines/ammo_stacks/_ammo_stack.dm +++ b/code/modules/projectiles/boxes_magazines/ammo_stacks/_ammo_stack.dm @@ -28,7 +28,7 @@ var/image/bullet = image(initial(icon), src, "[base_icon_state]") bullet.pixel_x = rand(-8, 8) bullet.pixel_y = rand(-8, 8) - bullet.transform = bullet.transform.Turn(round(45 * rand(0, 32) / 2)) + bullet.transform = bullet.transform.Turn(round(45 * rand(0, 32) / 2)) //this is the equation Eris uses on their bullet stacks add_overlay(bullet) return UPDATE_ICON_STATE | UPDATE_OVERLAYS diff --git a/code/modules/projectiles/boxes_magazines/ammo_stacks/prefab_stacks/_premade_stacks.dm b/code/modules/projectiles/boxes_magazines/ammo_stacks/prefab_stacks/_premade_stacks.dm index 0ebc20b3a5ef..6f9ae74e61f9 100644 --- a/code/modules/projectiles/boxes_magazines/ammo_stacks/prefab_stacks/_premade_stacks.dm +++ b/code/modules/projectiles/boxes_magazines/ammo_stacks/prefab_stacks/_premade_stacks.dm @@ -1,12 +1,11 @@ /obj/item/ammo_box/magazine/ammo_stack/prefilled /obj/item/ammo_box/magazine/ammo_stack/prefilled/Initialize(mapload) - var/obj/item/ammo_casing/to_copy = ammo_type src.top_off() caliber = to_copy.caliber base_icon_state = to_copy.icon_state - name = "handful of [to_copy.caliber] rounds" + name = "handful of [name]s" update_appearance() . = ..() diff --git a/shiptest.dme b/shiptest.dme index ca55661e5662..15bb024014c5 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -3022,8 +3022,15 @@ #include "code\modules\projectiles\ammunition\special\syringe.dm" #include "code\modules\projectiles\boxes_magazines\_box_magazine.dm" #include "code\modules\projectiles\boxes_magazines\ammo_boxes.dm" -#include "code\modules\projectiles\boxes_magazines\ammo_stack.dm" #include "code\modules\projectiles\boxes_magazines\generic_ammo_box.dm" +#include "code\modules\projectiles\boxes_magazines\ammo_stacks\_ammo_stack.dm" +#include "code\modules\projectiles\boxes_magazines\ammo_stacks\prefab_stacks\_premade_stacks.dm" +#include "code\modules\projectiles\boxes_magazines\ammo_stacks\prefab_stacks\premade_lmg_stacks.dm" +#include "code\modules\projectiles\boxes_magazines\ammo_stacks\prefab_stacks\premade_pistol_stacks.dm" +#include "code\modules\projectiles\boxes_magazines\ammo_stacks\prefab_stacks\premade_rifle_stacks.dm" +#include "code\modules\projectiles\boxes_magazines\ammo_stacks\prefab_stacks\premade_smg_stacks.dm" +#include "code\modules\projectiles\boxes_magazines\ammo_stacks\prefab_stacks\premade_sniper_stacks.dm" +#include "code\modules\projectiles\boxes_magazines\ammo_stacks\prefab_stacks\shotshell_stacks.dm" #include "code\modules\projectiles\boxes_magazines\external\gauss.dm" #include "code\modules\projectiles\boxes_magazines\external\grenade.dm" #include "code\modules\projectiles\boxes_magazines\external\lmg.dm"