Stop 'cancel' button from wiping flavor text

This commit is contained in:
Cyantime
2023-03-31 21:11:49 -04:00
parent fe0166f008
commit adb34cf19f
4 changed files with 16 additions and 11 deletions
@@ -686,12 +686,15 @@
return
if("general")
var/msg = strip_html_simple(tgui_input_text(usr,"Update the general description of your character. This will be shown regardless of clothing.","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]]), multiline = TRUE, prevent_enter = TRUE)) //VOREStation Edit: separating out OOC notes
flavor_texts[href_list["flavor_change"]] = msg
if(msg)
flavor_texts[href_list["flavor_change"]] = msg
set_flavor()
return
else
var/msg = strip_html_simple(tgui_input_text(usr,"Update the flavor text for your [href_list["flavor_change"]].","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]]), multiline = TRUE, prevent_enter = TRUE))
flavor_texts[href_list["flavor_change"]] = msg
set_flavor()
if(msg)
flavor_texts[href_list["flavor_change"]] = msg
set_flavor()
return
..()
return
+3 -1
View File
@@ -266,7 +266,9 @@
set desc = "Sets an extended description of your character's features."
set category = "IC"
flavor_text = strip_html_simple(tgui_input_text(usr, "Please enter your new flavour text.", "Flavour text", null))
var/new_flavortext = strip_html_simple(tgui_input_text(usr, "Please enter your new flavour text.", "Flavour text", null))
if(new_flavortext)
flavor_text = new_flavortext
/mob/living/silicon/binarycheck()
return 1