diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm index b68173624c..3f881631d5 100644 --- a/code/game/dna/dna2.dm +++ b/code/game/dna/dna2.dm @@ -118,6 +118,8 @@ var/global/list/datum/dna/gene/dna_genes[0] var/custom_ask var/custom_whisper var/custom_exclaim + var/list/custom_heat = list() + var/list/custom_cold = list() // VOREStation // New stuff @@ -144,6 +146,8 @@ var/global/list/datum/dna/gene/dna_genes[0] new_dna.custom_ask=custom_ask //VOREStaton Edit new_dna.custom_whisper=custom_whisper //VOREStaton Edit new_dna.custom_exclaim=custom_exclaim //VOREStaton Edit + new_dna.custom_heat=custom_heat //VOREStation Edit + new_dna.custom_cold=custom_cold //VOREStation Edit var/list/body_markings_genetic = (body_markings - body_marking_nopersist_list) new_dna.body_markings=body_markings_genetic.Copy() for(var/b=1;b<=DNA_SE_LENGTH;b++) @@ -216,6 +220,8 @@ var/global/list/datum/dna/gene/dna_genes[0] src.custom_ask = character.custom_ask src.custom_whisper = character.custom_whisper src.custom_exclaim = character.custom_exclaim + src.custom_heat = character.custom_heat + src.custom_cold = character.custom_cold // +1 to account for the none-of-the-above possibility SetUIValueRange(DNA_UI_EAR_STYLE, ear_style + 1, ear_styles_list.len + 1, 1) diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index d5cdc700c7..9b57cd87e1 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -244,6 +244,8 @@ H.custom_whisper = dna.custom_whisper H.custom_exclaim = dna.custom_exclaim H.species.blood_color = dna.blood_color + H.custom_heat = dna.custom_heat + H.custom_cold = dna.custom_cold var/datum/species/S = H.species S.produceCopy(dna.species_traits, H, dna.base_species) // VOREStation Edit End diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm index b85a70717f..0537f54eaa 100644 --- a/code/modules/client/preference_setup/vore/07_traits.dm +++ b/code/modules/client/preference_setup/vore/07_traits.dm @@ -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() @@ -61,6 +64,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 @@ -78,6 +84,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() @@ -154,6 +163,9 @@ 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 @@ -179,6 +191,8 @@ var/english_traits = english_list(new_S.traits, and_text = ";", comma_text = ";") log_game("TRAITS [pref.client_ckey]/([character]) with: [english_traits]") //Terrible 'fake' key_name()... but they aren't in the same entity yet + + /datum/category_item/player_setup_item/vore/traits/content(var/mob/user) . += "Custom Species Name: " . += "[pref.custom_species ? pref.custom_species : "-Input Name-"]
" @@ -245,6 +259,14 @@ . += "Set Exclaim Verb" . += "(Reset)" . += "
" + . += "Custom heat Discomfort: " + . += "Set Heat Messages" + . += "(Reset)" + . += "
" + . += "Custom Cold Discomfort: " + . += "Set Cold Messages" + . += "(Reset)" + . += "
" /datum/category_item/player_setup_item/vore/traits/OnTopic(var/href,var/list/href_list, var/mob/user) if(!CanUseTopic(user)) @@ -327,6 +349,41 @@ 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") @@ -351,6 +408,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 diff --git a/code/modules/mob/living/carbon/human/species/species_getters.dm b/code/modules/mob/living/carbon/human/species/species_getters.dm index 27bb09baa6..3d5faafcfa 100644 --- a/code/modules/mob/living/carbon/human/species/species_getters.dm +++ b/code/modules/mob/living/carbon/human/species/species_getters.dm @@ -90,10 +90,18 @@ */ var/discomfort_message + var/list/custom_cold = H.custom_cold + var/list/custom_heat = H.custom_heat if(msg_type == ENVIRONMENT_COMFORT_MARKER_COLD && length(cold_discomfort_strings) /*&& !covered*/) - discomfort_message = pick(cold_discomfort_strings) + if(custom_cold.len > 0) + discomfort_message = pick(custom_cold) + else + discomfort_message = pick(cold_discomfort_strings) else if(msg_type == ENVIRONMENT_COMFORT_MARKER_HOT && length(heat_discomfort_strings) /*&& covered*/) - discomfort_message = pick(heat_discomfort_strings) + if(custom_heat.len > 0) + discomfort_message = pick(custom_heat) + else + discomfort_message = pick(heat_discomfort_strings) if(discomfort_message && prob(5)) to_chat(H, SPAN_DANGER(discomfort_message)) diff --git a/code/modules/mob/living/living_defines_vr.dm b/code/modules/mob/living/living_defines_vr.dm index f7a3f113ab..424ac98771 100644 --- a/code/modules/mob/living/living_defines_vr.dm +++ b/code/modules/mob/living/living_defines_vr.dm @@ -10,9 +10,12 @@ var/custom_say = null var/custom_ask = null var/custom_exclaim = null - var/custom_whisper = null + var/custom_whisper = null +//custom temperature discomfort vars + var/list/custom_heat = list() + var/list/custom_cold = list() //YW Add Start /mob var/wingdings = 0 -//Yw Add End \ No newline at end of file +//Yw Add End