Removes the else to properly for the switch statement, meaning that it no longer wipes your flavour text/thinks you're opening the general slot ever time.

This commit is contained in:
Jon
2015-12-14 20:20:35 +00:00
committed by PsiOmegaDelta
parent 2e151ade47
commit d890a4ce30

View File

@@ -42,10 +42,11 @@
. += "<a href='?src=\ref[src];flavour_text_robot=open'>Set Robot Flavor Text</a><br/>"
/datum/category_item/player_setup_item/general/flavor/OnTopic(var/href,var/list/href_list, var/mob/user)
user << href_list["flavor_text"]
if(href_list["flavor_text"])
switch(href_list["flavor_text"])
if("open")
else if("general")
if("general")
var/msg = sanitize(input(usr,"Give a general description of your character. This will be shown regardless of clothing, and may include OOC notes and preferences.","Flavor Text",html_decode(pref.flavor_texts[href_list["task"]])) as message, extra = 0)
if(CanUseTopic(user))
pref.flavor_texts[href_list["flavor_text"]] = msg
@@ -59,7 +60,7 @@
else if(href_list["flavour_text_robot"])
switch(href_list["flavour_text_robot"])
if("open")
else if("Default")
if("Default")
var/msg = sanitize(input(usr,"Set the default flavour text for your robot. It will be used for any module without individual setting.","Flavour Text",html_decode(pref.flavour_texts_robot["Default"])) as message, extra = 0)
if(CanUseTopic(user))
pref.flavour_texts_robot[href_list["flavour_text_robot"]] = msg