mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 19:44:46 +01:00
Merge branch 'master' into pain-frequency
This commit is contained in:
@@ -338,8 +338,18 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
character.set_gender(pref.biological_gender)
|
||||
|
||||
// Destroy/cyborgize organs and limbs.
|
||||
character.synthetic = null //Clear the existing var.
|
||||
for(var/name in list(BP_HEAD, BP_L_HAND, BP_R_HAND, BP_L_ARM, BP_R_ARM, BP_L_FOOT, BP_R_FOOT, BP_L_LEG, BP_R_LEG, BP_GROIN, BP_TORSO))
|
||||
//VOREStation Edit
|
||||
character.synthetic = pref.species == "Protean" ? all_robolimbs["protean"] : null //Clear the existing var. (unless protean, then switch it to the normal protean limb)
|
||||
var/list/organs_to_edit = list()
|
||||
for (var/name in list(BP_TORSO, BP_HEAD, BP_GROIN, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND, BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT))
|
||||
var/obj/item/organ/external/O = character.organs_by_name[name]
|
||||
if (O)
|
||||
var/x = organs_to_edit.Find(O.parent_organ)
|
||||
if (x == 0)
|
||||
organs_to_edit += name
|
||||
else
|
||||
organs_to_edit.Insert(x+(O.robotic == ORGAN_NANOFORM ? 1 : 0), name)
|
||||
for(var/name in organs_to_edit) //VOREStation edit end
|
||||
var/status = pref.organ_data[name]
|
||||
var/obj/item/organ/external/O = character.organs_by_name[name]
|
||||
if(O)
|
||||
@@ -830,9 +840,10 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
/* VOREStation Removal - No markings whitelist, let people mix/match
|
||||
for(var/M in usable_markings)
|
||||
var/datum/sprite_accessory/S = usable_markings[M]
|
||||
var/datum/species/spec = GLOB.all_species[pref.species]
|
||||
if(!S.species_allowed.len)
|
||||
continue
|
||||
else if(!(pref.species in S.species_allowed))
|
||||
else if(!(pref.species in S.species_allowed) && !(pref.custom_base in S.species_allowed) && !(spec.base_species in S.species_allowed))
|
||||
usable_markings -= M
|
||||
*/ //VOREStation Removal End
|
||||
var/new_marking = tgui_input_list(user, "Choose a body marking:", "Character Preference", usable_markings)
|
||||
|
||||
@@ -368,6 +368,12 @@ var/list/_client_preferences_by_type
|
||||
enabled_description = "Hear"
|
||||
disabled_description = "Silent"
|
||||
|
||||
/datum/client_preference/player_tips
|
||||
description = "Receive Tips Periodically"
|
||||
key = "RECEIVE_TIPS"
|
||||
enabled_description = "Enabled"
|
||||
disabled_description = "Disabled"
|
||||
|
||||
/datum/client_preference/pain_frequency
|
||||
description = "Pain Messages Cooldown"
|
||||
key = "PAIN_FREQUENCY"
|
||||
@@ -375,6 +381,7 @@ var/list/_client_preferences_by_type
|
||||
enabled_description = "Extended"
|
||||
disabled_description = "Default"
|
||||
|
||||
|
||||
/********************
|
||||
* Staff Preferences *
|
||||
********************/
|
||||
|
||||
@@ -139,3 +139,20 @@ Talon pin
|
||||
/datum/gear/accessory/altevian_badge
|
||||
display_name = "altevian badge"
|
||||
path = /obj/item/clothing/accessory/altevian_badge
|
||||
|
||||
/datum/gear/accessory/maid_neck
|
||||
display_name = "maid neck cover"
|
||||
path = /obj/item/clothing/accessory/maid_neck
|
||||
|
||||
/datum/gear/accessory/maid_corset
|
||||
display_name = "maid corset"
|
||||
path = /obj/item/clothing/accessory/maidcorset
|
||||
|
||||
//Antediluvian accessories
|
||||
/datum/gear/accessory/antediluvian
|
||||
display_name = "antediluvian bracers"
|
||||
path = /obj/item/clothing/accessory/antediluvian
|
||||
|
||||
/datum/gear/accessory/antediluvian/loin
|
||||
display_name = "antediluvian loincloth"
|
||||
path = /obj/item/clothing/accessory/antediluvian/loincloth
|
||||
@@ -25,4 +25,8 @@
|
||||
|
||||
/datum/gear/gloves/siren
|
||||
display_name = "gloves, Siren"
|
||||
path = /obj/item/clothing/gloves/fluff/siren
|
||||
path = /obj/item/clothing/gloves/fluff/siren
|
||||
|
||||
/datum/gear/gloves/maid_arms
|
||||
display_name = "maid arm covers"
|
||||
path = /obj/item/clothing/accessory/maid_arms
|
||||
|
||||
@@ -11,14 +11,21 @@
|
||||
display_name = "basic headband"
|
||||
path = /obj/item/clothing/head/fluff/headbando
|
||||
|
||||
/datum/gear/head/maid
|
||||
display_name = "maid headband"
|
||||
path = /obj/item/clothing/head/headband/maid
|
||||
|
||||
/datum/gear/head/headbando/New()
|
||||
..()
|
||||
gear_tweaks += gear_tweak_free_color_choice
|
||||
|
||||
/datum/gear/head/maid
|
||||
display_name = "maid headband selection"
|
||||
path = /obj/item/clothing/head/headband/maid
|
||||
|
||||
/datum/gear/head/maid/New()
|
||||
..()
|
||||
var/list/headbands_list = list()
|
||||
for(var/obj/item/clothing/head/bands as anything in typesof(/obj/item/clothing/head/headband/maid))
|
||||
headbands_list[initial(bands.name)] = bands
|
||||
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(headbands_list))
|
||||
|
||||
//Detective alternative
|
||||
/datum/gear/head/detective_alt
|
||||
display_name = "cyberscope headgear, detective"
|
||||
@@ -57,6 +64,30 @@
|
||||
..()
|
||||
gear_tweaks += gear_tweak_free_color_choice
|
||||
|
||||
/datum/gear/head/wedding
|
||||
display_name = "wedding veil"
|
||||
path = /obj/item/clothing/head/wedding
|
||||
|
||||
/datum/gear/head/wedding/New()
|
||||
..()
|
||||
gear_tweaks += gear_tweak_free_color_choice
|
||||
|
||||
/datum/gear/head/halo/alt
|
||||
display_name = "halo, alt"
|
||||
path = /obj/item/clothing/head/halo/alt
|
||||
|
||||
/datum/gear/head/buckethat
|
||||
display_name = "hat, bucket"
|
||||
path = /obj/item/clothing/head/buckethat
|
||||
|
||||
/datum/gear/head/buckethat/New()
|
||||
..()
|
||||
gear_tweaks += gear_tweak_free_color_choice
|
||||
|
||||
/datum/gear/head/nonla
|
||||
display_name = "hat, non la"
|
||||
path = /obj/item/clothing/head/nonla
|
||||
|
||||
/*
|
||||
Talon hats
|
||||
*/
|
||||
|
||||
@@ -68,4 +68,11 @@
|
||||
for(var/gaiter in typesof(/obj/item/clothing/accessory/gaiter))
|
||||
var/obj/item/clothing/accessory/gaiter_type = gaiter
|
||||
gaiters[initial(gaiter_type.name)] = gaiter_type
|
||||
gear_tweaks += new/datum/gear_tweak/path(sortTim(gaiters, /proc/cmp_text_asc))
|
||||
gear_tweaks += new/datum/gear_tweak/path(sortTim(gaiters, /proc/cmp_text_asc))
|
||||
|
||||
/datum/gear/mask/lace
|
||||
display_name = "lace veil"
|
||||
path = /obj/item/clothing/mask/lacemask
|
||||
|
||||
/datum/gear/mask/lace/New()
|
||||
gear_tweaks += gear_tweak_free_color_choice
|
||||
@@ -20,3 +20,19 @@
|
||||
/datum/gear/shoes/toeless
|
||||
display_name = "toe-less jackboots"
|
||||
path = /obj/item/clothing/shoes/boots/jackboots/toeless
|
||||
|
||||
/datum/gear/shoes/singer_blue
|
||||
display_name = "blue performer's boots"
|
||||
path = /obj/item/clothing/shoes/boots/singer
|
||||
|
||||
/datum/gear/shoes/singer_yellow
|
||||
display_name = "yellow performer's boots"
|
||||
path = /obj/item/clothing/shoes/boots/singer/yellow
|
||||
|
||||
/datum/gear/shoes/antediluvian
|
||||
display_name = "legwraps, antediluvian"
|
||||
path = /obj/item/clothing/shoes/antediluvian
|
||||
|
||||
/datum/gear/shoes/flats/alt
|
||||
display_name = "flats, alt"
|
||||
path = /obj/item/clothing/shoes/flats/white/color/alt
|
||||
@@ -152,3 +152,164 @@ Talon winter coat
|
||||
|
||||
/datum/gear/suit/cyberpunk_recolorable/New()
|
||||
gear_tweaks += gear_tweak_free_color_choice
|
||||
|
||||
/datum/gear/suit/shrine_maiden
|
||||
display_name = "shrine maiden costume"
|
||||
path = /obj/item/clothing/suit/shrine_maiden
|
||||
|
||||
//Antediluvian cloak
|
||||
/datum/gear/suit/cloak_ante
|
||||
display_name = "cloak, antediluvian"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/antediluvian
|
||||
cost = 1
|
||||
|
||||
//Chaplain cloaks
|
||||
/datum/gear/suit/cloak_chaplain
|
||||
display_name = "cloak, chaplain"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/chapel
|
||||
cost = 1
|
||||
|
||||
/datum/gear/suit/cloak_chaplain/alt
|
||||
display_name = "cloak, chaplain, alt"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/chapel/alt
|
||||
cost = 1
|
||||
|
||||
//Half cloak
|
||||
/datum/gear/suit/cloak_half
|
||||
display_name = "cloak, half, colorable"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/half
|
||||
cost = 1
|
||||
|
||||
/datum/gear/suit/cloak_half/New()
|
||||
gear_tweaks += gear_tweak_free_color_choice
|
||||
|
||||
//Shoulder cloak
|
||||
/datum/gear/suit/cloak_shoulder
|
||||
display_name = "cloak, shoulder"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/shoulder
|
||||
cost = 1
|
||||
|
||||
/datum/gear/suit/cloak_shoulder/New()
|
||||
gear_tweaks += gear_tweak_free_color_choice
|
||||
|
||||
/datum/gear/suit/cloak_shoulder_right
|
||||
display_name = "cloak, shoulder right"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/shoulder/right
|
||||
cost = 1
|
||||
|
||||
/datum/gear/suit/cloak_shoulder_right/New()
|
||||
gear_tweaks += gear_tweak_free_color_choice
|
||||
|
||||
//Mantles, mostly for heads of staff
|
||||
/datum/gear/suit/roles/mantle
|
||||
display_name = "mantle, colorable"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/mantle
|
||||
cost = 1
|
||||
|
||||
/datum/gear/suit/roles/mantle/New()
|
||||
gear_tweaks += gear_tweak_free_color_choice
|
||||
|
||||
/datum/gear/suit/roles/mantles
|
||||
display_name = "mantle selection"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/mantle/cargo
|
||||
cost = 1
|
||||
|
||||
/datum/gear/suit/roles/mantles/New()
|
||||
..()
|
||||
var/list/mantles = list(
|
||||
"orange mantle"=/obj/item/clothing/accessory/poncho/roles/cloak/mantle/cargo,
|
||||
"black mantle"=/obj/item/clothing/accessory/poncho/roles/cloak/mantle/security,
|
||||
"white mantle"=/obj/item/clothing/accessory/poncho/roles/cloak/mantle/engineering,
|
||||
"purple mantle"=/obj/item/clothing/accessory/poncho/roles/cloak/mantle/research,
|
||||
"cyan mantle"=/obj/item/clothing/accessory/poncho/roles/cloak/mantle/medical,
|
||||
"blue mantle"=/obj/item/clothing/accessory/poncho/roles/cloak/mantle/hop,
|
||||
"gold mantle"=/obj/item/clothing/accessory/poncho/roles/cloak/mantle/cap
|
||||
)
|
||||
gear_tweaks += new/datum/gear_tweak/path(mantles)
|
||||
|
||||
//Boat cloaks
|
||||
/datum/gear/suit/roles/boatcloak
|
||||
display_name = "boat cloak, colorable"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/boat
|
||||
|
||||
/datum/gear/suit/roles/boatcloak/New()
|
||||
gear_tweaks += gear_tweak_free_color_choice
|
||||
|
||||
/datum/gear/suit/roles/capboatcloak
|
||||
display_name = "boat cloak, site manager"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/boat/cap
|
||||
allowed_roles = list("Site Manager")
|
||||
|
||||
/datum/gear/suit/roles/hopboatcloak
|
||||
display_name = "boat cloak, head of personnel"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/boat/hop
|
||||
allowed_roles = list("Head of Personnel")
|
||||
|
||||
/datum/gear/suit/roles/boatcloaks
|
||||
display_name = "boat cloak selection"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/boat/security
|
||||
|
||||
/datum/gear/suit/roles/boatcloaks/New()
|
||||
..()
|
||||
var/list/boatcloaks = list(
|
||||
"security boat cloak"=/obj/item/clothing/accessory/poncho/roles/cloak/boat/security,
|
||||
"engineering boat cloak"=/obj/item/clothing/accessory/poncho/roles/cloak/boat/engineering,
|
||||
"atmospherics boat cloak"=/obj/item/clothing/accessory/poncho/roles/cloak/boat/atmos,
|
||||
"medical boat cloak"=/obj/item/clothing/accessory/poncho/roles/cloak/boat/medical,
|
||||
"service boat cloak"=/obj/item/clothing/accessory/poncho/roles/cloak/boat/service,
|
||||
"cargo boat cloak"=/obj/item/clothing/accessory/poncho/roles/cloak/boat/cargo,
|
||||
"mining boat cloak"=/obj/item/clothing/accessory/poncho/roles/cloak/boat/mining,
|
||||
"research boat cloak"=/obj/item/clothing/accessory/poncho/roles/cloak/boat/science
|
||||
)
|
||||
gear_tweaks += new/datum/gear_tweak/path(boatcloaks)
|
||||
|
||||
//Shrouds
|
||||
/datum/gear/suit/roles/shroud
|
||||
display_name = "shroud, colorable"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/shroud
|
||||
|
||||
/datum/gear/suit/roles/shroud/New()
|
||||
gear_tweaks += gear_tweak_free_color_choice
|
||||
|
||||
/datum/gear/suit/roles/capshroud
|
||||
display_name = "shroud, site manager"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/shroud/cap
|
||||
allowed_roles = list("Site Manager")
|
||||
|
||||
/datum/gear/suit/roles/hopshroud
|
||||
display_name = "shroud, head of personnel"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/shroud/hop
|
||||
allowed_roles = list("Head of Personnel")
|
||||
|
||||
/datum/gear/suit/roles/shrouds
|
||||
display_name = "shroud selection"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/shroud/security
|
||||
|
||||
/datum/gear/suit/roles/shrouds/New()
|
||||
..()
|
||||
var/list/shrouds = list(
|
||||
"security shroud"=/obj/item/clothing/accessory/poncho/roles/cloak/shroud/security,
|
||||
"engineering shroud"=/obj/item/clothing/accessory/poncho/roles/cloak/shroud/engineering,
|
||||
"atmospherics shroud"=/obj/item/clothing/accessory/poncho/roles/cloak/shroud/atmos,
|
||||
"medical shroud"=/obj/item/clothing/accessory/poncho/roles/cloak/shroud/medical,
|
||||
"service shroud"=/obj/item/clothing/accessory/poncho/roles/cloak/shroud/service,
|
||||
"cargo shroud"=/obj/item/clothing/accessory/poncho/roles/cloak/shroud/cargo,
|
||||
"mining shroud"=/obj/item/clothing/accessory/poncho/roles/cloak/shroud/mining,
|
||||
"research shroud"=/obj/item/clothing/accessory/poncho/roles/cloak/shroud/science
|
||||
)
|
||||
gear_tweaks += new/datum/gear_tweak/path(shrouds)
|
||||
|
||||
//Actually colorable hoodies
|
||||
/datum/gear/suit/roles/choodies
|
||||
display_name = "hoodie selection, colorable"
|
||||
path = /obj/item/clothing/suit/storage/hooded/toggle/colorable
|
||||
|
||||
/datum/gear/suit/roles/choodies/New()
|
||||
..()
|
||||
var/list/choodies = list(
|
||||
"normal hoodie"=/obj/item/clothing/suit/storage/hooded/toggle/colorable,
|
||||
"sleeveless hoodie"=/obj/item/clothing/suit/storage/hooded/toggle/colorable/sleeveless,
|
||||
"cropped hoodie"=/obj/item/clothing/suit/storage/hooded/toggle/colorable/cropped
|
||||
)
|
||||
gear_tweaks += gear_tweak_free_color_choice
|
||||
gear_tweaks += new/datum/gear_tweak/path(choodies)
|
||||
@@ -212,6 +212,14 @@ Qipao
|
||||
display_name = "qipao, white"
|
||||
path = /obj/item/clothing/under/qipao/white
|
||||
|
||||
/datum/gear/uniform/qipao_colorable_alt
|
||||
display_name = "qipao, colorable alt"
|
||||
path = /obj/item/clothing/under/qipao/white/colorable
|
||||
|
||||
/datum/gear/uniform/qipao_colorable_alt/New()
|
||||
..()
|
||||
gear_tweaks += gear_tweak_free_color_choice
|
||||
|
||||
/*
|
||||
Bluespace jumpsuit
|
||||
*/
|
||||
@@ -295,7 +303,7 @@ Talon jumpsuit
|
||||
|
||||
|
||||
//Feminine Colored Jumpsuits.
|
||||
/datum/gear/suit/f_jumpsuit_alt
|
||||
/datum/gear/uniform/f_jumpsuit_alt
|
||||
display_name = "Colored Feminine Jumpsuit"
|
||||
path = /obj/item/clothing/under/color/fjumpsuit
|
||||
|
||||
@@ -311,4 +319,44 @@ Talon jumpsuit
|
||||
/datum/gear/uniform/modernsec
|
||||
display_name = "undersuit, security, modernized (Security)"
|
||||
allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer")
|
||||
path = /obj/item/clothing/under/rank/security/modern
|
||||
path = /obj/item/clothing/under/rank/security/modern
|
||||
|
||||
/datum/gear/uniform/singer_blue
|
||||
display_name = "blue singer dress"
|
||||
path = /obj/item/clothing/under/dress/singer
|
||||
|
||||
/datum/gear/uniform/singer_yellow
|
||||
display_name = "yellow singer dress"
|
||||
path = /obj/item/clothing/under/dress/singer/yellow
|
||||
|
||||
//Antediluvian corsets from CitRP
|
||||
/datum/gear/uniform/antediluvian
|
||||
display_name = "corset, antediluvian"
|
||||
path = /obj/item/clothing/under/dress/antediluvian
|
||||
|
||||
/datum/gear/uniform/antediluvianalt
|
||||
display_name = "corset, antediluvian alt"
|
||||
path = /obj/item/clothing/under/dress/antediluvian/sheerless
|
||||
|
||||
//Colorable skirts
|
||||
/datum/gear/uniform/coloredskirts
|
||||
display_name = "skirt selection, colorable"
|
||||
path = /obj/item/clothing/under/skirt/colorable
|
||||
|
||||
/datum/gear/uniform/coloredskirts/New()
|
||||
..()
|
||||
var/list/skirts = list(
|
||||
"casual skirt"=/obj/item/clothing/under/skirt/colorable,
|
||||
"puffy skirt"=/obj/item/clothing/under/skirt/colorable/puffy,
|
||||
"skater skirt"=/obj/item/clothing/under/skirt/colorable/skater,
|
||||
"pleated skirt"=/obj/item/clothing/under/skirt/colorable/pleated,
|
||||
"pencil skirt"=/obj/item/clothing/under/skirt/colorable/pencil,
|
||||
"plaid skirt"=/obj/item/clothing/under/skirt/colorable/plaid,
|
||||
"tube skirt"=/obj/item/clothing/under/skirt/colorable/tube,
|
||||
"long skirt"=/obj/item/clothing/under/skirt/colorable/long,
|
||||
"high skirt"=/obj/item/clothing/under/skirt/colorable/high,
|
||||
"swept skirt"=/obj/item/clothing/under/skirt/colorable/swept,
|
||||
"jumper skirt"=/obj/item/clothing/under/skirt/colorable/jumper,
|
||||
"jumper dress"=/obj/item/clothing/under/skirt/colorable/jumperdress
|
||||
)
|
||||
gear_tweaks += list(new/datum/gear_tweak/path(skirts), gear_tweak_free_color_choice)
|
||||
@@ -145,6 +145,11 @@
|
||||
)
|
||||
gear_tweaks += new/datum/gear_tweak/path(wheelchairs)
|
||||
|
||||
/datum/gear/utility/lantern
|
||||
display_name = "lantern"
|
||||
path = /obj/item/device/flashlight/lantern
|
||||
cost = 2
|
||||
|
||||
/****************
|
||||
modular computers
|
||||
****************/
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
var/custom_ask = null
|
||||
var/custom_exclaim = null
|
||||
|
||||
var/list/custom_heat = list()
|
||||
var/list/custom_cold = list()
|
||||
|
||||
var/list/pos_traits = list() // What traits they've selected for their custom species
|
||||
var/list/neu_traits = list()
|
||||
var/list/neg_traits = list()
|
||||
@@ -25,6 +28,81 @@
|
||||
var/dirty_synth = 0 //Are you a synth
|
||||
var/gross_meatbag = 0 //Where'd I leave my Voight-Kampff test kit?
|
||||
|
||||
/datum/preferences/proc/get_custom_bases_for_species(var/new_species)
|
||||
if (!new_species)
|
||||
new_species = species
|
||||
var/list/choices
|
||||
var/datum/species/spec = GLOB.all_species[new_species]
|
||||
if (spec.selects_bodytype == SELECTS_BODYTYPE_SHAPESHIFTER)
|
||||
choices = spec.get_valid_shapeshifter_forms()
|
||||
choices = choices.Copy()
|
||||
else if (spec.selects_bodytype == SELECTS_BODYTYPE_CUSTOM)
|
||||
choices = GLOB.custom_species_bases.Copy()
|
||||
if(new_species != SPECIES_CUSTOM)
|
||||
choices = (choices | new_species)
|
||||
return choices
|
||||
|
||||
/datum/category_item/player_setup_item/vore/traits/proc/get_html_for_trait(var/datum/trait/trait, var/list/trait_prefs = null)
|
||||
. = ""
|
||||
if (!LAZYLEN(trait.has_preferences))
|
||||
return
|
||||
. = "<br><ul>"
|
||||
var/altered = FALSE
|
||||
if (!LAZYLEN(trait_prefs))
|
||||
trait_prefs = trait.get_default_prefs()
|
||||
altered = TRUE
|
||||
for (var/identifier in trait.has_preferences)
|
||||
var/pref_list = trait.has_preferences[identifier] //faster
|
||||
if (LAZYLEN(pref_list) >= 2)
|
||||
if (!(identifier in trait_prefs))
|
||||
trait_prefs[identifier] = trait.default_value_for_pref(identifier) //won't be called at all often
|
||||
altered = TRUE
|
||||
. += "<li>- [pref_list[2]]:"
|
||||
var/link = " <a href='?src=\ref[src];clicked_trait_pref=[trait.type];pref=[identifier]'>"
|
||||
switch (pref_list[1])
|
||||
if (1) //TRAIT_PREF_TYPE_BOOLEAN
|
||||
. += link + (trait_prefs[identifier] ? "Enabled" : "Disabled")
|
||||
if (2) //TRAIT_PREF_TYPE_COLOR
|
||||
. += " " + color_square(hex = trait_prefs[identifier]) + link + "Change"
|
||||
. += "</a></li>"
|
||||
. += "</ul>"
|
||||
if (altered)
|
||||
switch(trait.category)
|
||||
if (1) //TRAIT_TYPE_POSITIVE
|
||||
pref.pos_traits[trait.type] = trait_prefs
|
||||
if (0) //TRAIT_TYPE_NEUTRAL
|
||||
pref.neu_traits[trait.type] = trait_prefs
|
||||
if (-1)//TRAIT_TYPE_NEGATIVE
|
||||
pref.neg_traits[trait.type] = trait_prefs
|
||||
|
||||
/datum/category_item/player_setup_item/vore/traits/proc/get_pref_choice_from_trait(var/mob/user, var/datum/trait/trait, var/preference)
|
||||
if (!trait || !preference)
|
||||
return
|
||||
var/list/trait_prefs
|
||||
var/datum/trait/instance = all_traits[trait]
|
||||
var/list/traitlist
|
||||
switch(instance.category)
|
||||
if (1)
|
||||
traitlist = pref.pos_traits
|
||||
if (0)
|
||||
traitlist = pref.neu_traits
|
||||
if (-1)
|
||||
traitlist = pref.neg_traits
|
||||
if (!LAZYLEN(instance.has_preferences) || !(preference in instance.has_preferences) || !traitlist)
|
||||
return
|
||||
if (!LAZYLEN(traitlist[trait]))
|
||||
traitlist[trait] = instance.get_default_prefs()
|
||||
trait_prefs = traitlist[trait]
|
||||
if (!(preference in trait_prefs))
|
||||
trait_prefs[preference] = instance.default_value_for_pref(preference) //won't be called at all often
|
||||
switch(instance.has_preferences[preference][1])
|
||||
if (1) //TRAIT_PREF_TYPE_BOOLEAN
|
||||
trait_prefs[preference] = !trait_prefs[preference]
|
||||
if (2) //TRAIT_PREF_TYPE_COLOR
|
||||
var/new_color = input(user, "Choose the color for this trait preference:", "Trait Preference", trait_prefs[preference]) as color|null
|
||||
if (new_color)
|
||||
trait_prefs[preference] = new_color
|
||||
|
||||
// Definition of the stuff for Ears
|
||||
/datum/category_item/player_setup_item/vore/traits
|
||||
name = "Traits"
|
||||
@@ -47,6 +125,9 @@
|
||||
S["custom_ask"] >> pref.custom_ask
|
||||
S["custom_exclaim"] >> pref.custom_exclaim
|
||||
|
||||
S["custom_heat"] >> pref.custom_heat
|
||||
S["custom_cold"] >> pref.custom_cold
|
||||
|
||||
/datum/category_item/player_setup_item/vore/traits/save_character(var/savefile/S)
|
||||
S["custom_species"] << pref.custom_species
|
||||
S["custom_base"] << pref.custom_base
|
||||
@@ -64,6 +145,9 @@
|
||||
S["custom_ask"] << pref.custom_ask
|
||||
S["custom_exclaim"] << pref.custom_exclaim
|
||||
|
||||
S["custom_heat"] << pref.custom_heat
|
||||
S["custom_cold"] << pref.custom_cold
|
||||
|
||||
/datum/category_item/player_setup_item/vore/traits/sanitize_character()
|
||||
if(!pref.pos_traits) pref.pos_traits = list()
|
||||
if(!pref.neu_traits) pref.neu_traits = list()
|
||||
@@ -122,7 +206,9 @@
|
||||
|
||||
var/datum/species/selected_species = GLOB.all_species[pref.species]
|
||||
if(selected_species.selects_bodytype)
|
||||
// Allowed!
|
||||
if (!(pref.custom_base in pref.get_custom_bases_for_species()))
|
||||
pref.custom_base = SPECIES_HUMAN
|
||||
//otherwise, allowed!
|
||||
else if(!pref.custom_base || !(pref.custom_base in GLOB.custom_species_bases))
|
||||
pref.custom_base = SPECIES_HUMAN
|
||||
|
||||
@@ -131,12 +217,26 @@
|
||||
pref.custom_ask = lowertext(trim(pref.custom_ask))
|
||||
pref.custom_exclaim = lowertext(trim(pref.custom_exclaim))
|
||||
|
||||
if (islist(pref.custom_heat)) //don't bother checking these for actual singular message length, they should already have been checked and it'd take too long every time it's sanitized
|
||||
if (length(pref.custom_heat) > 10)
|
||||
pref.custom_heat.Cut(11)
|
||||
else
|
||||
pref.custom_heat = list()
|
||||
if (islist(pref.custom_cold))
|
||||
if (length(pref.custom_cold) > 10)
|
||||
pref.custom_cold.Cut(11)
|
||||
else
|
||||
pref.custom_cold = list()
|
||||
|
||||
/datum/category_item/player_setup_item/vore/traits/copy_to_mob(var/mob/living/carbon/human/character)
|
||||
character.custom_species = pref.custom_species
|
||||
character.custom_say = lowertext(trim(pref.custom_say))
|
||||
character.custom_ask = lowertext(trim(pref.custom_ask))
|
||||
character.custom_whisper = lowertext(trim(pref.custom_whisper))
|
||||
character.custom_exclaim = lowertext(trim(pref.custom_exclaim))
|
||||
character.custom_heat = pref.custom_heat
|
||||
character.custom_cold = pref.custom_cold
|
||||
|
||||
|
||||
if(character.isSynthetic()) //Checking if we have a synth on our hands, boys.
|
||||
pref.dirty_synth = 1
|
||||
@@ -185,21 +285,21 @@
|
||||
. += "<ul>"
|
||||
for(var/T in pref.pos_traits)
|
||||
var/datum/trait/trait = positive_traits[T]
|
||||
. += "<li>- <a href='?src=\ref[src];clicked_pos_trait=[T]'>[trait.name] ([trait.cost])</a></li>"
|
||||
. += "<li>- <a href='?src=\ref[src];clicked_pos_trait=[T]'>[trait.name] ([trait.cost])</a> [get_html_for_trait(trait, pref.pos_traits[T])]</li>"
|
||||
. += "</ul>"
|
||||
|
||||
. += "<a href='?src=\ref[src];add_trait=[NEUTRAL_MODE]'>Neutral Trait +</a><br>"
|
||||
. += "<ul>"
|
||||
for(var/T in pref.neu_traits)
|
||||
var/datum/trait/trait = neutral_traits[T]
|
||||
. += "<li>- <a href='?src=\ref[src];clicked_neu_trait=[T]'>[trait.name] ([trait.cost])</a></li>"
|
||||
. += "<li>- <a href='?src=\ref[src];clicked_neu_trait=[T]'>[trait.name] ([trait.cost])</a> [get_html_for_trait(trait, pref.neu_traits[T])]</li>"
|
||||
. += "</ul>"
|
||||
|
||||
. += "<a href='?src=\ref[src];add_trait=[NEGATIVE_MODE]'>Negative Trait +</a><br>"
|
||||
. += "<ul>"
|
||||
for(var/T in pref.neg_traits)
|
||||
var/datum/trait/trait = negative_traits[T]
|
||||
. += "<li>- <a href='?src=\ref[src];clicked_neg_trait=[T]'>[trait.name] ([trait.cost])</a></li>"
|
||||
. += "<li>- <a href='?src=\ref[src];clicked_neg_trait=[T]'>[trait.name] ([trait.cost])</a> [get_html_for_trait(trait, pref.neg_traits[T])]</li>"
|
||||
. += "</ul>"
|
||||
|
||||
. += "<b>Blood Color: </b>" //People that want to use a certain species to have that species traits (xenochimera/promethean/spider) should be able to set their own blood color.
|
||||
@@ -223,6 +323,14 @@
|
||||
. += "<a href='?src=\ref[src];custom_exclaim=1'>Set Exclaim Verb</a>"
|
||||
. += "(<a href='?src=\ref[src];reset_exclaim=1'>Reset</A>)"
|
||||
. += "<br>"
|
||||
. += "<b>Custom heat Discomfort: </b>"
|
||||
. += "<a href='?src=\ref[src];custom_heat=1'>Set Heat Messages</a>"
|
||||
. += "(<a href='?src=\ref[src];reset_heat=1'>Reset</A>)"
|
||||
. += "<br>"
|
||||
. += "<b>Custom Cold Discomfort: </b>"
|
||||
. += "<a href='?src=\ref[src];custom_cold=1'>Set Cold Messages</a>"
|
||||
. += "(<a href='?src=\ref[src];reset_cold=1'>Reset</A>)"
|
||||
. += "<br>"
|
||||
|
||||
/datum/category_item/player_setup_item/vore/traits/OnTopic(var/href,var/list/href_list, var/mob/user)
|
||||
if(!CanUseTopic(user))
|
||||
@@ -236,15 +344,7 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["custom_base"])
|
||||
var/list/choices
|
||||
var/datum/species/spec = GLOB.all_species[pref.species]
|
||||
if (spec.selects_bodytype == SELECTS_BODYTYPE_SHAPESHIFTER && istype(spec, /datum/species/shapeshifter))
|
||||
var/datum/species/spec_shifter = spec
|
||||
choices = spec_shifter.get_valid_shapeshifter_forms()
|
||||
else
|
||||
choices = GLOB.custom_species_bases
|
||||
if(pref.species != SPECIES_CUSTOM)
|
||||
choices = (choices | pref.species)
|
||||
var/list/choices = pref.get_custom_bases_for_species()
|
||||
var/text_choice = tgui_input_list(usr, "Pick an icon set for your species:","Icon Base", choices)
|
||||
if(text_choice in choices)
|
||||
pref.custom_base = text_choice
|
||||
@@ -289,6 +389,11 @@
|
||||
instance.remove_pref(pref)
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["clicked_trait_pref"])
|
||||
var/datum/trait/trait = text2path(href_list["clicked_trait_pref"])
|
||||
get_pref_choice_from_trait(user, trait, href_list["pref"])
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["custom_say"])
|
||||
var/say_choice = sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'says': [pref.real_name] says, \"Hi.\"", "Custom Say", pref.custom_say, 12), 12)
|
||||
if(say_choice)
|
||||
@@ -313,6 +418,40 @@
|
||||
pref.custom_exclaim = exclaim_choice
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["custom_heat"])
|
||||
tgui_alert(user, "You are setting custom heat messages. These will overwrite your species' defaults. To return to defaults, click reset.")
|
||||
var/old_message = pref.custom_heat.Join("\n\n")
|
||||
var/new_message = sanitize(tgui_input_text(usr,"Use double enter between messages to enter a new one. Must be at least 3 characters long, 160 characters max and up to 10 messages are allowed.","Heat Discomfort messages",old_message, multiline= TRUE, prevent_enter = TRUE), MAX_MESSAGE_LEN,0,0,0)
|
||||
if(length(new_message) > 0)
|
||||
var/list/raw_list = splittext(new_message,"\n\n")
|
||||
if(raw_list.len > 10)
|
||||
raw_list.Cut(11)
|
||||
for(var/i = 1, i <= raw_list.len, i++)
|
||||
if(length(raw_list[i]) < 3 || length(raw_list[i]) > 160)
|
||||
raw_list.Cut(i,i)
|
||||
else
|
||||
raw_list[i] = readd_quotes(raw_list[i])
|
||||
ASSERT(raw_list.len <= 10)
|
||||
pref.custom_heat = raw_list
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["custom_cold"])
|
||||
tgui_alert(user, "You are setting custom cold messages. These will overwrite your species' defaults. To return to defaults, click reset.")
|
||||
var/old_message = pref.custom_heat.Join("\n\n")
|
||||
var/new_message = sanitize(tgui_input_text(usr,"Use double enter between messages to enter a new one. Must be at least 3 characters long, 160 characters max and up to 10 messages are allowed.","Cold Discomfort messages",old_message, multiline= TRUE, prevent_enter = TRUE), MAX_MESSAGE_LEN,0,0,0)
|
||||
if(length(new_message) > 0)
|
||||
var/list/raw_list = splittext(new_message,"\n\n")
|
||||
if(raw_list.len > 10)
|
||||
raw_list.Cut(11)
|
||||
for(var/i = 1, i <= raw_list.len, i++)
|
||||
if(length(raw_list[i]) < 3 || length(raw_list[i]) > 160)
|
||||
raw_list.Cut(i,i)
|
||||
else
|
||||
raw_list[i] = readd_quotes(raw_list[i])
|
||||
ASSERT(raw_list.len <= 10)
|
||||
pref.custom_cold = raw_list
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["reset_say"])
|
||||
var/say_choice = tgui_alert(usr, "Reset your Custom Say Verb?","Reset Verb",list("Yes","No"))
|
||||
if(say_choice == "Yes")
|
||||
@@ -337,6 +476,18 @@
|
||||
pref.custom_exclaim = null
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["reset_cold"])
|
||||
var/cold_choice = tgui_alert(usr, "Reset your Custom Cold Discomfort messages?", "Reset Discomfort",list("Yes","No"))
|
||||
if(cold_choice == "Yes")
|
||||
pref.custom_cold = list()
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["reset_heat"])
|
||||
var/heat_choice = tgui_alert(usr, "Reset your Custom Heat Discomfort messages?", "Reset Discomfort",list("Yes","No"))
|
||||
if(heat_choice == "Yes")
|
||||
pref.custom_heat = list()
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["add_trait"])
|
||||
var/mode = text2num(href_list["add_trait"])
|
||||
var/list/picklist
|
||||
@@ -416,12 +567,10 @@
|
||||
|
||||
if(pref.dirty_synth && !(instance.can_take & SYNTHETICS))
|
||||
tgui_alert_async(usr, "The trait you've selected can only be taken by organic characters!", "Error")
|
||||
pref.dirty_synth = 0 //Just to be sure
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if(pref.gross_meatbag && !(instance.can_take & ORGANICS))
|
||||
tgui_alert_async(usr, "The trait you've selected can only be taken by synthetic characters!", "Error")
|
||||
pref.gross_meatbag = 0 //Just to be sure
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if(pref.species in instance.banned_species)
|
||||
@@ -457,7 +606,7 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
instance.apply_pref(pref)
|
||||
mylist += path
|
||||
mylist[path] = instance.get_default_prefs()
|
||||
return TOPIC_REFRESH
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
pref.nif_path = null //Kill!
|
||||
WARNING("Loaded a NIF but it was an invalid path, [pref.real_name]")
|
||||
|
||||
if (ispath(pref.nif_path, /obj/item/device/nif/protean) && pref.species != SPECIES_PROTEAN) //no free nifs
|
||||
pref.nif_path = null
|
||||
|
||||
if(ispath(pref.nif_path) && isnull(pref.nif_durability)) //How'd you lose this?
|
||||
pref.nif_durability = initial(pref.nif_path.durability) //Well, have a new one, my bad.
|
||||
WARNING("Loaded a NIF but with no durability, [pref.real_name]")
|
||||
|
||||
@@ -59,6 +59,8 @@
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["directory_ad"])
|
||||
var/msg = sanitize(tgui_input_text(user,"Write your advertisement here!", "Flavor Text", html_decode(pref.directory_ad), multiline = TRUE, prevent_enter = TRUE), extra = 0) //VOREStation Edit: separating out OOC notes
|
||||
if(!msg)
|
||||
return
|
||||
pref.directory_ad = msg
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["toggle_sensor_setting"])
|
||||
|
||||
Reference in New Issue
Block a user