Adds the pump-action grenade launcher and updates the existing break-action ballistic grenade launcher with a new sprite (#95244)

This commit is contained in:
necromanceranne
2026-03-10 20:54:05 +02:00
committed by GitHub
parent f1508782d3
commit 1ce02afed8
19 changed files with 231 additions and 26 deletions
@@ -7,8 +7,52 @@
damage = 60
embed_type = null
shrapnel_type = null
/// The devastation range on our grenade. Positive values determine the range in which the explosive will gib mobs and destroy plating.
var/ex_dev_range = -1
/// The light explosion radius of our grenade. Determines the standard explosion range of the grenade.
var/ex_light_range = 2
/// The flame range, determining the range of the fireball created by the explosion of the grenade.
var/ex_flame_range = 3
/obj/projectile/bullet/a40mm/on_hit(atom/target, blocked = 0, pierce_hit)
..()
explosion(target, devastation_range = -1, light_impact_range = 2, flame_range = 3, flash_range = 1, adminlog = FALSE, explosion_cause = src)
if(ex_light_range || ex_flame_range)
explosion(target, devastation_range = ex_dev_range, light_impact_range = ex_light_range, flame_range = ex_flame_range, flash_range = 1, adminlog = FALSE, explosion_cause = src)
grenade_extra_effect(target)
return BULLET_ACT_HIT
/obj/projectile/bullet/a40mm/proc/grenade_extra_effect(atom/target)
if(!prob(1))
return
if(isliving(target))
var/mob/living/living_target = target
playsound(living_target, 'sound/effects/coin2.ogg', 40, TRUE)
new /obj/effect/temp_visual/crit(get_turf(living_target))
/obj/projectile/bullet/a40mm/incendiary
name = "40mm incendiary grenade"
desc = "Hell is approaching."
damage = 10 // About the only mercy you're getting.
ex_light_range = 1
ex_flame_range = 4
/obj/projectile/bullet/a40mm/incendiary/grenade_extra_effect(atom/target, blocked = 0, pierce_hit)
if(iscarbon(target))
var/mob/living/carbon/i_want_them_to_burn = target
i_want_them_to_burn.adjust_fire_stacks(damage*2)
i_want_them_to_burn.ignite_mob()
for(var/turf/nearby_turf as anything in RANGE_TURFS(ex_flame_range, target))
new /obj/effect/hotspot(nearby_turf)
/obj/projectile/bullet/a40mm/tear_gas
name = "40mm tear gas grenade"
desc = "MY EYES!!"
damage = 10
ex_light_range = 0
ex_flame_range = 0
/obj/projectile/bullet/a40mm/tear_gas/Initialize(mapload)
. = ..()
AddElement(/datum/element/projectile_drop, /obj/item/grenade/chem_grenade/teargas/instant)
@@ -32,12 +32,19 @@
embed_type = null
/obj/projectile/bullet/shotgun_beanbag/a40mm
name = "rubber slug"
name = "rubber puck"
icon_state = "cannonball"
damage = 20
stamina = 160 //BONK
damage = 10
stamina = 80 //BONK
knockdown = 10
wound_bonus = 30
weak_against_armour = TRUE
ricochets_max = 4
ricochet_chance = 100
ricochet_decay_chance = 1
ricochet_decay_damage = 0.8
ricochet_auto_aim_range = 2
ricochet_auto_aim_angle = 30
ricochet_incidence_leeway = 75
/obj/projectile/bullet/incendiary/shotgun
name = "incendiary slug"
@@ -101,6 +108,13 @@
name = "milspec buckshot pellet"
damage = 7.5
/obj/projectile/bullet/pellet/shotgun_buckshot/milspec/flak
name = "titanium ball bearing"
damage = 10
damage_falloff_tile = -0.5 //much harsher falloff
wound_bonus = 0
armour_penetration = 20
/obj/projectile/bullet/pellet/shotgun_rubbershot
name = "rubber shot pellet"
damage = 3