mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-31 07:57:47 +01:00
adds contort body to changelings (#21259)
* adds contort body to changelings * more changes * sprite by mcramon * Update code/game/machinery/doors/firedoor.dm Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> * steels review --------- Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/datum/action/changeling/contort_body
|
||||
name = "Contort Body"
|
||||
desc = "We contort our body, allowing us to fit in and under things we normally wouldn't be able to. Costs 5 chemicals."
|
||||
button_icon_state = "contort_body"
|
||||
chemical_cost = 5
|
||||
dna_cost = 2
|
||||
power_type = CHANGELING_PURCHASABLE_POWER
|
||||
|
||||
/datum/action/changeling/contort_body/Remove(mob/M)
|
||||
REMOVE_TRAIT(M, TRAIT_CONTORTED_BODY, CHANGELING_TRAIT)
|
||||
..()
|
||||
|
||||
/datum/action/changeling/contort_body/sting_action(mob/living/user)
|
||||
if(HAS_TRAIT_FROM(user, TRAIT_CONTORTED_BODY, CHANGELING_TRAIT))
|
||||
REMOVE_TRAIT(user, TRAIT_CONTORTED_BODY, CHANGELING_TRAIT)
|
||||
to_chat(user, "<span class='notice'>Our body stiffens and returns to form.</span>")
|
||||
if(IS_HORIZONTAL(user))
|
||||
user.layer = initial(user.layer)
|
||||
else
|
||||
ADD_TRAIT(user, TRAIT_CONTORTED_BODY, CHANGELING_TRAIT)
|
||||
to_chat(user, "<span class='notice'>We contort our form to allow us to fit in and under things we normally wouldn't be able to.</span>")
|
||||
if(IS_HORIZONTAL(user))
|
||||
user.layer = TURF_LAYER + 0.2
|
||||
|
||||
SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("[name]"))
|
||||
return TRUE
|
||||
@@ -111,7 +111,10 @@ STATUS EFFECTS
|
||||
|
||||
/mob/living/proc/on_lying_down(new_lying_angle)
|
||||
if(layer == initial(layer)) //to avoid things like hiding larvas.
|
||||
layer = LYING_MOB_LAYER //so mob lying always appear behind standing mobs
|
||||
if(HAS_TRAIT(src, TRAIT_CONTORTED_BODY))
|
||||
layer = TURF_LAYER + 0.2
|
||||
else
|
||||
layer = LYING_MOB_LAYER //so mob lying always appear behind standing mobs
|
||||
pixel_y = PIXEL_Y_OFFSET_LYING
|
||||
ADD_TRAIT(src, TRAIT_UI_BLOCKED, LYING_DOWN_TRAIT)
|
||||
ADD_TRAIT(src, TRAIT_CANNOT_PULL, LYING_DOWN_TRAIT)
|
||||
@@ -120,7 +123,7 @@ STATUS EFFECTS
|
||||
set_lying_angle(pick(90, 270))
|
||||
|
||||
/mob/living/proc/on_standing_up()
|
||||
if(layer == LYING_MOB_LAYER)
|
||||
if(layer == LYING_MOB_LAYER || HAS_TRAIT(src, TRAIT_CONTORTED_BODY))
|
||||
layer = initial(layer)
|
||||
set_density(initial(density))
|
||||
REMOVE_TRAITS_IN(src, LYING_DOWN_TRAIT)
|
||||
|
||||
Reference in New Issue
Block a user