mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-03-28 06:54:34 +00:00
About The Pull Request
Deletes /obj/shapeshift_holder, replaces it with /datum/status_effect/shapechange_mob
Refactors Heretic worm form into a shapeshift spell
Refactors Wabbajack, and associated code
Fixes #69117
Fixes #65653
Fixes #59127
Fixes #52786
Why It's Good For The Game
/obj/shapeshift_holder was one of the worst remaining abuses of /obj direct subtypes, so I replaced it with a cool fancy datum.
This also decouples the shapeshifting behavior entirely from the shapeshifting spell. So we have support for shapeshifted mobs not sourced from a spell. Which is neat, we could technically swap Wabbajack to use this in the future.
Changelog
cl Melbert
fix: Wabbajacking a shapeshifted mob no longer runtimes horribly. When a shapeshifted mob is wabbajacked, they'll now be removed from their shapeshift and stunned.
fix: Transforming via a shapeshift should no longer rob you of your hearing / runechat awareness.
fix: Shapeshifting plays nicer with holoparasites.
fix: Being polymorphed from a xeno to a non-xeno correctly makes you a non-xeno
refactor: Refactored shapeshifting, the shapeshift holder is now a status effect instead of an object.
refactor: Heretic worm form is a shapeshift spell now, this might have some minor behavioral changes but should overall be the same.
refactor: Refactored Wabbajack (+ cursed pool). Overall a bit more clean / consistent behavior.
/cl
29 lines
812 B
Plaintext
29 lines
812 B
Plaintext
/**
|
|
* Content Barfer; which expels the contents of a mob when it dies, or is transformed
|
|
*
|
|
* Used for morphs and bileworms!
|
|
*/
|
|
/datum/element/content_barfer
|
|
element_flags = ELEMENT_DETACH
|
|
id_arg_index = 2
|
|
|
|
/datum/element/content_barfer/Attach(datum/target, tally_string)
|
|
. = ..()
|
|
|
|
if(!isliving(target))
|
|
return ELEMENT_INCOMPATIBLE
|
|
|
|
RegisterSignal(target, list(COMSIG_LIVING_DEATH, COMSIG_LIVING_ON_WABBAJACKED), .proc/barf_contents)
|
|
|
|
/datum/element/content_barfer/Detach(datum/target)
|
|
UnregisterSignal(target, list(COMSIG_LIVING_DEATH, COMSIG_LIVING_ON_WABBAJACKED))
|
|
return ..()
|
|
|
|
/datum/element/content_barfer/proc/barf_contents(mob/living/target)
|
|
SIGNAL_HANDLER
|
|
|
|
for(var/atom/movable/barfed_out in target)
|
|
barfed_out.forceMove(target.loc)
|
|
if(prob(90))
|
|
step(barfed_out, pick(GLOB.alldirs))
|