mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
[MIRROR] fix pref input clearing (#10686)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
335ff75144
commit
824d0a98bc
@@ -62,12 +62,16 @@
|
|||||||
if("open")
|
if("open")
|
||||||
pass()
|
pass()
|
||||||
if("general")
|
if("general")
|
||||||
var/msg = strip_html_simple(tgui_input_text(user,"Give a general description of your character. This will be shown regardless of clothings. Put in a single space to make blank.","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]]), multiline = TRUE, prevent_enter = TRUE)) //VOREStation Edit: separating out OOC notes
|
var/msg = strip_html_simple(tgui_input_text(user,"Give a general description of your character. This will be shown regardless of clothings. Put in \"!clear\" to make blank.","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]]), multiline = TRUE, prevent_enter = TRUE)) //VOREStation Edit: separating out OOC notes
|
||||||
if(CanUseTopic(user) && msg)
|
if(CanUseTopic(user) && msg)
|
||||||
|
if(msg == "!clear")
|
||||||
|
msg = ""
|
||||||
pref.flavor_texts[href_list["flavor_text"]] = msg
|
pref.flavor_texts[href_list["flavor_text"]] = msg
|
||||||
else
|
else
|
||||||
var/msg = strip_html_simple(tgui_input_text(user,"Set the flavor text for your [href_list["flavor_text"]]. Put in a single space to make blank.","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]]), multiline = TRUE, prevent_enter = TRUE))
|
var/msg = strip_html_simple(tgui_input_text(user,"Set the flavor text for your [href_list["flavor_text"]]. Put in \"!clear\" to make blank.","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]]), multiline = TRUE, prevent_enter = TRUE))
|
||||||
if(CanUseTopic(user) && msg)
|
if(CanUseTopic(user) && msg)
|
||||||
|
if(msg == "!clear")
|
||||||
|
msg = ""
|
||||||
pref.flavor_texts[href_list["flavor_text"]] = msg
|
pref.flavor_texts[href_list["flavor_text"]] = msg
|
||||||
SetFlavorText(user)
|
SetFlavorText(user)
|
||||||
return TOPIC_HANDLED
|
return TOPIC_HANDLED
|
||||||
@@ -77,12 +81,16 @@
|
|||||||
if("open")
|
if("open")
|
||||||
pass()
|
pass()
|
||||||
if("Default")
|
if("Default")
|
||||||
var/msg = strip_html_simple(tgui_input_text(user,"Set the default flavour text for your robot. It will be used for any module without individual setting. Put in a single space to make blank.","Flavour Text",html_decode(pref.flavour_texts_robot["Default"]), multiline = TRUE, prevent_enter = TRUE))
|
var/msg = strip_html_simple(tgui_input_text(user,"Set the default flavour text for your robot. It will be used for any module without individual setting. Put in \"!clear\" to make blank.","Flavour Text",html_decode(pref.flavour_texts_robot["Default"]), multiline = TRUE, prevent_enter = TRUE))
|
||||||
if(CanUseTopic(user) && msg)
|
if(CanUseTopic(user) && msg)
|
||||||
|
if(msg == "!clear")
|
||||||
|
msg = ""
|
||||||
pref.flavour_texts_robot[href_list["flavour_text_robot"]] = msg
|
pref.flavour_texts_robot[href_list["flavour_text_robot"]] = msg
|
||||||
else
|
else
|
||||||
var/msg = strip_html_simple(tgui_input_text(user,"Set the flavour text for your robot with [href_list["flavour_text_robot"]] module. If you leave this blank, default flavour text will be used for this module. Put in a single space to make blank.","Flavour Text",html_decode(pref.flavour_texts_robot[href_list["flavour_text_robot"]]), multiline = TRUE, prevent_enter = TRUE))
|
var/msg = strip_html_simple(tgui_input_text(user,"Set the flavour text for your robot with [href_list["flavour_text_robot"]] module. If you leave this blank, default flavour text will be used for this module. Put in \"!clear\" to make blank.","Flavour Text",html_decode(pref.flavour_texts_robot[href_list["flavour_text_robot"]]), multiline = TRUE, prevent_enter = TRUE))
|
||||||
if(CanUseTopic(user) && msg)
|
if(CanUseTopic(user) && msg)
|
||||||
|
if(msg == "!clear")
|
||||||
|
msg = ""
|
||||||
pref.flavour_texts_robot[href_list["flavour_text_robot"]] = msg
|
pref.flavour_texts_robot[href_list["flavour_text_robot"]] = msg
|
||||||
SetFlavourTextRobot(user)
|
SetFlavourTextRobot(user)
|
||||||
return TOPIC_HANDLED
|
return TOPIC_HANDLED
|
||||||
|
|||||||
@@ -556,13 +556,17 @@
|
|||||||
if(select_key in owner.flavor_texts)
|
if(select_key in owner.flavor_texts)
|
||||||
switch(select_key)
|
switch(select_key)
|
||||||
if("general")
|
if("general")
|
||||||
var/msg = strip_html_simple(tgui_input_text(ui.user,"Give a general description of the character. This will be shown regardless of clothings. Put in a single space to make blank.","Flavor Text",html_decode(owner.flavor_texts[select_key]), multiline = TRUE, prevent_enter = TRUE))
|
var/msg = strip_html_simple(tgui_input_text(ui.user,"Give a general description of the character. This will be shown regardless of clothings. Put in \"!clear\" to make blank.","Flavor Text",html_decode(owner.flavor_texts[select_key]), multiline = TRUE, prevent_enter = TRUE))
|
||||||
if(can_change(owner, APPEARANCE_RACE)) // allows empty to wipe flavor
|
if(can_change(owner, APPEARANCE_RACE)) // allows empty to wipe flavor
|
||||||
|
if(msg == "!clear")
|
||||||
|
msg = ""
|
||||||
owner.flavor_texts[select_key] = msg
|
owner.flavor_texts[select_key] = msg
|
||||||
return TRUE
|
return TRUE
|
||||||
else
|
else
|
||||||
var/msg = strip_html_simple(tgui_input_text(ui.user,"Set the flavor text for their [select_key]. Put in a single space to make blank.","Flavor Text",html_decode(owner.flavor_texts[select_key]), multiline = TRUE, prevent_enter = TRUE))
|
var/msg = strip_html_simple(tgui_input_text(ui.user,"Set the flavor text for their [select_key]. Put in \"!clear\" to make blank.","Flavor Text",html_decode(owner.flavor_texts[select_key]), multiline = TRUE, prevent_enter = TRUE))
|
||||||
if(can_change(owner, APPEARANCE_RACE)) // allows empty to wipe flavor
|
if(can_change(owner, APPEARANCE_RACE)) // allows empty to wipe flavor
|
||||||
|
if(msg == "!clear")
|
||||||
|
msg = ""
|
||||||
owner.flavor_texts[select_key] = msg
|
owner.flavor_texts[select_key] = msg
|
||||||
return TRUE
|
return TRUE
|
||||||
// ***********************************
|
// ***********************************
|
||||||
|
|||||||
Reference in New Issue
Block a user