Normalize alert() calls

This commit is contained in:
Aronai Sieyes
2021-06-25 14:27:14 -04:00
parent 8a3971a37e
commit 70bff20384
102 changed files with 1424 additions and 1427 deletions
@@ -187,7 +187,7 @@
else if(href_list["custom_species"])
/*if(pref.species != "Custom Species")
alert("You cannot set a custom species name unless you set your character to use the 'Custom Species' \
alert(usr, "You cannot set a custom species name unless you set your character to use the 'Custom Species' \
species on the 'General' tab. If you have this set to something, it's because you had it set before the \
Trait system was implemented. If you wish to change it, set your species to 'Custom Species' and configure \
the species completely.")
@@ -214,28 +214,28 @@
return TOPIC_REFRESH
else if(href_list["blood_reset"])
var/choice = alert("Reset blood color to human default (#A10808)?","Reset Blood Color","Reset","Cancel")
var/choice = alert(usr, "Reset blood color to human default (#A10808)?","Reset Blood Color","Reset","Cancel")
if(choice == "Reset")
pref.blood_color = "#A10808"
return TOPIC_REFRESH
else if(href_list["clicked_pos_trait"])
var/datum/trait/trait = text2path(href_list["clicked_pos_trait"])
var/choice = alert("Remove [initial(trait.name)] and regain [initial(trait.cost)] points?","Remove Trait","Remove","Cancel")
var/choice = alert(usr, "Remove [initial(trait.name)] and regain [initial(trait.cost)] points?","Remove Trait","Remove","Cancel")
if(choice == "Remove")
pref.pos_traits -= trait
return TOPIC_REFRESH
else if(href_list["clicked_neu_trait"])
var/datum/trait/trait = text2path(href_list["clicked_neu_trait"])
var/choice = alert("Remove [initial(trait.name)]?","Remove Trait","Remove","Cancel")
var/choice = alert(usr, "Remove [initial(trait.name)]?","Remove Trait","Remove","Cancel")
if(choice == "Remove")
pref.neu_traits -= trait
return TOPIC_REFRESH
else if(href_list["clicked_neg_trait"])
var/datum/trait/trait = text2path(href_list["clicked_neg_trait"])
var/choice = alert("Remove [initial(trait.name)] and lose [initial(trait.cost)] points?","Remove Trait","Remove","Cancel")
var/choice = alert(usr, "Remove [initial(trait.name)] and lose [initial(trait.cost)] points?","Remove Trait","Remove","Cancel")
if(choice == "Remove")
pref.neg_traits -= trait
return TOPIC_REFRESH
@@ -310,7 +310,7 @@
done = TRUE
if(trait_choice in nicelist)
var/datum/trait/path = nicelist[trait_choice]
var/choice = alert("\[Cost:[initial(path.cost)]\] [initial(path.desc)]",initial(path.name),"Take Trait","Cancel","Go Back")
var/choice = alert(usr, "\[Cost:[initial(path.cost)]\] [initial(path.desc)]",initial(path.name),"Take Trait","Cancel","Go Back")
if(choice == "Cancel")
trait_choice = null
if(choice != "Go Back")
@@ -325,21 +325,21 @@
var/conflict = FALSE
if(pref.dirty_synth && !(instance.can_take & SYNTHETICS))
alert("The trait you've selected can only be taken by organic characters!","Error")
alert(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))
alert("The trait you've selected can only be taken by synthetic characters!","Error")
alert(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)
alert("The trait you've selected cannot be taken by the species you've chosen!","Error")
alert(usr, "The trait you've selected cannot be taken by the species you've chosen!","Error")
return TOPIC_REFRESH
if( LAZYLEN(instance.allowed_species) && !(pref.species in instance.allowed_species)) //Adding white list handling -shark
alert("The trait you've selected cannot be taken by the species you've chosen!","Error")
alert(usr, "The trait you've selected cannot be taken by the species you've chosen!","Error")
return TOPIC_REFRESH
if(trait_choice in pref.pos_traits + pref.neu_traits + pref.neg_traits)
@@ -358,7 +358,7 @@
break varconflict
if(conflict)
alert("You cannot take this trait and [conflict] at the same time. \
alert(usr, "You cannot take this trait and [conflict] at the same time. \
Please remove that trait, or pick another trait to add.","Error")
return TOPIC_REFRESH