mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 10:01:40 +00:00
[READY] shapeshifting in a pipe violently kills you: I WON EDITION (#47515)
* cast proc edit I like these fringe interactions that punish you for trying something stupid in the hopes it does something game breaking. * dead project style *dabs* * cleaning up the code 1/2 * still needs work, fuu * Update code/modules/spells/spell_types/shapeshift.dm Co-Authored-By: moo <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com> * fixes the check, once and for all * FINALLY * 😔 💯 Co-Authored-By: skoglol <skoglol@users.noreply.github.com> * even more improvements Co-Authored-By: skoglol <kriskog@users.noreply.github.com> * here we go
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
var/convert_damage = TRUE //If you want to convert the caster's health to the shift, and vice versa.
|
||||
var/convert_damage_type = BRUTE //Since simplemobs don't have advanced damagetypes, what to convert damage back into.
|
||||
|
||||
var/shapeshift_type
|
||||
var/mob/living/shapeshift_type
|
||||
var/list/possible_shapes = list(/mob/living/simple_animal/mouse,\
|
||||
/mob/living/simple_animal/pet/dog/corgi,\
|
||||
/mob/living/simple_animal/hostile/carp/ranged/chaos,\
|
||||
@@ -46,10 +46,31 @@
|
||||
|
||||
var/obj/shapeshift_holder/S = locate() in M
|
||||
if(S)
|
||||
Restore(M)
|
||||
M = Restore(M)
|
||||
else
|
||||
Shapeshift(M)
|
||||
M = Shapeshift(M)
|
||||
if(M.movement_type & (VENTCRAWLING))
|
||||
if(!M.ventcrawler) //you're shapeshifting into something that can't fit into a vent
|
||||
var/obj/machinery/atmospherics/pipeyoudiein = M.loc
|
||||
var/datum/pipeline/ourpipeline
|
||||
var/pipenets = pipeyoudiein.returnPipenets()
|
||||
if(islist(pipenets))
|
||||
ourpipeline = pipenets[1]
|
||||
else
|
||||
ourpipeline = pipenets
|
||||
|
||||
to_chat(M, "<span class='userdanger'>Casting [src] inside of [pipeyoudiein] quickly turns you into a bloody mush!</span>")
|
||||
var/gibtype = /obj/effect/gibspawner/generic
|
||||
if(isalien(M))
|
||||
gibtype = /obj/effect/gibspawner/xeno
|
||||
for(var/obj/machinery/atmospherics/components/unary/possiblevent in range(10, get_turf(M)))
|
||||
if(possiblevent.parents.len && possiblevent.parents[1] == ourpipeline)
|
||||
new gibtype(get_turf(possiblevent))
|
||||
playsound(possiblevent, 'sound/effects/reee.ogg', 75, TRUE)
|
||||
priority_announce("We detected a pipe blockage around [get_area(get_turf(M))], please dispatch someone to investigate.", "Central Command")
|
||||
M.death()
|
||||
qdel(M)
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/shapeshift/proc/Shapeshift(mob/living/caster)
|
||||
var/obj/shapeshift_holder/H = locate() in caster
|
||||
@@ -62,12 +83,14 @@
|
||||
|
||||
clothes_req = FALSE
|
||||
human_req = FALSE
|
||||
return shape
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/shapeshift/proc/Restore(mob/living/shape)
|
||||
var/obj/shapeshift_holder/H = locate() in shape
|
||||
if(!H)
|
||||
return
|
||||
|
||||
. = H.stored
|
||||
H.restore()
|
||||
|
||||
clothes_req = initial(clothes_req)
|
||||
@@ -150,7 +173,7 @@
|
||||
/obj/shapeshift_holder/proc/restore(death=FALSE)
|
||||
restoring = TRUE
|
||||
qdel(slink)
|
||||
stored.forceMove(get_turf(src))
|
||||
stored.forceMove(shape.loc)
|
||||
stored.notransform = FALSE
|
||||
if(shape.mind)
|
||||
shape.mind.transfer_to(stored)
|
||||
|
||||
Reference in New Issue
Block a user