Adds a very basic soft restriction system. There's definite room for improvement, but this is good enough for now. Am too hongry for this.
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
H.socks = random_socks(H.gender)
|
||||
//H.eye_color = random_eye_color()
|
||||
REMOVE_TRAIT(H, TRAIT_DISFIGURED, null) //
|
||||
H.dna.features = random_features()
|
||||
H.dna.features = random_features(H.dna.species?.id)
|
||||
|
||||
// Apply Appearance
|
||||
H.update_body() // Outfit and underware, also body.
|
||||
|
||||
@@ -210,6 +210,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/icon/bgstate = "steel"
|
||||
var/list/bgstate_options = list("000", "midgrey", "FFF", "white", "steel", "techmaint", "dark", "plating", "reinforced")
|
||||
|
||||
var/show_mismatched_markings = FALSE //determines whether or not the markings lists should show markings that don't match the currently selected species. Intentionally left unsaved.
|
||||
|
||||
/datum/preferences/New(client/C)
|
||||
parent = C
|
||||
|
||||
@@ -411,6 +413,14 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
//Mutant stuff
|
||||
var/mutant_category = 0
|
||||
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
dat += "<h3>Show mismatched markings</h3>"
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=mismatched_markings;task=input'>[show_mismatched_markings ? "Yes" : "No"]</a>"
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS) //just in case someone sets the max rows to 1 or something dumb like that
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if("tail_lizard" in pref_species.default_features)
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
@@ -1618,6 +1628,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
else
|
||||
to_chat(user, "<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
|
||||
if("mismatched_markings")
|
||||
show_mismatched_markings = !show_mismatched_markings
|
||||
|
||||
if("ipc_screen")
|
||||
var/new_ipc_screen
|
||||
new_ipc_screen = input(user, "Choose your character's screen:", "Character Preference") as null|anything in GLOB.ipc_screens_list
|
||||
@@ -1625,8 +1638,18 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
features["ipc_screen"] = new_ipc_screen
|
||||
|
||||
if("ipc_antenna")
|
||||
var/list/snowflake_antenna_list = list()
|
||||
//Potential todo: turn all of THIS into a define to reduce copypasta.
|
||||
for(var/path in GLOB.ipc_antennas_list)
|
||||
var/datum/sprite_accessory/antenna/instance = GLOB.ipc_antennas_list[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_antenna_list[S.name] = path
|
||||
var/new_ipc_antenna
|
||||
new_ipc_antenna = input(user, "Choose your character's antenna:", "Character Preference") as null|anything in GLOB.ipc_antennas_list
|
||||
new_ipc_antenna = input(user, "Choose your character's antenna:", "Character Preference") as null|anything in snowflake_antenna_list
|
||||
if(new_ipc_antenna)
|
||||
features["ipc_antenna"] = new_ipc_antenna
|
||||
|
||||
@@ -1646,6 +1669,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/sprite_accessory/tails/human/instance = GLOB.tails_list_human[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_tails_list[S.name] = path
|
||||
var/new_tail
|
||||
@@ -1663,6 +1688,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/sprite_accessory/mam_tails/instance = GLOB.mam_tails_list[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_tails_list[S.name] = path
|
||||
var/new_tail
|
||||
@@ -1686,6 +1713,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/sprite_accessory/mam_snouts/instance = GLOB.snouts_list[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_snouts_list[S.name] = path
|
||||
var/new_snout
|
||||
@@ -1701,6 +1730,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/sprite_accessory/mam_snouts/instance = GLOB.mam_snouts_list[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_mam_snouts_list[S.name] = path
|
||||
var/new_mam_snouts
|
||||
@@ -1798,6 +1829,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/sprite_accessory/taur/instance = GLOB.taur_list[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_taur_list[S.name] = path
|
||||
var/new_taur
|
||||
@@ -1816,6 +1849,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/sprite_accessory/ears/instance = GLOB.ears_list[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_ears_list[S.name] = path
|
||||
var/new_ears
|
||||
@@ -1829,6 +1864,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/sprite_accessory/mam_ears/instance = GLOB.mam_ears_list[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_ears_list[S.name] = path
|
||||
var/new_ears
|
||||
@@ -1842,6 +1879,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/sprite_accessory/mam_body_markings/instance = GLOB.mam_body_markings_list[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_markings_list[S.name] = path
|
||||
var/new_mam_body_markings
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
if(!pref_species)
|
||||
var/rando_race = pick(GLOB.roundstart_races)
|
||||
pref_species = new rando_race()
|
||||
features = random_features()
|
||||
features = random_features(pref_species?.id)
|
||||
age = rand(AGE_MIN,AGE_MAX)
|
||||
|
||||
/datum/preferences/proc/update_preview_icon(equip_job = TRUE)
|
||||
|
||||
@@ -71,6 +71,9 @@
|
||||
|
||||
//for snowflake/donor specific sprites
|
||||
var/list/ckeys_allowed
|
||||
|
||||
//For soft-restricting markings to species IDs
|
||||
var/list/recommended_species
|
||||
|
||||
/datum/sprite_accessory/underwear
|
||||
icon = 'icons/mob/underwear.dmi'
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
color_src = MATRIXED
|
||||
gender_specific = 0
|
||||
icon = 'modular_citadel/icons/mob/mam_markings.dmi'
|
||||
recommended_species = list("mammal", "xeno", "slimeperson", "podweak")
|
||||
|
||||
/datum/sprite_accessory/mam_body_markings/none
|
||||
name = "None"
|
||||
|
||||
@@ -132,10 +132,12 @@
|
||||
/datum/sprite_accessory/antenna
|
||||
icon = 'modular_citadel/icons/mob/ipc_antennas.dmi'
|
||||
color_src = MUTCOLORS2
|
||||
recommended_species = list("ipc")
|
||||
|
||||
/datum/sprite_accessory/antenna/none
|
||||
name = "None"
|
||||
icon_state = "None"
|
||||
recommended_species = null
|
||||
|
||||
/datum/sprite_accessory/antenna/antennae
|
||||
name = "Angled Antennae"
|
||||
|
||||
@@ -151,11 +151,12 @@
|
||||
/datum/sprite_accessory/mam_snouts
|
||||
color_src = MATRIXED
|
||||
icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
|
||||
recommended_species = list("mammal", "slimeperson", "insect", "podweak")
|
||||
|
||||
/datum/sprite_accessory/mam_snouts/none
|
||||
name = "None"
|
||||
icon_state = "none"
|
||||
|
||||
recommended_species = null
|
||||
|
||||
/datum/sprite_accessory/mam_snouts/bird
|
||||
name = "Beak"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
//Synth snouts (This is the most important part)
|
||||
/datum/sprite_accessory/mam_snouts/synthliz/synthliz_basic
|
||||
/datum/sprite_accessory/mam_snouts/synthliz
|
||||
recommended_species = list("synthliz")
|
||||
icon = 'modular_citadel/icons/mob/synthliz_snouts.dmi'
|
||||
color_src = MUTCOLORS
|
||||
name = "Synthetic Lizard - Snout"
|
||||
@@ -24,7 +25,8 @@
|
||||
icon_state = "synthliz_tertunder"
|
||||
|
||||
//Synth body markings
|
||||
/datum/sprite_accessory/mam_body_markings/synthliz/synthliz_scutes
|
||||
/datum/sprite_accessory/mam_body_markings/synthliz
|
||||
recommended_species = list("synthliz")
|
||||
icon = 'modular_citadel/icons/mob/synthliz_body_markings.dmi'
|
||||
name = "Synthetic Lizard - Plates"
|
||||
icon_state = "synthlizscutes"
|
||||
@@ -40,26 +42,23 @@
|
||||
icon_state = "synthlizpecslight"
|
||||
|
||||
//Synth tails
|
||||
/datum/sprite_accessory/mam_tails/synthliz/synthliz_tail
|
||||
/datum/sprite_accessory/mam_tails/synthliz
|
||||
recommended_species = list("synthliz")
|
||||
icon = 'modular_citadel/icons/mob/synthliz_tails.dmi'
|
||||
color_src = MUTCOLORS
|
||||
name = "Synthetic Lizard"
|
||||
icon_state = "synthliz"
|
||||
|
||||
/datum/sprite_accessory/mam_tails_animated/synthliz/synthliz_tail
|
||||
/datum/sprite_accessory/mam_tails_animated/synthliz
|
||||
recommended_species = list("synthliz")
|
||||
icon = 'modular_citadel/icons/mob/synthliz_tails.dmi'
|
||||
color_src = MUTCOLORS
|
||||
name = "Synthetic Lizard"
|
||||
icon_state = "synthliz"
|
||||
|
||||
//Synth Antennae
|
||||
/datum/sprite_accessory/antenna/synthliz/synthliz_none
|
||||
icon = 'modular_citadel/icons/mob/synthliz_antennas.dmi'
|
||||
color_src = MUTCOLORS
|
||||
name = "None"
|
||||
icon_state = "None"
|
||||
|
||||
/datum/sprite_accessory/antenna/synthliz/synthliz_antennae
|
||||
/datum/sprite_accessory/antenna/synthliz
|
||||
recommended_species = list("synthliz")
|
||||
icon = 'modular_citadel/icons/mob/synthliz_antennas.dmi'
|
||||
color_src = MUTCOLORS
|
||||
name = "Synthetic Lizard - Antennae"
|
||||
|
||||
@@ -501,10 +501,12 @@
|
||||
/datum/sprite_accessory/mam_tails
|
||||
color_src = MATRIXED
|
||||
icon = 'modular_citadel/icons/mob/mam_tails.dmi'
|
||||
recommended_species = list("mammal", "slimeperson", "podweak", "felinid", "insect")
|
||||
|
||||
/datum/sprite_accessory/mam_tails/none
|
||||
name = "None"
|
||||
icon_state = "none"
|
||||
recommended_species = null
|
||||
|
||||
/datum/sprite_accessory/mam_tails_animated
|
||||
color_src = MATRIXED
|
||||
|
||||
Reference in New Issue
Block a user