mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
[MIRROR] refactors most spans (#9139)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
@@ -119,7 +119,7 @@
|
||||
pref.real_name = new_name
|
||||
return TOPIC_REFRESH
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</span>")
|
||||
to_chat(user, span_warning("Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ."))
|
||||
return TOPIC_NOACTION
|
||||
|
||||
else if(href_list["random_name"])
|
||||
@@ -138,7 +138,7 @@
|
||||
pref.nickname = new_nickname
|
||||
return TOPIC_REFRESH
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</span>")
|
||||
to_chat(user, span_warning("Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ."))
|
||||
return TOPIC_NOACTION
|
||||
|
||||
else if(href_list["reset_nickname"])
|
||||
|
||||
@@ -1208,7 +1208,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
organ = O_STOMACH
|
||||
if("Brain")
|
||||
if(pref.organ_data[BP_HEAD] != "cyborg")
|
||||
to_chat(user, "<span class='warning'>You may only select a cybernetic or synthetic brain if you have a full prosthetic body.</span>")
|
||||
to_chat(user, span_warning("You may only select a cybernetic or synthetic brain if you have a full prosthetic body."))
|
||||
return
|
||||
organ = "brain"
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
if(player_to_ignore)
|
||||
player_to_ignore = sanitize(ckey(player_to_ignore))
|
||||
if(player_to_ignore == user.ckey)
|
||||
to_chat(user, "<span class='notice'>You can't ignore yourself.</span>")
|
||||
to_chat(user, span_notice("You can't ignore yourself."))
|
||||
return TOPIC_REFRESH
|
||||
pref.ignored_players |= player_to_ignore
|
||||
return TOPIC_REFRESH
|
||||
|
||||
@@ -110,16 +110,16 @@ var/list/gear_datums = list()
|
||||
var/total_cost = 0
|
||||
for(var/gear_name in pref.gear)
|
||||
if(!gear_datums[gear_name])
|
||||
to_chat(preference_mob, "<span class='warning'>You cannot have more than one of the \the [gear_name]</span>")
|
||||
to_chat(preference_mob, span_warning("You cannot have more than one of the \the [gear_name]"))
|
||||
pref.gear -= gear_name
|
||||
else if(!(gear_name in valid_gear_choices()))
|
||||
to_chat(preference_mob, "<span class='warning'>You cannot take \the [gear_name] as you are not whitelisted for the species or item.</span>") //Vorestation Edit
|
||||
to_chat(preference_mob, span_warning("You cannot take \the [gear_name] as you are not whitelisted for the species or item.")) //Vorestation Edit
|
||||
pref.gear -= gear_name
|
||||
else
|
||||
var/datum/gear/G = gear_datums[gear_name]
|
||||
if(total_cost + G.cost > MAX_GEAR_COST)
|
||||
pref.gear -= gear_name
|
||||
to_chat(preference_mob, "<span class='warning'>You cannot afford to take \the [gear_name]</span>")
|
||||
to_chat(preference_mob, span_warning("You cannot afford to take \the [gear_name]"))
|
||||
else
|
||||
total_cost += G.cost
|
||||
|
||||
|
||||
@@ -107,19 +107,19 @@ var/list/trait_categories = list() // The categories available for the trait men
|
||||
|
||||
for(var/trait_name in pref.traits)
|
||||
if(!trait_datums[trait_name])
|
||||
to_chat(preference_mob, "<span class='warning'>You cannot have more than one of trait: [trait_name]</span>")
|
||||
to_chat(preference_mob, span_warning("You cannot have more than one of trait: [trait_name]"))
|
||||
pref.traits -= trait_name
|
||||
else
|
||||
var/datum/trait/T = trait_datums[trait_name]
|
||||
var/invalidity = T.test_for_invalidity(src)
|
||||
if(invalidity)
|
||||
pref.traits -= trait_name
|
||||
to_chat(preference_mob, "<span class='warning'>You cannot take the [trait_name] trait. Reason: [invalidity]</span>")
|
||||
to_chat(preference_mob, span_warning("You cannot take the [trait_name] trait. Reason: [invalidity]"))
|
||||
|
||||
var/conflicts = T.test_for_trait_conflict(pref.traits)
|
||||
if(conflicts)
|
||||
pref.traits -= trait_name
|
||||
to_chat(preference_mob, "<span class='warning'>The [trait_name] trait is mutually exclusive with [conflicts].</span>")
|
||||
to_chat(preference_mob, span_warning("The [trait_name] trait is mutually exclusive with [conflicts]."))
|
||||
|
||||
/datum/category_item/player_setup_item/traits/OnTopic(href, href_list, user)
|
||||
if(href_list["toggle_trait"])
|
||||
@@ -129,12 +129,12 @@ var/list/trait_categories = list() // The categories available for the trait men
|
||||
else
|
||||
var/invalidity = T.test_for_invalidity(src)
|
||||
if(invalidity)
|
||||
to_chat(user, "<span class='warning'>You cannot take the [T.name] trait. Reason: [invalidity]</span>")
|
||||
to_chat(user, span_warning("You cannot take the [T.name] trait. Reason: [invalidity]"))
|
||||
return TOPIC_NOACTION
|
||||
|
||||
var/conflicts = T.test_for_trait_conflict(pref.traits)
|
||||
if(conflicts)
|
||||
to_chat(user, "<span class='warning'>The [T.name] trait is mutually exclusive with [conflicts].</span>")
|
||||
to_chat(user, span_warning("The [T.name] trait is mutually exclusive with [conflicts]."))
|
||||
return TOPIC_NOACTION
|
||||
|
||||
pref.traits += T.name
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
var/new_size = tgui_input_number(user, "Choose your character's size, ranging from 25% to 200%", "Set Size", null, 200, 25)
|
||||
if (!ISINRANGE(new_size,25,200))
|
||||
pref.size_multiplier = 1
|
||||
to_chat(user, "<span class='notice'>Invalid size.</span>")
|
||||
to_chat(user, span_notice("Invalid size."))
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
else if(new_size)
|
||||
pref.size_multiplier = (new_size/100)
|
||||
|
||||
Reference in New Issue
Block a user