diff --git a/aurorastation.dme b/aurorastation.dme index f80520d79d4..9418d672c10 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -536,6 +536,7 @@ #include "code\datums\components\skills\science\xenobiology_skill_component.dm" #include "code\datums\components\skills\science\xenobotany_skill_component.dm" #include "code\datums\components\skills\service\bartending_skill_component.dm" +#include "code\datums\components\skills\service\carousing_skill_component.dm" #include "code\datums\components\skills\service\cooking_skill_component.dm" #include "code\datums\components\skills\service\entertaining_skill_component.dm" #include "code\datums\components\skills\service\gardening_skill_component.dm" diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 136985da318..a643763b916 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -26,6 +26,7 @@ #define FORENSICS_SKILL_COMPONENT /datum/component/skill/forensics #define PHARMACOLOGY_SKILL_COMPONENT /datum/component/skill/pharmacology #define SURGERY_SKILL_COMPONENT /datum/component/skill/surgery +#define CAROUSING_SKILL_COMPONENT /datum/component/skill/carousing /** * Trinary-Boolean helper that either returns null, or the skill level of a given skill component(which can be zero). diff --git a/code/__DEFINES/skills.dm b/code/__DEFINES/skills.dm index f3c1ea175c0..989e7f178a9 100644 --- a/code/__DEFINES/skills.dm +++ b/code/__DEFINES/skills.dm @@ -11,6 +11,7 @@ #define SKILL_CATEGORY_EVERYDAY "Everyday" #define SKILL_SUBCATEGORY_SERVICE "Service" #define SKILL_SUBCATEGORY_MUNDANE "Mundane" + #define SKILL_SUBCATEGORY_PHYSICAL "Physical" /// Occupational skills are the skills necessary for you to do your job to a minimum degree. #define SKILL_CATEGORY_OCCUPATIONAL "Occupational" diff --git a/code/datums/components/skills/service/carousing_skill_component.dm b/code/datums/components/skills/service/carousing_skill_component.dm new file mode 100644 index 00000000000..24319bfbb17 --- /dev/null +++ b/code/datums/components/skills/service/carousing_skill_component.dm @@ -0,0 +1,21 @@ +/datum/component/skill/carousing + /// The amount of bonus liver efficiency per bought rank of the Carousing skill + var/filter_strength_mod_per_rank = 0.05 + +/datum/component/skill/carousing/Initialize(level) + . = ..() + if (!parent) + return + + RegisterSignal(parent, COMSIG_LIVER_FILTER_EVENT, PROC_REF(modify_liver)) + +/datum/component/skill/carousing/Destroy(force) + if (!parent) + return ..() + + UnregisterSignal(parent, COMSIG_LIVER_FILTER_EVENT) + return ..() + +/datum/component/skill/carousing/proc/modify_liver(owner, filter_effect, filter_strength, toxin_healing_rate, canceled) + SIGNAL_HANDLER + *filter_strength = *filter_strength * (1 + (skill_level - 1) * filter_strength_mod_per_rank) diff --git a/code/datums/skills/everyday/service.dm b/code/datums/skills/everyday/service.dm index 4caa2c77ce7..632310d886e 100644 --- a/code/datums/skills/everyday/service.dm +++ b/code/datums/skills/everyday/service.dm @@ -42,3 +42,18 @@ // category = /singleton/skill_category/everyday // subcategory = SKILL_SUBCATEGORY_SERVICE // component_type = ENTERTAINING_SKILL_COMPONENT + +/singleton/skill/carousing + name = "Carousing" + description = "Represents a character's ability to resist drugs and alcohol. Higher ranks in this skill slightly improve the filtration effectiveness of the character's liver. " \ + + "This does nothing for characters that don't have a liver." + maximum_level = SKILL_LEVEL_PROFESSIONAL + category = /singleton/skill_category/everyday + subcategory = SKILL_SUBCATEGORY_PHYSICAL + component_type = CAROUSING_SKILL_COMPONENT + skill_level_descriptions = alist( + SKILL_LEVEL_UNFAMILIAR = "You have no modifiers to drinking or doing drugs.", + SKILL_LEVEL_FAMILIAR = "Your liver is 5% more effective at filtering drugs and alcohol.", + SKILL_LEVEL_TRAINED = "Your liver is 10% more effective at filtering drugs and alcohol.", + SKILL_LEVEL_PROFESSIONAL = "Your liver is 15% more effective at filtering drugs and alcohol." + ) diff --git a/html/changelogs/hellfirejag-carousing-skill.yml b/html/changelogs/hellfirejag-carousing-skill.yml new file mode 100644 index 00000000000..f9b44a41267 --- /dev/null +++ b/html/changelogs/hellfirejag-carousing-skill.yml @@ -0,0 +1,4 @@ +author: Hellfirejag +delete-after: True +changes: + - rscadd: "Added Carousing as a small new Everyday skill. Having ranks in Carousing makes you slightly more resistant to drugs and alcohol."