From 17e4b60a144ae9bd176ad4d04c83e7bb20788efa Mon Sep 17 00:00:00 2001 From: Mickyan <38563876+Mickyan@users.noreply.github.com> Date: Mon, 15 Nov 2021 06:11:39 +0100 Subject: [PATCH] Wings negate fall damage from short falls (remake) (#62800) Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> --- code/modules/mob/living/carbon/human/human.dm | 12 ++++++++---- code/modules/surgery/organs/external/wings.dm | 7 +++++++ .../PreferencesMenu/preferences/species/moth.ts | 4 ++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index f81e3efd922..87e35da8c45 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -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... diff --git a/code/modules/surgery/organs/external/wings.dm b/code/modules/surgery/organs/external/wings.dm index 9b7a2e7a4e4..5feab938853 100644 --- a/code/modules/surgery/organs/external/wings.dm +++ b/code/modules/surgery/organs/external/wings.dm @@ -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 diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/species/moth.ts b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/species/moth.ts index 338c650ddbb..ff022c2b93b 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/species/moth.ts +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/species/moth.ts @@ -8,8 +8,8 @@ const Moth: Species = { good: [{ icon: "feather-alt", name: "Precious Wings", - description: "Moths can fly in pressurized, zero-g environments using \ - their wings.", + description: "Moths can fly in pressurized, zero-g environments and \ + safely land short falls using their wings.", }, { icon: "tshirt", name: "Meal Plan",