Added Skin Reagent Trait (#19083)

* Added Skin Reagent Trait

On today's episode of "Satin sees a funny suggestion on the discord and implements it, but it's harder than she expects":

Added a new Skin Reagent trait, that allows you to pick one of six reagents that coat your skin and are applied to people when they lick you. These include: Ethanol, Capsaicin, Sleep Toxin, Rainbow Toxin, Paralysis Toxin and Pain Enzyme.

Does not trigger on licking yourself.

Also added a new option to traits to allow you to use a single list for them to select preferences, using a list variable called "multiple_choice".

Tested and seems to work great.

* Have salt as an option too, go on

* Removes flags, lazys the list

Not 100% sure if I've done the lazy right, I've not done much with lazy lists before.
This commit is contained in:
SatinIsle
2026-01-24 22:54:31 +00:00
committed by GitHub
parent 489144da8c
commit ce8cb4d05a
7 changed files with 43 additions and 1 deletions
@@ -9,6 +9,7 @@
#define TRAIT_PREF_TYPE_BOOLEAN 1
#define TRAIT_PREF_TYPE_COLOR 2
#define TRAIT_PREF_TYPE_STRING 3
#define TRAIT_PREF_TYPE_LIST 4
#define TRAIT_NO_VAREDIT_TARGET 0
#define TRAIT_VAREDIT_TARGET_SPECIES 1
@@ -1621,7 +1621,7 @@
cost = 0
custom_only = FALSE
has_preferences = list("bubble_toggle" = list(TRAIT_PREF_TYPE_BOOLEAN, "Dodge physical contact on spawn", TRAIT_NO_VAREDIT_TARGET, TRUE),
"pickup_dodge_toggle" = list(TRAIT_PREF_TYPE_BOOLEAN, "Dodge pickup attempts on spawn", TRAIT_NO_VAREDIT_TARGET, TRUE))
"pickup_dodge_toggle" = list(TRAIT_PREF_TYPE_BOOLEAN, "Dodge pickup attempts on spawn", TRAIT_NO_VAREDIT_TARGET, TRUE))
/datum/trait/neutral/personal_space/apply(var/datum/species/S, var/mob/living/carbon/human/H, var/list/trait_prefs)
..()
@@ -1632,6 +1632,19 @@
add_verb(H, /mob/living/proc/toggle_personal_space)
add_verb(H, /mob/living/proc/toggle_pickup_dodge)
/datum/trait/neutral/skin_reagents
name = "Skin Reagents"
desc = "You secret some sort of reagent across your skin that can poison those who dare to lick you."
cost = 0
custom_only = FALSE
multiple_choice = list(REAGENT_ID_ETHANOL, REAGENT_ID_CAPSAICIN, REAGENT_ID_SODIUMCHLORIDE, REAGENT_ID_STOXIN, REAGENT_ID_RAINBOWTOXIN, REAGENT_ID_PARALYSISTOXIN, REAGENT_ID_PAINENZYME)
has_preferences = list("Reagent" = list(TRAIT_PREF_TYPE_LIST, "Skin Reagent", TRAIT_NO_VAREDIT_TARGET, REAGENT_ID_ETHANOL))
/datum/trait/neutral/skin_reagents/apply(var/datum/species/S, var/mob/living/carbon/human/H, var/list/trait_prefs)
..()
if(trait_prefs && trait_prefs["Reagent"])
H.skin_reagent = trait_prefs["Reagent"]
/datum/trait/neutral/colour_changing_eyes
name = "Colour changing eyes"
desc = "You can change your eye color at will using an intuitive mental process."
@@ -41,6 +41,8 @@
var/datum/gene/trait/linked_gene = null // Internal use, do not assign.
var/list/multiple_choice
@@ -170,6 +172,8 @@
return "#ffffff"
if(TRAIT_PREF_TYPE_STRING) //string
return ""
if(TRAIT_PREF_TYPE_LIST) //list
return ""
return
/datum/trait/proc/apply_sanitization_to_string(var/pref, var/input)