mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
Wings negate fall damage from short falls (remake) (#62800)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
@@ -48,11 +48,15 @@
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/ZImpactDamage(turf/T, levels)
|
||||
if(!HAS_TRAIT(src, TRAIT_FREERUNNING) || levels > 1) // falling off one level
|
||||
if(stat != CONSCIOUS || levels > 1) // you're not The One
|
||||
return ..()
|
||||
visible_message(span_danger("[src] makes a hard landing on [T] but remains unharmed from the fall."), \
|
||||
span_userdanger("You brace for the fall. You make a hard landing on [T] but remain unharmed."))
|
||||
Knockdown(levels * 40)
|
||||
var/obj/item/organ/external/wings/gliders = getorgan(/obj/item/organ/external/wings)
|
||||
if(HAS_TRAIT(src, TRAIT_FREERUNNING) || gliders?.can_soften_fall()) // the power of parkour or wings allows falling short distances unscathed
|
||||
visible_message(span_danger("[src] makes a hard landing on [T] but remains unharmed from the fall."), \
|
||||
span_userdanger("You brace for the fall. You make a hard landing on [T] but remain unharmed."))
|
||||
Knockdown(levels * 40)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/prepare_data_huds()
|
||||
//Update med hud images...
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
///Checks if the wings can soften short falls
|
||||
/obj/item/organ/external/wings/proc/can_soften_fall()
|
||||
return TRUE
|
||||
|
||||
///The true wings that you can use to fly and shit (you cant actually shit with them)
|
||||
/obj/item/organ/external/wings/functional
|
||||
///The flight action object
|
||||
@@ -187,6 +191,9 @@
|
||||
UnregisterSignal(organ_owner, list(COMSIG_HUMAN_BURNING, COMSIG_LIVING_POST_FULLY_HEAL, COMSIG_MOVABLE_PRE_MOVE))
|
||||
REMOVE_TRAIT(organ_owner, TRAIT_FREE_FLOAT_MOVEMENT, src)
|
||||
|
||||
/obj/item/organ/external/wings/moth/can_soften_fall()
|
||||
return !burnt
|
||||
|
||||
///Check if we can flutter around
|
||||
/obj/item/organ/external/wings/moth/proc/update_float_move()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
Reference in New Issue
Block a user