From d5d3b3dcdd799d7a71d9014fd4af52aadd454d8a Mon Sep 17 00:00:00 2001 From: thgvr Date: Tue, 8 Oct 2024 14:56:08 -0700 Subject: [PATCH] more --- .../projectiles/ammunition/_ammo_casing.dm | 2 - .../projectiles/ammunition/ballistic/lmg.dm | 1 - .../ammunition/ballistic/pistol.dm | 6 - .../ammunition/ballistic/revolver.dm | 3 - .../projectiles/ammunition/ballistic/rifle.dm | 9 -- .../ammunition/ballistic/shotgun.dm | 3 +- .../projectiles/ammunition/ballistic/smg.dm | 4 - .../ammunition/ballistic/sniper.dm | 1 - .../projectiles/ammunition/caseless/foam.dm | 1 - .../prefab_stacks/premade_shotshell_stacks.dm | 2 +- .../prefab_stacks/premade_smg_stacks.dm | 1 + .../boxes_magazines/generic_ammo_box.dm | 104 +++++++++--------- .../research/designs/autolathe_designs.dm | 14 +-- 13 files changed, 62 insertions(+), 89 deletions(-) diff --git a/code/modules/projectiles/ammunition/_ammo_casing.dm b/code/modules/projectiles/ammunition/_ammo_casing.dm index 19e1965939b9..57b6e9b27b57 100644 --- a/code/modules/projectiles/ammunition/_ammo_casing.dm +++ b/code/modules/projectiles/ammunition/_ammo_casing.dm @@ -43,8 +43,6 @@ ///If true, overrides the bouncing sfx from the turf to this one var/list/bounce_sfx_override - var/bullet_per_box - ///What this casing can be stacked into. var/obj/item/ammo_box/magazine/stack_type = /obj/item/ammo_box/magazine/ammo_stack ///Maximum stack size of ammunition diff --git a/code/modules/projectiles/ammunition/ballistic/lmg.dm b/code/modules/projectiles/ammunition/ballistic/lmg.dm index d46001951ba4..90030e7b0944 100644 --- a/code/modules/projectiles/ammunition/ballistic/lmg.dm +++ b/code/modules/projectiles/ammunition/ballistic/lmg.dm @@ -6,7 +6,6 @@ icon_state = "rifle-steel" caliber = "7.12x82mm" projectile_type = /obj/projectile/bullet/mm712x82 - bullet_per_box = 100 /obj/item/ammo_casing/mm712x82/ap name = "7.12x82mm armor-piercing bullet casing" diff --git a/code/modules/projectiles/ammunition/ballistic/pistol.dm b/code/modules/projectiles/ammunition/ballistic/pistol.dm index 80248255dcaf..08ea32d2bc16 100644 --- a/code/modules/projectiles/ammunition/ballistic/pistol.dm +++ b/code/modules/projectiles/ammunition/ballistic/pistol.dm @@ -6,7 +6,6 @@ icon_state = "pistol-steel" caliber = "10mm" projectile_type = /obj/projectile/bullet/c10mm - bullet_per_box = 50 /obj/item/ammo_casing/c10mm/surplus name = "10mm surplus bullet casing" @@ -46,7 +45,6 @@ icon_state = "pistol-brass" caliber = "9mm" projectile_type = /obj/projectile/bullet/c9mm - bullet_per_box = 50 /obj/item/ammo_casing/c9mm/surplus name = "9mm surplus bullet casing" @@ -86,7 +84,6 @@ icon_state = "pistol-steel" caliber = ".45" projectile_type = /obj/projectile/bullet/c45 - bullet_per_box = 50 stack_size = 12 /obj/item/ammo_casing/c45/surplus @@ -126,7 +123,6 @@ desc = "A .50 AE bullet casing." caliber = ".50 AE" projectile_type = /obj/projectile/bullet/a50AE - bullet_per_box = 20 /obj/item/ammo_casing/a50AE/hp name = ".50 AE hollow point bullet casing" @@ -139,5 +135,3 @@ desc = "A .22 LR bullet casing." projectile_type = /obj/projectile/bullet/c22lr caliber = "22lr" - bullet_per_box = 75 - diff --git a/code/modules/projectiles/ammunition/ballistic/revolver.dm b/code/modules/projectiles/ammunition/ballistic/revolver.dm index 43f750844ea4..32a9ef2f123d 100644 --- a/code/modules/projectiles/ammunition/ballistic/revolver.dm +++ b/code/modules/projectiles/ammunition/ballistic/revolver.dm @@ -6,7 +6,6 @@ caliber = ".357" icon_state = "magnum-brass" projectile_type = /obj/projectile/bullet/a357 - bullet_per_box = 50 /obj/item/ammo_casing/a357/match name = ".357 match bullet casing" @@ -29,7 +28,6 @@ caliber = ".45-70" icon_state = "magnum-brass" projectile_type = /obj/projectile/bullet/a4570 - bullet_per_box = 12 /obj/item/ammo_casing/a4570/match name = ".45-70 match bullet casing" @@ -55,7 +53,6 @@ desc = "A .38 Special bullet casing." caliber = ".38" projectile_type = /obj/projectile/bullet/c38 - bullet_per_box = 50 /obj/item/ammo_casing/c38/surplus name = ".38 surplus bullet casing" diff --git a/code/modules/projectiles/ammunition/ballistic/rifle.dm b/code/modules/projectiles/ammunition/ballistic/rifle.dm index 4c07398630f2..a3ef6798a52c 100644 --- a/code/modules/projectiles/ammunition/ballistic/rifle.dm +++ b/code/modules/projectiles/ammunition/ballistic/rifle.dm @@ -6,7 +6,6 @@ icon_state = "rifle-brass" caliber = "8x50mmR" projectile_type = /obj/projectile/bullet/a8_50r - bullet_per_box = 20 /obj/item/ammo_casing/a8_50rhp name = "8x50mmR hollow point bullet casing" @@ -23,7 +22,6 @@ icon_state = "caseless" caliber = "a858" projectile_type = /obj/projectile/bullet/a858 - bullet_per_box = 20 // .300 Magnum (Smile Rifle) @@ -33,7 +31,6 @@ icon_state = "rifle-steel" caliber = "a300" projectile_type = /obj/projectile/bullet/a300 - bullet_per_box = 20 // 5.56x42mm CLIP (CM82, Hydra variants) @@ -43,8 +40,6 @@ icon_state = "rifle-brass" caliber = "5.56x42mm" projectile_type = /obj/projectile/bullet/a556_42 - bullet_per_box = 80 - // 5.45x39mm (SKM-24v) /obj/item/ammo_casing/a545_39 @@ -54,7 +49,6 @@ caliber = "5.45x39mm" randomspread = TRUE projectile_type = /obj/projectile/bullet/a545_39 - bullet_per_box = 80 /obj/item/ammo_casing/a545_39/recycled name = "recycled 5.45x39mm bullet casing" @@ -71,7 +65,6 @@ icon_state = "rifle-brass" caliber = "7.62x40mm" projectile_type = /obj/projectile/bullet/a762_40 - bullet_per_box = 80 //.308 (M514 EBR & CM-GAL-S) @@ -81,7 +74,6 @@ icon_state = "rifle-brass" caliber = ".308" projectile_type = /obj/projectile/bullet/a308 - bullet_per_box = 20 /obj/item/ammo_casing/caseless/c299 name = ".299 Eoehoma caseless bullet casing" @@ -89,7 +81,6 @@ icon_state = "caseless" caliber = ".299 caseless" projectile_type = /obj/projectile/bullet/c299 - bullet_per_box = 100 /obj/item/ammo_casing/a65clip name = "6.5x57mm CLIP bullet casing" diff --git a/code/modules/projectiles/ammunition/ballistic/shotgun.dm b/code/modules/projectiles/ammunition/ballistic/shotgun.dm index 35a3c4ddb4d6..2bf041a0e661 100644 --- a/code/modules/projectiles/ammunition/ballistic/shotgun.dm +++ b/code/modules/projectiles/ammunition/ballistic/shotgun.dm @@ -7,8 +7,7 @@ caliber = "12ga" custom_materials = list(/datum/material/iron=4000) projectile_type = /obj/projectile/bullet/slug - stack_size = 8 //Not too big of a handful, not too small - bullet_per_box = 25 + stack_size = 8 //Make sure this matches max_ammo variable on prefilled stacks (magazine/ammo_stack/prefilled) bounce_sfx_override = 'sound/weapons/gun/general/bulletcasing_shotgun_bounce.ogg' diff --git a/code/modules/projectiles/ammunition/ballistic/smg.dm b/code/modules/projectiles/ammunition/ballistic/smg.dm index 39086b8cc66f..f7591d4be582 100644 --- a/code/modules/projectiles/ammunition/ballistic/smg.dm +++ b/code/modules/projectiles/ammunition/ballistic/smg.dm @@ -6,7 +6,6 @@ icon_state = "rifle-steel" caliber = "5.7x39mm" projectile_type = /obj/projectile/bullet/c57x39mm - bullet_per_box = 50 // 4.6x30mm (WT-550 Automatic Rifle & SKM-24v) @@ -16,7 +15,6 @@ icon_state = "rifle-brass" caliber = "4.6x30mm" projectile_type = /obj/projectile/bullet/c46x30mm - bullet_per_box = 50 /obj/item/ammo_casing/c46x30mm/ap name = "4.6x30mm armor-piercing bullet casing" @@ -29,7 +27,6 @@ desc = "A 4.6x30mm incendiary bullet casing." bullet_skin = "incen" projectile_type = /obj/projectile/bullet/incendiary/c46x30mm - bullet_per_box = 50 // 4.73x33mm caseless (Solar) @@ -39,7 +36,6 @@ icon_state = "caseless" caliber = "4.73x33mm caseless" projectile_type = /obj/projectile/bullet/c47x33mm - bullet_per_box = 50 // 5.56mm HITP caseless (Pistole C) diff --git a/code/modules/projectiles/ammunition/ballistic/sniper.dm b/code/modules/projectiles/ammunition/ballistic/sniper.dm index e4b668c2228f..af7369204e6d 100644 --- a/code/modules/projectiles/ammunition/ballistic/sniper.dm +++ b/code/modules/projectiles/ammunition/ballistic/sniper.dm @@ -6,7 +6,6 @@ icon_state = "big-steel" caliber = ".50 BMG" projectile_type = /obj/projectile/bullet/p50 - bullet_per_box = 20 /obj/item/ammo_casing/p50/soporific name = ".50 BMG soporific bullet casing" diff --git a/code/modules/projectiles/ammunition/caseless/foam.dm b/code/modules/projectiles/ammunition/caseless/foam.dm index 0051680fd1e8..3c71d31eb5ed 100644 --- a/code/modules/projectiles/ammunition/caseless/foam.dm +++ b/code/modules/projectiles/ammunition/caseless/foam.dm @@ -9,7 +9,6 @@ custom_materials = list(/datum/material/iron = 11.25) harmful = FALSE var/modified = FALSE - bullet_per_box = 40 /obj/item/ammo_casing/caseless/foam_dart/update_icon_state() . = ..() diff --git a/code/modules/projectiles/boxes_magazines/ammo_stacks/prefab_stacks/premade_shotshell_stacks.dm b/code/modules/projectiles/boxes_magazines/ammo_stacks/prefab_stacks/premade_shotshell_stacks.dm index 616e64f5a4e0..f67800330724 100644 --- a/code/modules/projectiles/boxes_magazines/ammo_stacks/prefab_stacks/premade_shotshell_stacks.dm +++ b/code/modules/projectiles/boxes_magazines/ammo_stacks/prefab_stacks/premade_shotshell_stacks.dm @@ -1,6 +1,6 @@ // Shotshells /obj/item/ammo_box/magazine/ammo_stack/prefilled/shotgun - max_ammo = 8 //make sure these values are consistent across the board with stack_size variable. + max_ammo = 8 //make sure these values are consistent across the board with stack_size variable on respective ammo_casing /obj/item/ammo_box/magazine/ammo_stack/prefilled/shotgun/buckshot ammo_type = /obj/item/ammo_casing/shotgun/buckshot diff --git a/code/modules/projectiles/boxes_magazines/ammo_stacks/prefab_stacks/premade_smg_stacks.dm b/code/modules/projectiles/boxes_magazines/ammo_stacks/prefab_stacks/premade_smg_stacks.dm index 4e7d5f65d292..e095f350b462 100644 --- a/code/modules/projectiles/boxes_magazines/ammo_stacks/prefab_stacks/premade_smg_stacks.dm +++ b/code/modules/projectiles/boxes_magazines/ammo_stacks/prefab_stacks/premade_smg_stacks.dm @@ -1,6 +1,7 @@ // 4.6x30mm (WT-550 Automatic Rifle & SKM-24v) /obj/item/ammo_box/magazine/ammo_stack/prefilled/c46x30mm ammo_type = /obj/item/ammo_casing/c46x30mm + max_ammo = 15 /obj/item/storage/box/ammo/c46x30mm name = "box of 4.6x30mm ammo" diff --git a/code/modules/projectiles/boxes_magazines/generic_ammo_box.dm b/code/modules/projectiles/boxes_magazines/generic_ammo_box.dm index 2c88824623e2..ca5bcb7a877f 100644 --- a/code/modules/projectiles/boxes_magazines/generic_ammo_box.dm +++ b/code/modules/projectiles/boxes_magazines/generic_ammo_box.dm @@ -1,53 +1,53 @@ -/obj/item/ammo_box/generic - name = "generic ammo box" - desc = "A generic, unbranded box of ammo. It doesn't have great capacity, but it can hold a variety of different calibers." - max_ammo = 20 - start_empty = TRUE - icon_state = "generic-ammo" - /// Does the box currently have an ammo type set? - var/ammo_set = FALSE - /// Name of the currently set ammo type - var/ammo_name - -/obj/item/ammo_box/generic/update_ammo_count() - . = ..() - if(LAZYLEN(stored_ammo) == 0) - ammo_set = FALSE - ammo_type = /obj/item/ammo_casing - -/obj/item/ammo_box/generic/proc/update_max_ammo(obj/item/ammo_casing/ammo) - if(ammo.bullet_per_box) - max_ammo = round(ammo.bullet_per_box) - else - max_ammo = 10 - - return - -/obj/item/ammo_box/generic/attackby(obj/item/attacking_obj, mob/user, params, silent, replace_spent) - . = ..() - - if(!ammo_set && istype(attacking_obj, /obj/item/ammo_casing)) - var/obj/item/ammo_casing/ammo_load = attacking_obj.type - ammo_type = ammo_load - ammo_set = TRUE - ammo_name = attacking_obj.name - update_max_ammo(attacking_obj) - to_chat(user, span_notice("You set the box to hold [attacking_obj]!")) - - if(istype(attacking_obj, /obj/item/pen)) - if(!user.is_literate()) - to_chat(user, span_notice("You scribble illegibly on the cover of [src]!")) - return - var/inputvalue = stripped_input(user, "What would you like to label the box?", "Box Labelling", "", MAX_NAME_LEN) - - if(!inputvalue) - return - - if(user.canUseTopic(src, BE_CLOSE)) - name = "[initial(src.name)][(inputvalue ? " - '[inputvalue]'" : null)]" - -/obj/item/ammo_box/generic/examine(mob/user) - . = ..() - . += span_notice("[ammo_set ? "It's set to hold [ammo_name]\s. The box can hold up to [max_ammo] rounds." : "It doesn't have an ammo type set. Use a bullet on the box to set it."]") - . += span_notice("You can use a pen on it to rename the box.") +// /obj/item/ammo_box/generic +// name = "generic ammo box" +// desc = "A generic, unbranded box of ammo. It doesn't have great capacity, but it can hold a variety of different calibers." +// max_ammo = 20 +// start_empty = TRUE +// icon_state = "generic-ammo" +// /// Does the box currently have an ammo type set? +// var/ammo_set = FALSE +// /// Name of the currently set ammo type +// var/ammo_name + +// /obj/item/ammo_box/generic/update_ammo_count() +// . = ..() +// if(LAZYLEN(stored_ammo) == 0) +// ammo_set = FALSE +// ammo_type = /obj/item/ammo_casing + +// /obj/item/ammo_box/generic/proc/update_max_ammo(obj/item/ammo_casing/ammo) +// if(ammo.bullet_per_box) +// max_ammo = round(ammo.bullet_per_box) +// else +// max_ammo = 10 + +// return + +// /obj/item/ammo_box/generic/attackby(obj/item/attacking_obj, mob/user, params, silent, replace_spent) +// . = ..() + +// if(!ammo_set && istype(attacking_obj, /obj/item/ammo_casing)) +// var/obj/item/ammo_casing/ammo_load = attacking_obj.type +// ammo_type = ammo_load +// ammo_set = TRUE +// ammo_name = attacking_obj.name +// update_max_ammo(attacking_obj) +// to_chat(user, span_notice("You set the box to hold [attacking_obj]!")) + +// if(istype(attacking_obj, /obj/item/pen)) +// if(!user.is_literate()) +// to_chat(user, span_notice("You scribble illegibly on the cover of [src]!")) +// return +// var/inputvalue = stripped_input(user, "What would you like to label the box?", "Box Labelling", "", MAX_NAME_LEN) + +// if(!inputvalue) +// return + +// if(user.canUseTopic(src, BE_CLOSE)) +// name = "[initial(src.name)][(inputvalue ? " - '[inputvalue]'" : null)]" + +// /obj/item/ammo_box/generic/examine(mob/user) +// . = ..() +// . += span_notice("[ammo_set ? "It's set to hold [ammo_name]\s. The box can hold up to [max_ammo] rounds." : "It doesn't have an ammo type set. Use a bullet on the box to set it."]") +// . += span_notice("You can use a pen on it to rename the box.") diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index 658978fa9ed4..bf58499d4951 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -852,13 +852,13 @@ build_path = /obj/item/storage/box/ammo/c556mm_surplus category = list("initial", "Security", "Ammo") -/datum/design/generic_ammo_box - name = "Generic Ammo Box" - id = "ammo-generic" - build_type = AUTOLATHE | PROTOLATHE - materials = list(/datum/material/iron = 1500) - build_path = /obj/item/ammo_box/generic - category = list("initial", "Security", "Ammo") +// /datum/design/generic_ammo_box +// name = "Generic Ammo Box" +// id = "ammo-generic" +// build_type = AUTOLATHE | PROTOLATHE +// materials = list(/datum/material/iron = 1500) +// build_path = /obj/item/ammo_box/generic +// category = list("initial", "Security", "Ammo") /datum/design/ammo_can name = "Ammo Can"