mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user