mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-29 02:21:44 +00:00
Projectiles are assigned the ability to try embedding by the presence of a shrapnel_type variable being set on them, whether or not they actually have a set of embedding stats in their embedding var. By default, children of /obj/projectile/bullet have a shrapnel type set to a generic embedded bullet item, including things like foam darts and lollypop projectiles which shouldn't be able to embed (and certainly not embed as a bullet). While they had their embedding vars set to null, they still had their shrapnel_type set to the embedded bullet type, meaning shooting a person with a dart gun or whatever would leave a failed shrapnel item on the ground where they weren't supposed to. This fixes that by requiring both a defined shrapnel_type AND a defined embedding var for the embedding stats. Any projectiles without both won't be able to try embedding. I also manually put 'shrapnel_type = null' on any bullet subtypes with embedding = null just to be safe and for consistency.
15 lines
326 B
Plaintext
15 lines
326 B
Plaintext
// 40mm (Grenade Launcher
|
|
|
|
/obj/projectile/bullet/a40mm
|
|
name ="40mm grenade"
|
|
desc = "USE A WEEL GUN"
|
|
icon_state= "bolter"
|
|
damage = 60
|
|
embedding = null
|
|
shrapnel_type = null
|
|
|
|
/obj/projectile/bullet/a40mm/on_hit(atom/target, blocked = FALSE)
|
|
..()
|
|
explosion(target, -1, 0, 2, 1, 0, flame_range = 3)
|
|
return BULLET_ACT_HIT
|