Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bullet Stack Fixes + Other #3568

Merged
merged 12 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions code/game/objects/items/storage/ammo_can.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@
pickup_sound = 'sound/items/handling/ammobox_pickup.ogg'
material_flags = NONE
has_latches = FALSE
generalthrax marked this conversation as resolved.
Show resolved Hide resolved
w_class = WEIGHT_CLASS_BULKY

/obj/item/storage/toolbox/ammo/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_volume = STORAGE_VOLUME_BACKPACK
STR.max_w_class = MAX_WEIGHT_CLASS_BACKPACK
STR.set_holdable(list(
/obj/item/storage/box/ammo,
/obj/item/mine,
/obj/item/grenade,
/obj/item/ammo_casing/caseless/rocket,
/obj/item/ammo_box/magazine/ammo_stack,
/obj/item/ammo_casing,
/obj/item/mine,
/obj/item/grenade
))
Comment on lines +18 to +27
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would go ahead and make this a var because sub types always end up needed edge cases for this.


/obj/item/storage/toolbox/ammo/a850r/PopulateContents()
name = "ammo can (8x50mmR)"
Expand Down
11 changes: 0 additions & 11 deletions code/modules/cargo/blackmarket/blackmarket_items/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,6 @@
stock_max = 10
availability_prob = 0

/datum/blackmarket_item/ammo/himehabu_box
name = ".22 LR Ammo Box"
desc = "A 75 round ammo box of .22 LR. Trust me, you'll need every shot."
item = /obj/item/storage/box/ammo/c22lr

price_min = 100
price_max = 300
stock_min = 6
stock_max = 10
availability_prob = 0

/datum/blackmarket_item/ammo/a357_box
name = ".357 Ammo Box"
desc = "A 50 round ammo box of .357."
Expand Down
4 changes: 2 additions & 2 deletions code/modules/cargo/blackmarket/blackmarket_items/weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
name = "Himehabu Pistol"
desc = "Great things come in small packages. The Himehabu is perfect for all your espionage needs. Chambered in .22lr."
item = /obj/item/gun/ballistic/automatic/pistol/himehabu
pair_item = list(/datum/blackmarket_item/ammo/himehabu_mag, /datum/blackmarket_item/ammo/himehabu_box)
pair_item = list(/datum/blackmarket_item/ammo/himehabu_mag)

price_min = 100
price_max = 600
Expand Down Expand Up @@ -320,7 +320,7 @@
name = "Pounder Submachine Gun"
desc = "There's a certain quality to quantity. With a massive 50 round capacity, this .22lr submachine is capable of laying down an jawdropping amount of fire."
item = /obj/item/gun/ballistic/automatic/smg/pounder
pair_item = list(/datum/blackmarket_item/ammo/pounder_mag,/datum/blackmarket_item/ammo/himehabu_box)
pair_item = list(/datum/blackmarket_item/ammo/pounder_mag)

price_min = 1500
price_max = 2000
Expand Down
9 changes: 5 additions & 4 deletions code/modules/cargo/packs/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -426,12 +426,13 @@

/datum/supply_pack/ammo/c299
name = ".299 Eoehoma Caseless Ammo Box Crate"
desc = "Contains a 120-round box of .299 Caseless ammo from the defunct Eoehoma. Used for the E-40 Hybrid Rifle."
contains = list(/obj/item/storage/box/ammo/c299)
cost = 250
desc = "Contains two 60-round boxes of .299 Caseless ammo from the defunct Eoehoma. Used for the E-40 Hybrid Rifle."
contains = list(/obj/item/storage/box/ammo/c299,
/obj/item/storage/box/ammo/c299)
cost = 400

/datum/supply_pack/ammo/c22lr
name = ".22 LR Ammo Box Crate"
desc = "Contains a 60-round ammo box for refilling .22 LR weapons."
desc = "Contains one 100-round ammo box for refilling .22 LR weapons."
contains = list(/obj/item/storage/box/ammo/c22lr)
cost = 250
2 changes: 1 addition & 1 deletion code/modules/projectiles/ammunition/_ammo_casing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
///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
var/stack_size = 12
var/stack_size = 15

/obj/item/ammo_casing/attackby(obj/item/attacking_item, mob/user, params)
if(istype(attacking_item, /obj/item/pen))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/ammunition/ballistic/pistol.dm
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@
desc = "A .22 LR bullet casing."
projectile_type = /obj/projectile/bullet/c22lr
caliber = "22lr"
stack_size = 15
stack_size = 25
4 changes: 2 additions & 2 deletions code/modules/projectiles/ammunition/ballistic/rifle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
icon_state = "rifle-brass"
caliber = "5.56x42mm"
projectile_type = /obj/projectile/bullet/a556_42
stack_size = 5
stack_size = 15

// 5.45x39mm (SKM-24v)

Expand Down Expand Up @@ -91,7 +91,7 @@
icon_state = "caseless"
caliber = ".299 caseless"
projectile_type = /obj/projectile/bullet/c299
stack_size = 5
stack_size = 15

/obj/item/ammo_casing/a65clip
name = "6.5x57mm CLIP bullet casing"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
if(istype(attacking_obj, /obj/item/ammo_box/magazine/ammo_stack))
var/obj/item/ammo_box/attacking_box = attacking_obj
for(var/obj/item/ammo_casing/casing_to_insert in attacking_box.stored_ammo)
if(!((instant_load && attacking_box.instant_load) || (stored_ammo.len >= max_ammo) || do_after(user, 1 SECONDS, attacking_box, timed_action_flags = IGNORE_USER_LOC_CHANGE)))
if(!((instant_load && attacking_box.instant_load) || (stored_ammo.len >= max_ammo) || do_after(user, 0.5 SECONDS, attacking_box, timed_action_flags = IGNORE_USER_LOC_CHANGE)))
break
var/did_load = give_round(casing_to_insert, replace_spent)
if(!did_load)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
ammo_type = /obj/item/ammo_casing/c45/rubber

/obj/item/storage/box/ammo/c45_rubber
name = "box of incendiary .45 ammo"
name = "box of rubbershot .45 ammo"
desc = "A box of .45 rubbershot ammo, designed to disable targets without causing serious damage."
icon_state = "45box-rubbershot"

Expand All @@ -269,6 +269,7 @@

/obj/item/ammo_box/magazine/ammo_stack/prefilled/c22lr
ammo_type = /obj/item/ammo_casing/c22lr
max_ammo = 25

/obj/item/storage/box/ammo/c22lr
name = "box of .22 LR ammo"
Expand Down Expand Up @@ -388,6 +389,7 @@

/obj/item/ammo_box/magazine/ammo_stack/prefilled/c38
ammo_type = /obj/item/ammo_casing/c38
max_ammo = 15

/obj/item/storage/box/ammo/c38
name = "box of .38 ammo"
Expand Down Expand Up @@ -489,8 +491,8 @@

/obj/item/storage/box/ammo/a44roum_hp
name = "box of HP .44 roumain ammo"
desc = "A box of .44 roumain rubbershot ammo, designed to disable targets without causing serious damage."
icon_state = "a44roum-rubber"
desc = "A box of .44 roumain hollowpoint ammo, designed to disable targets without causing serious damage."
icon_state = "a44roum-hp"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that doesn't seem right. is there no sprite for -rubber here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't rubber. This is hollow point.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooprs


/obj/item/storage/box/ammo/a44roum_hp/PopulateContents()
..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@

/obj/item/ammo_box/magazine/ammo_stack/prefilled/c299
ammo_type = /obj/item/ammo_casing/caseless/c299
max_ammo = 5
max_ammo = 15

/obj/item/storage/box/ammo/c299
name = "box of .299 Eoehoma caseless ammo"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
ammo_type = /obj/item/ammo_casing/shotgun/rubbershot

/obj/item/storage/box/ammo/a12g_rubbershot
name = "box of 12ga beanbags"
name = "box of 12ga rubbershot"
desc = "A box of 12-gauge rubbershot shells, designed for riot control."
icon_state = "12gbox-rubbershot"

/obj/item/storage/box/ammo/a12g_beanbag/PopulateContents()
/obj/item/storage/box/ammo/a12g_rubbershot/PopulateContents()
..()
var/static/items_inside = list(
/obj/item/ammo_box/magazine/ammo_stack/prefilled/shotgun/rubber = 4)
Expand Down
Loading