Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit698
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/datum/element/cleaning/Attach(datum/target)
|
||||
. = ..()
|
||||
if(!ismovableatom(target))
|
||||
if(!ismovable(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/Clean)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/datum/element/firestacker/Attach(datum/target, amount)
|
||||
. = ..()
|
||||
|
||||
if(!ismovableatom(target))
|
||||
if(!ismovable(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
|
||||
src.amount = amount
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
#define SHORT 5/7
|
||||
#define TALL 7/5
|
||||
|
||||
/datum/element/squish
|
||||
element_flags = ELEMENT_DETACH
|
||||
|
||||
/datum/element/squish/Attach(datum/target, duration)
|
||||
. = ..()
|
||||
if(!iscarbon(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
|
||||
var/mob/living/carbon/C = target
|
||||
var/was_lying = (C.lying != 0)
|
||||
addtimer(CALLBACK(src, .proc/Detach, C, was_lying), duration)
|
||||
|
||||
C.transform = C.transform.Scale(TALL, SHORT)
|
||||
|
||||
/datum/element/squish/Detach(mob/living/carbon/C, was_lying)
|
||||
. = ..()
|
||||
if(istype(C))
|
||||
var/is_lying = (C.lying != 0)
|
||||
if(was_lying == is_lying)
|
||||
C.transform = C.transform.Scale(SHORT, TALL)
|
||||
else
|
||||
C.transform = C.transform.Scale(TALL, SHORT)
|
||||
|
||||
#undef SHORT
|
||||
#undef TALL
|
||||
Reference in New Issue
Block a user