Files
Bubberstation/code/modules/projectiles/boxes_magazines/ammo_boxes.dm
Hatterhat c0f8e7bb5c Multiload Second Pass (ft. Speedloaders Will Be Real In 2025) (#92854)
## About The Pull Request
Gets, yet again, more granular with multiload capabilities, by
introducing `AMMO_BOX_MULTILOAD_OUT_LOADED`; ammo boxes flagged with
this can speed-load ammo boxes that are currently inside another gun,
like revolver cylinders or internal magazines.

To accomodate for this, the previous flag that covered this,
`AMMO_BOX_MULTILOAD_OUT` can no longer speedload into currently loaded
magazines (e.g. internal magazines, including revolver cylinders).

Also implements a base type for speedloaders, moving .38 and .357
speedloaders along with .310 stripper clips to this type, instead of
being ammo boxes. Also features an UpdatePaths script for mappers, which
is why there's so many files touched - repathing is a pain.

Also also adds fancy types for ammo boxes, magazines, and speedloaders,
which isn't particularly player-facing.

Also also also makes the lionhunter ammo strip for the lionhunter rifle
visually three rounds only instead of being perpetually half-full (or
half-empty, depending on your pessimism).

## Why It's Good For The Game

The hypothetical case of "ammo box that holds shotgun ammo" should
probably... not... teleport as much of its ammo as possible into a
tube-fed shotgun, but should probably still be okay at reloading
magazines that actually go into shotguns. Or something.

More relevant, reloading BR-38 magazines with speedloaders, while funny,
probably also shouldn't be teleporting in six fresh rounds.

## Changelog

🆑
balance: General ammo boxes (not speedloaders, not stripper clips) can
no longer multiload into currently loaded magazines (revolver cylinders,
internal magazines).
balance: Speedloaders are now a separate type from ammo boxes, and can
only multiload into currently loaded magazines e.g. revolver cylinders.
qol: Ammo boxes, magazines, and speedloaders now have fancier types for
spawning in by admins.
sprite: Lionhunter ammo clips are visually smaller now.
/🆑

---------

Co-authored-by: Hatterhat <Hatterhat@users.noreply.github.com>
2025-09-20 08:10:35 +10:00

68 lines
1.8 KiB
Plaintext

/obj/item/ammo_box/c9mm
name = "ammo box (9mm)"
icon_state = "9mmbox"
ammo_type = /obj/item/ammo_casing/c9mm
max_ammo = 30
/obj/item/ammo_box/c10mm
name = "ammo box (10mm)"
icon_state = "10mmbox"
ammo_type = /obj/item/ammo_casing/c10mm
max_ammo = 20
/obj/item/ammo_box/c45
name = "ammo box (.45)"
icon_state = "45box"
ammo_type = /obj/item/ammo_casing/c45
max_ammo = 20
/obj/item/ammo_box/a40mm
name = "ammo box (40mm grenades)"
icon_state = "40mm"
ammo_type = /obj/item/ammo_casing/a40mm
max_ammo = 4
multiple_sprites = AMMO_BOX_PER_BULLET
/obj/item/ammo_box/a40mm/rubber
name = "ammo box (40mm rubber slug)"
ammo_type = /obj/item/ammo_casing/a40mm/rubber
/obj/item/ammo_box/rocket
name = "rocket bouquet (84mm HE)"
icon_state = "rocketbundle"
ammo_type = /obj/item/ammo_casing/rocket
max_ammo = 3
multiple_sprites = AMMO_BOX_PER_BULLET
/obj/item/ammo_box/rocket/can_load(mob/user)
return FALSE
/obj/item/ammo_box/n762
name = "ammo box (7.62x38mmR)"
icon_state = "10mmbox"
ammo_type = /obj/item/ammo_casing/n762
max_ammo = 14
/obj/item/ammo_box/foambox
name = "ammo box (Foam Darts)"
icon = 'icons/obj/weapons/guns/toy.dmi'
icon_state = "foambox"
ammo_type = /obj/item/ammo_casing/foam_dart
max_ammo = 40
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT*5)
/obj/item/ammo_box/foambox/mini
icon_state = "foambox_mini"
max_ammo = 20
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT*2.5)
/obj/item/ammo_box/foambox/riot
icon_state = "foambox_riot"
ammo_type = /obj/item/ammo_casing/foam_dart/riot
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT*25)
/obj/item/ammo_box/foambox/riot/mini
icon_state = "foambox_riot_mini"
max_ammo = 20
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT*12.5)