Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-sync

This commit is contained in:
xPokee
2025-09-24 10:13:01 -04:00
313 changed files with 6548 additions and 4624 deletions
@@ -33,3 +33,13 @@
name = ".50 BMG marksman round bullet casing"
desc = "A .50 caliber marksman round casing."
projectile_type = /obj/projectile/bullet/p50/marksman
// Lahti 20x138mm rifle ammo //
/obj/item/ammo_casing/mm20x138
name = "20x138mm bullet casing"
desc = "A 20x138mm bullet casing."
caliber = CALIBER_50BMG
projectile_type = /obj/projectile/bullet/mm20x138
icon_state = ".50"
newtonian_force = 1.5
@@ -30,7 +30,7 @@
var/multiple_sprite_use_base = FALSE
///String, used for checking if ammo of different types but still fits can fit inside it; generally used for magazines
var/caliber
/// Determines whether ammo boxes can multiload in or out.
/// Determines whether ammo boxes can multiload in or out. See code/__DEFINES/combat.dm for details.
var/ammo_box_multiload = AMMO_BOX_MULTILOAD_BOTH
///Whether the magazine should start with nothing in it
@@ -189,7 +189,17 @@
if(did_load)
other_box.stored_ammo -= casing
num_loaded++
if(!did_load || !(ammo_box_multiload & AMMO_BOX_MULTILOAD_IN) || !(other_box.ammo_box_multiload & AMMO_BOX_MULTILOAD_OUT))
// failed to load (full already? ran out of ammo?)
if(!did_load)
break
// this box can't accept being multiloaded into
if(!(ammo_box_multiload & AMMO_BOX_MULTILOAD_IN))
break
// the other box can't give multiple bullets in one go to an unloaded magazine
if(!isgun(loc) && !(other_box.ammo_box_multiload & AMMO_BOX_MULTILOAD_OUT))
break
// the other box can't give multiple bullets in one go to a loaded magazine
if(isgun(loc) && !(other_box.ammo_box_multiload & AMMO_BOX_MULTILOAD_OUT_LOADED))
break
if(num_loaded)
@@ -1,108 +1,3 @@
/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"
@@ -142,25 +37,6 @@
/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"
@@ -42,3 +42,14 @@
desc = parent_type::desc + " Loaded with extremely fast marksman rounds, able to pretty much instantly hit their targets."
base_icon_state = "marksman"
ammo_type = /obj/item/ammo_casing/p50/marksman
// Lahti-L39 Magazine //
/obj/item/ammo_box/magazine/lahtimagazine
name = "\improper Lahti sniper rounds (20x138mm)"
desc = "A 20x138mm magazine suitable ammo for anti kaiju-rifles."
icon_state = ".50mag"
base_icon_state = ".50mag"
ammo_type = /obj/item/ammo_casing/mm20x138
max_ammo = 9
caliber = CALIBER_50BMG
@@ -0,0 +1,134 @@
/obj/item/ammo_box/speedloader
name = "speed loader (base type)"
desc = "This shouldn't be here. Report this to a coder, thanks!"
multiple_sprites = AMMO_BOX_PER_BULLET
ammo_box_multiload = (AMMO_BOX_MULTILOAD_IN | AMMO_BOX_MULTILOAD_OUT_LOADED)
// You can feed ammo in from a box (assuming someone ever codes a relevant ammo box),
// you can feed ammo out to a revolver's cylinder,
// but you can't use it to teleport six bullets into a detached rifle magazine.
/obj/item/ammo_box/speedloader/c357
name = "speed loader (.357)"
desc = "Designed to quickly reload seven-chamber .357 revolvers."
icon_state = "357"
ammo_type = /obj/item/ammo_casing/c357
max_ammo = 7
caliber = CALIBER_357
item_flags = NO_MAT_REDEMPTION
ammo_band_icon = "+357_ammo_band"
ammo_band_color = null
/obj/item/ammo_box/speedloader/c357/match
name = "speed loader (.357 Match)"
desc = parent_type::desc + " Match 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/speedloader/c357/phasic
name = "speed loader (.357 Phasic)"
desc = parent_type::desc + " Phasic rounds, also known as 'Ghost Lead', are specially manufactured to pass through non-organic material. Somehow."
ammo_type = /obj/item/ammo_casing/c357/phasic
ammo_band_color = "#693a6a"
/obj/item/ammo_box/speedloader/c357/heartseeker
name = "speed loader (.357 Heartseeker)"
desc = parent_type::desc + " Heartseeker rounds veer 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/speedloader/c38
name = "speed loader (.38)"
desc = "Designed to quickly reload six-chamber .38 Special revolvers."
icon_state = "38"
base_icon_state = "38"
ammo_type = /obj/item/ammo_casing/c38
max_ammo = 6
caliber = CALIBER_38
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT)
ammo_band_icon = "+38_ammo_band"
ammo_band_color = null
/obj/item/ammo_box/speedloader/c38/update_icon_state()
. = ..()
icon_state = "[base_icon_state]-base"
/obj/item/ammo_box/speedloader/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/speedloader/c38/trac
name = "speed loader (.38 TRAC)"
desc = parent_type::desc + " 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/speedloader/c38/match
name = "speed loader (.38 Match)"
desc = parent_type::desc + " Match bullets 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/speedloader/c38/match/bouncy
name = "speed loader (.38 Rubber)"
desc = parent_type::desc + " Rubber rounds are incredibly bouncy and MOSTLY less-lethal, 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/speedloader/c38/true
name = "speed loader (.38 True Strike)"
desc = parent_type::desc + " True Strike bullets bounce towards new targets with surprising accuracy after ricocheting."
ammo_type = /obj/item/ammo_casing/c38/match/true
ammo_band_color = COLOR_AMMO_TRUESTRIKE
/obj/item/ammo_box/speedloader/c38/dumdum
name = "speed loader (.38 DumDum)"
desc = parent_type::desc + " DumDum bullets expand on impact, reducing outright stopping power but \
shredding targets and causing massive bleeding in close range, \
at the cost of suffering greatly against armor and distant targets."
ammo_type = /obj/item/ammo_casing/c38/dumdum
ammo_band_color = COLOR_AMMO_DUMDUM
/obj/item/ammo_box/speedloader/c38/hotshot
name = "speed loader (.38 Hot Shot)"
desc = parent_type::desc + " Hot Shot bullets contain an incendiary payload that ignites struck targets."
ammo_type = /obj/item/ammo_casing/c38/hotshot
ammo_band_color = COLOR_AMMO_HOTSHOT
/obj/item/ammo_box/speedloader/c38/iceblox
name = "speed loader (.38 Iceblox)"
desc = parent_type::desc + " Iceblox bullets contain a cryogenic payload that lower the body temperature of struck targets."
ammo_type = /obj/item/ammo_casing/c38/iceblox
ammo_band_color = COLOR_AMMO_ICEBLOX
/obj/item/ammo_box/speedloader/c38/flare
name = "speed loader (.38 Flare)"
desc = parent_type::desc + " 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/speedloader/strilka310
name = "stripper clip (.310 Strilka)"
desc = "A five-round stripper clip for .310 Strilka rifles."
icon_state = "310_strip"
ammo_type = /obj/item/ammo_casing/strilka310
max_ammo = 5
ammo_box_multiload = AMMO_BOX_MULTILOAD_ALL
caliber = CALIBER_STRILKA310
/obj/item/ammo_box/speedloader/strilka310/surplus
name = "stripper clip (.310 Surplus)"
desc = parent_type::desc + " This one has a few spots of rust where there's not excessive amounts of gun grease."
ammo_type = /obj/item/ammo_casing/strilka310/surplus
/obj/item/ammo_box/speedloader/strilka310/phasic
name = "stripper clip (.310 Phasic)"
desc = parent_type::desc + " These should come 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
@@ -492,3 +492,30 @@
/obj/item/gun/ballistic/rifle/sks/empty
spawn_magazine_type = /obj/item/ammo_box/magazine/internal/sks/empty
// lahti-l39 anti material rifle //
/obj/item/gun/ballistic/automatic/lahti
name = "\improper Lahti L-39"
desc = "The Lahti L-39, now manufactured in space with better materials making it more portable and reliable- still loaded in the same massive cartridge, \
this thing was made to go through a tank and come out the other end- imagine what it could do to an exosuit, there's also a completely useless sight which is totally obstructed by the magazine."
icon = 'icons/obj/weapons/guns/lahtil39.dmi'
icon_state = "lahtil"
inhand_icon_state = "sniper"
worn_icon_state = "sniper"
fire_sound = 'sound/items/weapons/gun/sniper/shot.ogg'
fire_sound_volume = 90
load_sound = 'sound/items/weapons/gun/sniper/mag_insert.ogg'
rack_sound = 'sound/items/weapons/gun/sniper/rack.ogg'
suppressed_sound = 'sound/items/weapons/gun/general/heavy_shot_suppressed.ogg'
mag_display = FALSE
recoil = 15
w_class = WEIGHT_CLASS_BULKY
accepted_magazine_type = /obj/item/ammo_box/magazine/lahtimagazine
fire_delay = 8 SECONDS
slowdown = 2
burst_size = 1
slot_flags = ITEM_SLOT_BACK
actions_types = list()
suppressor_x_offset = 3
suppressor_y_offset = 3
@@ -117,3 +117,29 @@
ricochet_incidence_leeway = 90
ricochet_decay_damage = 1
ricochet_shoots_firer = FALSE
// 20x138mm bullet (lahti-l39) //
/obj/projectile/bullet/mm20x138
name ="20x138mm bullet"
speed = 3.5
range = 400 // same as sniper rifle
damage = 400
paralyze = 100
dismemberment = 50
catastropic_dismemberment = TRUE
armour_penetration = 50
ignore_range_hit_prone_targets = TRUE
var/mecha_damage = 2 // this is a damage multiplier var
var/object_damage = 2 // same normal damage
paralyze = 100 // same as sniper rifle
/obj/projectile/bullet/mm20x138/on_hit(atom/target, blocked = 0, pierce_hit)
if(isobj(target) && (blocked != 100))
var/obj/thing_to_break = target
var/damage_to_deal = object_damage
if(ismecha(thing_to_break) && mecha_damage)
damage_to_deal += mecha_damage
if(damage_to_deal)
thing_to_break.take_damage(damage_to_deal, BRUTE, BULLET, FALSE)
return ..()