mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-25 09:01:40 +00:00
* Fixing embedding for projectiles. (#77674) So, the main issue was that the variables for the embed element wouldn't set when attached to a projectile but only on items for some insignificant reason, which means it'll spawn the shrapnel yes, but won't embed it since the chance is null/zero. I read the code over and over and over with the assumption that something like this wouldn't have been done, yet it was. As for the secondary issue, because of how embedding works, the casing types of arrows and harpoon aren't spawned when hitting a non-carbon or reaching their maximum range. So, I'm re-enabling the reusable arg/var for the caseless component of harpoons and arrows, and modifying the `projectile_drop` to not drop their payload if the embedding component would already do that, so we avoid duping. * Fixing embedding for projectiles. --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
15 lines
379 B
Plaintext
15 lines
379 B
Plaintext
/obj/item/ammo_casing/harpoon
|
|
name = "harpoon"
|
|
caliber = CALIBER_HARPOON
|
|
icon_state = "magspear"
|
|
base_icon_state = "magspear"
|
|
projectile_type = /obj/projectile/bullet/harpoon
|
|
|
|
/obj/item/ammo_casing/harpoon/Initialize(mapload)
|
|
. = ..()
|
|
AddElement(/datum/element/caseless, TRUE)
|
|
|
|
/obj/item/ammo_casing/harpoon/update_icon_state()
|
|
. = ..()
|
|
icon_state = "[base_icon_state]"
|