mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-17 13:12:37 +00:00
Setting a few things straight with embedding and caseless ammo. (#77450) ## About The Pull Request So, when I made the `caseless` and `projectile_drop` elements, I failed to take into account that bullets have an embedding variable sets, which led to a few projectiles being embeddable when they shouldn't. Beyond that, I wanted arrows and harpoons to be reusable yet embeddable, which lead me to change a couple lines on the `embed` element, since whoever made the element thought it was a good idea to add the unnecessary step of attaching a copy of it to the `payload_type` of a fired projectile before trying to embed it. Like, why? All that's going to do is cause the resulting item to become embeddable, which may be an issue for anything other than drop-deletable shrapnels. So yea, arrows and harpoons, and emagged lollipops will now embed properly. I've also deleted an unused, problematic subtype of quiver and arrow casing, and made the quiver storage use ## Why It's Good For The Game This will fix #77187. Perhaps buff harpoons and arrows a little but meh. ## Changelog 🆑 fix: Fixed fired foam darts, gumballs and (harmless) lollipops being embeddable. fix: Projectiles that should embed while being reusable will now do so correctly, actually embedding the reusable casing instead of a shrapnel. balance: Arrows are generally more likely to embed now, except for blazing ones, that kind of just blaze. qol: the quiver storage now uses numerical stacking (like botany and ore bags, or the RPED, for example). /🆑 Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
/obj/projectile/bullet/foam_dart
|
|
name = "foam dart"
|
|
desc = "I hope you're wearing eye protection."
|
|
damage = 0 // It's a damn toy.
|
|
damage_type = OXY
|
|
icon = 'icons/obj/weapons/guns/toy.dmi'
|
|
icon_state = "foamdart_proj"
|
|
base_icon_state = "foamdart_proj"
|
|
range = 10
|
|
embedding = null
|
|
var/modified = FALSE
|
|
var/obj/item/pen/pen = null
|
|
|
|
/obj/projectile/bullet/foam_dart/Initialize(mapload)
|
|
. = ..()
|
|
RegisterSignal(src, COMSIG_PROJECTILE_ON_SPAWN_DROP, PROC_REF(handle_drop))
|
|
|
|
/obj/projectile/bullet/foam_dart/proc/handle_drop(datum/source, obj/item/ammo_casing/foam_dart/newcasing)
|
|
SIGNAL_HANDLER
|
|
newcasing.modified = modified
|
|
var/obj/projectile/bullet/foam_dart/newdart = newcasing.loaded_projectile
|
|
newdart.modified = modified
|
|
newdart.damage_type = damage_type
|
|
if(pen)
|
|
newdart.pen = pen
|
|
pen.forceMove(newdart)
|
|
pen = null
|
|
newdart.damage = 5
|
|
newdart.update_appearance()
|
|
|
|
/obj/projectile/bullet/foam_dart/Destroy()
|
|
pen = null
|
|
return ..()
|
|
|
|
/obj/projectile/bullet/foam_dart/riot
|
|
name = "riot foam dart"
|
|
icon_state = "foamdart_riot_proj"
|
|
base_icon_state = "foamdart_riot_proj"
|
|
stamina = 25
|