mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Fixes dusting. (#22344)
* dust properly * oops * Update code/_globalvars/traits.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> --------- Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
@@ -211,6 +211,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
#define TRAIT_XENO_INTERACTABLE "can_be_interacted_with_by_xenos"
|
||||
#define TRAIT_DODGE_ALL_OBJECTS "dodges_all_objects" /// Allows a mob to dodge all thrown objects
|
||||
#define TRAIT_BADASS "trait_badass"
|
||||
#define TRAIT_FORCED_STANDING "forced_standing" // The mob cannot be floored, or lie down
|
||||
|
||||
//***** ITEM AND MOB TRAITS *****//
|
||||
/// Show what machine/door wires do when held.
|
||||
|
||||
@@ -82,7 +82,8 @@ GLOBAL_LIST_INIT(traits_by_type, list(
|
||||
"TRAIT_TABLE_LEAP" = TRAIT_TABLE_LEAP,
|
||||
"TRAIT_DODGE_ALL_THROWN_OBJECTS" = TRAIT_DODGE_ALL_OBJECTS,
|
||||
"TRAIT_SUPERMATTER_IMMUNE" = TRAIT_SUPERMATTER_IMMUNE,
|
||||
"TRAIT_BADASS" = TRAIT_BADASS
|
||||
"TRAIT_BADASS" = TRAIT_BADASS,
|
||||
"TRAIT_FORCED_STANDING" = TRAIT_FORCED_STANDING
|
||||
),
|
||||
/obj/item = list(
|
||||
"TRAIT_SHOW_WIRE_INFO" = TRAIT_SHOW_WIRE_INFO,
|
||||
|
||||
@@ -20,11 +20,6 @@
|
||||
return FALSE
|
||||
to_chat(imp_in, "<span class='notice'>Your dusting bio-chip activates!</span>")
|
||||
imp_in.visible_message("<span class = 'warning'>[imp_in] burns up in a flash!</span>")
|
||||
for(var/obj/item/I in imp_in.contents)
|
||||
if(I == src)
|
||||
continue
|
||||
if(I.flags & NODROP)
|
||||
qdel(I)
|
||||
imp_in.dust()
|
||||
|
||||
/obj/item/implant/dust/emp_act(severity)
|
||||
|
||||
@@ -3,14 +3,9 @@
|
||||
GLOB.carbon_list += src
|
||||
|
||||
/mob/living/carbon/Destroy()
|
||||
// We need to delete the back slot first, for modsuits. Otherwise, we have issues.
|
||||
if(back)
|
||||
var/obj/I = back
|
||||
unEquip(I)
|
||||
qdel(I)
|
||||
// This clause is here due to items falling off from limb deletion
|
||||
for(var/obj/item in get_all_slots())
|
||||
unEquip(item)
|
||||
unEquip(item, silent = TRUE)
|
||||
qdel(item)
|
||||
QDEL_LIST_CONTENTS(internal_organs)
|
||||
QDEL_LIST_CONTENTS(stomach_contents)
|
||||
|
||||
@@ -43,21 +43,24 @@
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/dust()
|
||||
if(!IS_HORIZONTAL(src))
|
||||
// keep us upright so the animation fits.
|
||||
ADD_TRAIT(src, TRAIT_FORCED_STANDING, TRAIT_GENERIC)
|
||||
if(!death(TRUE) && stat != DEAD)
|
||||
return FALSE
|
||||
notransform = TRUE
|
||||
dust_animation()
|
||||
QDEL_IN(src, 20)
|
||||
QDEL_IN(src, 2 SECONDS)
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/dust_animation()
|
||||
// Animate them being dusted out of existence
|
||||
var/obj/effect/dusting_anim/dust_effect = new(loc, UID())
|
||||
filters += filter(type = "displace", size = 256, render_source = "*snap[UID()]")
|
||||
animate(src, alpha = 0, time = 20, easing = (EASE_IN | SINE_EASING))
|
||||
animate(src, alpha = 0, time = 2 SECONDS, easing = (EASE_IN | SINE_EASING))
|
||||
|
||||
new dna.species.remains_type(get_turf(src))
|
||||
QDEL_IN(dust_effect, 20)
|
||||
QDEL_IN(dust_effect, 2 SECONDS)
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/melt()
|
||||
|
||||
@@ -372,13 +372,13 @@
|
||||
return null
|
||||
|
||||
/mob/living/carbon/human/get_all_slots()
|
||||
. = get_head_slots() | get_body_slots()
|
||||
. = get_body_slots() | get_head_slots()
|
||||
|
||||
/mob/living/carbon/human/proc/get_body_slots()
|
||||
return list(
|
||||
back,
|
||||
l_hand,
|
||||
r_hand,
|
||||
back,
|
||||
s_store,
|
||||
handcuffed,
|
||||
legcuffed,
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_FLOORED), PROC_REF(on_floored_trait_gain))
|
||||
RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_FLOORED), PROC_REF(on_floored_trait_loss))
|
||||
|
||||
RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_FORCED_STANDING), PROC_REF(on_forced_standing_trait_gain))
|
||||
RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_FORCED_STANDING), PROC_REF(on_forced_standing_trait_loss))
|
||||
|
||||
RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_HANDS_BLOCKED), PROC_REF(on_handsblocked_trait_gain))
|
||||
RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_HANDS_BLOCKED), PROC_REF(on_handsblocked_trait_loss))
|
||||
|
||||
@@ -50,6 +53,8 @@
|
||||
/// Called when [TRAIT_FLOORED] is added to the mob.
|
||||
/mob/living/proc/on_floored_trait_gain(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
if(HAS_TRAIT(src, TRAIT_FORCED_STANDING))
|
||||
return // Don't go horizontal if mob has forced standing trait.
|
||||
mobility_flags &= ~MOBILITY_STAND
|
||||
on_floored_start()
|
||||
|
||||
@@ -68,6 +73,21 @@
|
||||
if(!resting)
|
||||
stand_up(FALSE)
|
||||
|
||||
/// Called when [TRAIT_FORCED_STANDING] is added to the mob.
|
||||
/mob/living/proc/on_forced_standing_trait_gain(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
set_body_position(STANDING_UP)
|
||||
|
||||
/// Called when [TRAIT_FORCED_STANDING] is removed from the mob.
|
||||
/mob/living/proc/on_forced_standing_trait_loss(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(HAS_TRAIT(src, TRAIT_FLOORED))
|
||||
fall()
|
||||
else if(resting)
|
||||
lay_down()
|
||||
|
||||
/// Called when [TRAIT_HANDS_BLOCKED] is added to the mob.
|
||||
/mob/living/proc/on_handsblocked_trait_gain(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -102,6 +102,9 @@ STATUS EFFECTS
|
||||
return FALSE
|
||||
if(buckled) // if they are buckled they aint movin nowhere
|
||||
return FALSE
|
||||
if(HAS_TRAIT(src, TRAIT_FORCED_STANDING) && new_value == LYING_DOWN)
|
||||
return FALSE
|
||||
|
||||
. = TRUE
|
||||
body_position = new_value
|
||||
if(new_value == LYING_DOWN) // From standing to lying down.
|
||||
|
||||
@@ -433,6 +433,8 @@
|
||||
mod.wearer.add_filter("mod_outline", 3, outline_filter(color = "#000000AA"))
|
||||
animate(mod.wearer, animate_time, pixel_y = mod.wearer.pixel_y - 4, flags = ANIMATION_PARALLEL)
|
||||
mod.wearer.SpinAnimation(1.5)
|
||||
// todo, someone get balance approval to add TRAIT_FORCED_STANDING here, like it is on tg.
|
||||
// Or, register a signal on floored trait signal
|
||||
ADD_TRAIT(mod.wearer, TRAIT_HANDS_BLOCKED, "metriod[UID()]")
|
||||
ADD_TRAIT(mod.wearer, TRAIT_GOTTAGOFAST, "metroid[UID()]")
|
||||
RegisterSignal(mod.wearer, COMSIG_MOB_STATCHANGE, PROC_REF(on_statchange))
|
||||
|
||||
Reference in New Issue
Block a user