Files
Bubberstation/code/modules/projectiles/boxes_magazines/ammo_boxes.dm
necromanceranne 8f15d0ea2c Adds .38 Flare, which is a lethal laser bullet casing available for printing with Advanced Beam Weaponry. Adjust ammo material values. (#91726)
## About The Pull Request


![image](https://github.com/user-attachments/assets/1332d28c-8d5f-41b7-a614-b74027210145)

Adds the .38 Flare. It does 20 damage. This round highlights the target
for 2 minutes, and projectiles hitting the target always hit the limb
that the shooter was aiming at. Your shot has effectively perfect limb
accuracy, no matter how far the bullet needs to travel. This also
affects other projectiles hitting the target that aren't the .38 Flare.

To indicate whether or not a round in a magazine is either lead or
laser, I've borrowed the implementation of ammo overlays from the C-20r
toy magazines Now each bullet in the speedloaders for .38 can be a
distinct type visibly. Might be interesting if anyone wants to add
additional unique appearances for some of the other .38 rounds.

Reduces the overall cost of a lot of the ammunition in the sec and
autolathe, such as loose bullets. Also reduces the material quantity
within bullet casings.

## Why It's Good For The Game

> .38 Flare

By popular demand, I've come up with a new idea. And that idea...is an
anti-bullet deviation tool. Most players are probably not conscious of
bullet deviation. But if you're familiar with the mechanic, it's why
sometimes your shots may hit into an arm or a leg even though you were
aiming at the head.

The way this works is that over the course of a bullets flight, it
increases in inaccuracy and the pobability of drifting into a limb. From
my last estimate, shooting somewhere around 5 tiles away will usually
result in bullet drift.

While affected by the flare shot, that does not happen. You shoot at the
head, you hit the head.

To put it into perspective; you could consider bullet deviation a form
of damage loss (its a bit more complicated than this and there are
instances where it is positive), and this projectile eliminates that
problem for everyone shooting the target.

> Ammo cost

Some of these were pretty excessive for the cost, and a notable example
of this include the .357 loose casings, .310 Surplus loose casings, and
most shotgun shells. These should go down to roughly below 3/5th of a
sheet of metal when printed from a fully upgraded lathe.

Meanwhile, a single bullet casing was like a sheet of metal each, which
didn't seem right to me. So they're now by default one fifth of a sheet
of metal on recycle.

## Changelog
🆑
add: .38 Flare, a laser bullet! Available in both .38 speedloader and
BR-38 magazine once Advanced Beam Weaponry is researched.
add: .38 Flare highlights the target in an outline and makes sure your
bullets never accidentally hit any limb except the one you are aiming
at. Never accidentally hit someone in the arm when you were going for a
headshot.
balance: Reduces the printing costs of several ammunition types from the
autolathe and security lathe. Reduces the overall material contents of
said printed ammo/magazines. If you find a material dupe, let a coder
know.
/🆑

---------

Co-authored-by: projectkepler-RU <99981766+projectkepler-ru@users.noreply.github.com>
Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
2025-07-09 17:11:23 +00:00

192 lines
6.9 KiB
Plaintext

/obj/item/ammo_box/a357
name = "speed loader (.357)"
desc = "Designed to quickly reload revolvers."
icon_state = "357"
ammo_type = /obj/item/ammo_casing/c357
max_ammo = 7
caliber = CALIBER_357
multiple_sprites = AMMO_BOX_PER_BULLET
item_flags = NO_MAT_REDEMPTION
ammo_band_icon = "+357_ammo_band"
ammo_band_color = null
/obj/item/ammo_box/a357/match
name = "speed loader (.357 Match)"
desc = "Designed to quickly reload revolvers. These rounds are manufactured within extremely tight tolerances, making them easy to show off trickshots with."
ammo_type = /obj/item/ammo_casing/c357/match
ammo_band_color = "#77828a"
/obj/item/ammo_box/a357/phasic
name = "speed loader (.357 Phasic)"
desc = "Designed to quickly reload revolvers. Holds phasic ammo, also known as 'Ghost Lead', allowing it to pass through non-organic material."
ammo_type = /obj/item/ammo_casing/c357/phasic
ammo_band_color = "#693a6a"
/obj/item/ammo_box/a357/heartseeker
name = "speed loader (.357 Heartseeker)"
desc = "Designed to quickly reload revolvers. Holds heartseeker ammo, which veers into targets with exceptional precision using \
an unknown method. It apparently predicts movement using neural pulses in the brain, but that's less marketable. \
As seen in the hit NTFlik horror-space western film, Forget-Me-Not! Brought to you by Roseus Galactic!"
ammo_type = /obj/item/ammo_casing/c357/heartseeker
ammo_band_color = "#a91e1e"
/obj/item/ammo_box/c38
name = "speed loader (.38)"
desc = "Designed to quickly reload revolvers."
icon_state = "38"
base_icon_state = "38"
ammo_type = /obj/item/ammo_casing/c38
max_ammo = 6
caliber = CALIBER_38
multiple_sprites = AMMO_BOX_PER_BULLET
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT)
ammo_band_icon = "+38_ammo_band"
ammo_band_color = null
/obj/item/ammo_box/c38/update_icon_state()
. = ..()
icon_state = "[base_icon_state]-base"
/obj/item/ammo_box/c38/update_overlays()
. = ..()
if(!LAZYLEN(stored_ammo))
return
for(var/inserted_ammo in 1 to stored_ammo.len)
var/obj/item/ammo_casing/c38/boolet = stored_ammo[inserted_ammo]
. += "38-[boolet::lead_or_laser]-[inserted_ammo]"
/obj/item/ammo_box/c38/trac
name = "speed loader (.38 TRAC)"
desc = "Designed to quickly reload revolvers. TRAC bullets embed a tracking implant within the target's body."
ammo_type = /obj/item/ammo_casing/c38/trac
ammo_band_color = COLOR_AMMO_TRACK
/obj/item/ammo_box/c38/match
name = "speed loader (.38 Match)"
desc = "Designed to quickly reload revolvers. These rounds are manufactured within extremely tight tolerances, making them easy to show off trickshots with."
ammo_type = /obj/item/ammo_casing/c38/match
ammo_band_color = COLOR_AMMO_MATCH
/obj/item/ammo_box/c38/match/bouncy
name = "speed loader (.38 Rubber)"
desc = "Designed to quickly reload revolvers. These rounds are incredibly bouncy and MOSTLY nonlethal, making them great to show off trickshots with."
ammo_type = /obj/item/ammo_casing/c38/match/bouncy
ammo_band_color = COLOR_AMMO_RUBBER
/obj/item/ammo_box/c38/true
name = "speed loader (.38 True Strike)"
desc = "Designed to quickly reload revolvers. Bullets bounce towards new targets with surprising accuracy."
ammo_type = /obj/item/ammo_casing/c38/match/true
ammo_band_color = COLOR_AMMO_TRUESTRIKE
/obj/item/ammo_box/c38/dumdum
name = "speed loader (.38 DumDum)"
desc = "Designed to quickly reload revolvers. These rounds expand on impact, allowing them to shred the target and cause massive bleeding. Very weak against armor and distant targets."
ammo_type = /obj/item/ammo_casing/c38/dumdum
ammo_band_color = COLOR_AMMO_DUMDUM
/obj/item/ammo_box/c38/hotshot
name = "speed loader (.38 Hot Shot)"
desc = "Designed to quickly reload revolvers. Hot Shot bullets contain an incendiary payload."
ammo_type = /obj/item/ammo_casing/c38/hotshot
ammo_band_color = COLOR_AMMO_HOTSHOT
/obj/item/ammo_box/c38/iceblox
name = "speed loader (.38 Iceblox)"
desc = "Designed to quickly reload revolvers. Iceblox bullets contain a cryogenic payload."
ammo_type = /obj/item/ammo_casing/c38/iceblox
ammo_band_color = COLOR_AMMO_ICEBLOX
/obj/item/ammo_box/c38/flare
name = "speed loader (.38 Flare)"
desc = "Designed to quickly reload revolvers. Flare casings launch a concentrated particle beam towards a target, lighting them up for everyone to see."
ammo_type = /obj/item/ammo_casing/c38/flare
ammo_band_color = COLOR_AMMO_HELLFIRE
/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/strilka310
name = "stripper clip (.310 Strilka)"
desc = "A stripper clip."
icon_state = "310_strip"
ammo_type = /obj/item/ammo_casing/strilka310
max_ammo = 5
caliber = CALIBER_STRILKA310
multiple_sprites = AMMO_BOX_PER_BULLET
/obj/item/ammo_box/strilka310/surplus
name = "stripper clip (.310 Surplus)"
ammo_type = /obj/item/ammo_casing/strilka310/surplus
/obj/item/ammo_box/strilka310/phasic
name = "stripper clip (.310 Phasic)"
desc = "A stripper clip filled with phasic bullets, hastily developed after an incident where a misfire resulted in the destruction of Atrakor Silverscale's priceless Vigoxian Fabergé egg. \
These fancy bullets pass right though valuables until they end up in a far less expensive human skull."
ammo_type = /obj/item/ammo_casing/strilka310/phasic
/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)