From 7676a09f5feb70061ca5e8868dcfa49c302f3925 Mon Sep 17 00:00:00 2001 From: Sheits <81964183+Sheits@users.noreply.github.com> Date: Sat, 17 Jul 2021 08:47:02 +1000 Subject: [PATCH] Fixes the flightpotion check to include new races (again) (#60084) Flight potions now work on fly people, androids and skeletons. --- code/__DEFINES/traits.dm | 2 ++ code/modules/mining/lavaland/necropolis_chests.dm | 2 +- .../mob/living/carbon/human/species_types/android.dm | 1 + .../mob/living/carbon/human/species_types/flypeople.dm | 5 +++++ .../mob/living/carbon/human/species_types/humans.dm | 5 +++++ .../mob/living/carbon/human/species_types/lizardpeople.dm | 7 ++++++- .../mob/living/carbon/human/species_types/mothmen.dm | 5 +++++ .../mob/living/carbon/human/species_types/skeletons.dm | 1 + 8 files changed, 26 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 5ebcd396b84..9349457c735 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -323,6 +323,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_BLOODSHOT_EYES "bloodshot_eyes" /// This mob should never close UI even if it doesn't have a client #define TRAIT_PRESERVE_UI_WITHOUT_CLIENT "preserve_ui_without_client" +/// Lets the mob use flight potions +#define TRAIT_CAN_USE_FLIGHT_POTION "can_use_flight_potion" /// This mob overrides certian SSlag_switch measures with this special trait #define TRAIT_BYPASS_MEASURES "bypass_lagswitch_measures" diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 6e58ad9993f..098018e4167 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -630,7 +630,7 @@ if(iscarbon(exposed_mob) && exposed_mob.stat != DEAD) var/mob/living/carbon/exposed_carbon = exposed_mob var/holycheck = ishumanbasic(exposed_carbon) - if(reac_volume < 5 || !(holycheck || islizard(exposed_carbon) || ismoth(exposed_carbon))) // implying xenohumans are holy //as with all things, + if(!HAS_TRAIT(exposed_carbon, TRAIT_CAN_USE_FLIGHT_POTION) || reac_volume < 5) if((methods & INGEST) && show_message) to_chat(exposed_carbon, span_notice("You feel nothing but a terrible aftertaste.")) return diff --git a/code/modules/mob/living/carbon/human/species_types/android.dm b/code/modules/mob/living/carbon/human/species_types/android.dm index 45d503da7b1..caa80752736 100644 --- a/code/modules/mob/living/carbon/human/species_types/android.dm +++ b/code/modules/mob/living/carbon/human/species_types/android.dm @@ -20,6 +20,7 @@ TRAIT_NOHUNGER, TRAIT_LIMBATTACHMENT, TRAIT_NOCLONELOSS, + TRAIT_CAN_USE_FLIGHT_POTION, ) inherent_biotypes = MOB_ROBOTIC|MOB_HUMANOID meat = null diff --git a/code/modules/mob/living/carbon/human/species_types/flypeople.dm b/code/modules/mob/living/carbon/human/species_types/flypeople.dm index 4d2d119b2b5..7c664a05aa8 100644 --- a/code/modules/mob/living/carbon/human/species_types/flypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/flypeople.dm @@ -3,6 +3,11 @@ id = SPECIES_FLY say_mod = "buzzes" species_traits = list(HAS_FLESH, HAS_BONE, TRAIT_ANTENNAE) + inherent_traits = list( + TRAIT_ADVANCEDTOOLUSER, + TRAIT_CAN_STRIP, + TRAIT_CAN_USE_FLIGHT_POTION, + ) inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BUG meat = /obj/item/food/meat/slab/human/mutant/fly mutanteyes = /obj/item/organ/eyes/fly diff --git a/code/modules/mob/living/carbon/human/species_types/humans.dm b/code/modules/mob/living/carbon/human/species_types/humans.dm index 739cbeff215..a12c2cfc9e1 100644 --- a/code/modules/mob/living/carbon/human/species_types/humans.dm +++ b/code/modules/mob/living/carbon/human/species_types/humans.dm @@ -3,6 +3,11 @@ id = SPECIES_HUMAN default_color = "FFFFFF" species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,HAS_FLESH,HAS_BONE) + inherent_traits = list( + TRAIT_ADVANCEDTOOLUSER, + TRAIT_CAN_STRIP, + TRAIT_CAN_USE_FLIGHT_POTION, + ) mutant_bodyparts = list("wings" = "None") use_skintones = 1 skinned_type = /obj/item/stack/sheet/animalhide/human diff --git a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm index d01e15a33ee..cf1fe70dde2 100644 --- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm @@ -4,7 +4,12 @@ id = SPECIES_LIZARD say_mod = "hisses" default_color = "00FF00" - species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAS_FLESH,HAS_BONE) + species_traits = list(MUTCOLORS, EYECOLOR, LIPS, HAS_FLESH, HAS_BONE) + inherent_traits = list( + TRAIT_ADVANCEDTOOLUSER, + TRAIT_CAN_STRIP, + TRAIT_CAN_USE_FLIGHT_POTION, + ) inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_REPTILE mutant_bodyparts = list("tail_lizard" = "Smooth", "spines" = "None", "body_markings" = "None", "legs" = "Normal Legs") external_organs = list(/obj/item/organ/external/horns = "None", diff --git a/code/modules/mob/living/carbon/human/species_types/mothmen.dm b/code/modules/mob/living/carbon/human/species_types/mothmen.dm index 312d11e5c17..e2985632a3d 100644 --- a/code/modules/mob/living/carbon/human/species_types/mothmen.dm +++ b/code/modules/mob/living/carbon/human/species_types/mothmen.dm @@ -4,6 +4,11 @@ say_mod = "flutters" default_color = "00FF00" species_traits = list(LIPS, HAS_FLESH, HAS_BONE, HAS_MARKINGS, TRAIT_ANTENNAE) + inherent_traits = list( + TRAIT_ADVANCEDTOOLUSER, + TRAIT_CAN_STRIP, + TRAIT_CAN_USE_FLIGHT_POTION, + ) inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BUG mutant_bodyparts = list("moth_markings" = "None") external_organs = list(/obj/item/organ/external/wings/moth = "Plain", /obj/item/organ/external/antennae = "Plain") diff --git a/code/modules/mob/living/carbon/human/species_types/skeletons.dm b/code/modules/mob/living/carbon/human/species_types/skeletons.dm index 0334c9839cd..907db761bcb 100644 --- a/code/modules/mob/living/carbon/human/species_types/skeletons.dm +++ b/code/modules/mob/living/carbon/human/species_types/skeletons.dm @@ -25,6 +25,7 @@ TRAIT_FAKEDEATH, TRAIT_XENO_IMMUNE, TRAIT_NOCLONELOSS, + TRAIT_CAN_USE_FLIGHT_POTION, ) inherent_biotypes = MOB_UNDEAD|MOB_HUMANOID mutanttongue = /obj/item/organ/tongue/bone