From 52bd80b998cdeff537e7dc51e5b69252f75cbccc Mon Sep 17 00:00:00 2001 From: Meiler Date: Sun, 5 Mar 2023 01:59:24 +0100 Subject: [PATCH] initial --- code/__DEFINES/quirks.dm | 4 ++++ code/__DEFINES/~~bubber_defines/traits.dm | 1 + code/datums/quirks/_quirk.dm | 5 +++++ .../reagents/chemistry/reagents/other_reagents.dm | 5 +++++ .../code/datums/bubber_quirks/hydrophilic.dm | 11 +++++++++++ tgstation.dme | 2 ++ 6 files changed, 28 insertions(+) create mode 100644 code/__DEFINES/~~bubber_defines/traits.dm create mode 100644 modular_zubbers/code/datums/bubber_quirks/hydrophilic.dm diff --git a/code/__DEFINES/quirks.dm b/code/__DEFINES/quirks.dm index 290fed93c95..17b39898969 100644 --- a/code/__DEFINES/quirks.dm +++ b/code/__DEFINES/quirks.dm @@ -12,3 +12,7 @@ #define QUIRK_CHANGES_APPEARANCE (1<<2) /// The only thing this quirk effects is mood so it should be disabled if mood is #define QUIRK_MOODLET_BASED (1<<3) + +//BUBBER EDIT ADDITION - Slime specific traits +/// This quirk can only be applied to roundstartslimes +#define QUIRK_SLIMEPERSON_ONLY (1<<4) diff --git a/code/__DEFINES/~~bubber_defines/traits.dm b/code/__DEFINES/~~bubber_defines/traits.dm new file mode 100644 index 00000000000..ec675566419 --- /dev/null +++ b/code/__DEFINES/~~bubber_defines/traits.dm @@ -0,0 +1 @@ +#define TRAIT_HYDROPHILIC "hydrophilic" diff --git a/code/datums/quirks/_quirk.dm b/code/datums/quirks/_quirk.dm index 85885e62127..21ad4d51501 100644 --- a/code/datums/quirks/_quirk.dm +++ b/code/datums/quirks/_quirk.dm @@ -61,6 +61,11 @@ if((quirk_flags & QUIRK_HUMAN_ONLY) && !ishuman(new_holder)) CRASH("Human only quirk attempted to be added to non-human mob.") + //BUBBER EDIT ADDITION - Slime-specific quirk check + if(quirk_flags & QUIRK_SLIMEPERSON_ONLY && !isroundstartslime(new_holder)) //I don't think we want this quirk on non-slimes. + CRASH("Slime-only quirk attempted to be added to a non-slimeperson.") + //BUBBER EDIT END + if(new_holder.has_quirk(type)) CRASH("Quirk attempted to be added to mob which already had this quirk.") diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index c4cff0d1b1a..e10086da4bf 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -253,6 +253,11 @@ /datum/reagent/water/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume)//Splashing people with water can help put them out! . = ..() if(methods & TOUCH) + if(HAS_TRAIT(exposed_mob, TRAIT_HYDROPHILIC)) //BUBBER EDIT - Hydrophilic trait + exposed_mob.blood_volume = max(exposed_mob.blood_volume - 30, 0) //So we don't end up with slimes going to -2535% blood. + to_chat(exposed_mob, span_warning("The water causes you to melt away!")) + return + exposed_mob.extinguish_mob() // extinguish removes all fire stacks if(methods & VAPOR) if(!isfeline(exposed_mob)) // SKYRAT EDIT - Feline trait :) diff --git a/modular_zubbers/code/datums/bubber_quirks/hydrophilic.dm b/modular_zubbers/code/datums/bubber_quirks/hydrophilic.dm new file mode 100644 index 00000000000..31c6443f7db --- /dev/null +++ b/modular_zubbers/code/datums/bubber_quirks/hydrophilic.dm @@ -0,0 +1,11 @@ +/datum/quirk/hydrophilic + name = "Hydrophilic" + desc = "Your molecules are highly hydrophilic - or, in layman's terms, dissolve very well in water." + icon = "bug" // I can't be asked to make an icon for this, my spritework sucks. + value = 0 //Neutral quirk for RP stuff. I don't know TGUI so I can't make it whitelisted. + quirk_flags = QUIRK_HUMAN_ONLY|QUIRK_MOODLET_BASED|QUIRK_SLIMEPERSON_ONLY + gain_text = "You have a feeling you should stay away from water..." + lose_text = "Somehow, you feel as if water is no longer dangerous." + medical_record_text = "Patient scans indicate extreme hydrophilicity." + hardcore_value = 0 + mob_trait = TRAIT_HYDROPHILIC diff --git a/tgstation.dme b/tgstation.dme index 81fb1099a00..0642ff381dd 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -384,6 +384,7 @@ #include "code\__DEFINES\~skyrat_defines\_HELPERS\atmos_mapping_helpers.dm" #include "code\__DEFINES\~skyrat_defines\_HELPERS\lighting.dm" #include "code\__DEFINES\~~bubber_defines\access.dm" +#include "code\__DEFINES\~~bubber_defines\traits.dm" #include "code\__HELPERS\_auxtools_api.dm" #include "code\__HELPERS\_lists.dm" #include "code\__HELPERS\_planes.dm" @@ -6539,6 +6540,7 @@ #include "modular_skyrat\modules\xenos_skyrat_redo\code\xeno_types\spitter.dm" #include "modular_skyrat\modules\xenos_skyrat_redo\code\xeno_types\warrior.dm" #include "modular_zubbers\code\datums\ert.dm" +#include "modular_zubbers\code\datums\bubber_quirks\hydrophilic.dm" #include "modular_zubbers\code\datums\id_trim\jobs.dm" #include "modular_zubbers\code\game\area\areas\station.dm" #include "modular_zubbers\code\game\objects\effects\landmarks.dm"