[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:
CHOMPStation2
2024-10-04 06:00:17 -07:00
committed by GitHub
parent 43ee646816
commit ab154b48b2
1511 changed files with 12497 additions and 12357 deletions

View File

@@ -62,7 +62,7 @@
to_chat(user,"<span class='notice'>You place your cards on the bottom of \the [src]</span>.")
return
else
to_chat(user,"<span class='warning'>You can't mix cards from other decks!</span>")
to_chat(user,span_warning("You can't mix cards from other decks!"))
return
..()
@@ -85,19 +85,19 @@
if(usr.stat || !Adjacent(usr)) return
if(user.hands_are_full()) // Safety check lest the card disappear into oblivion
to_chat(user,"<span class='notice'>Your hands are full!</span>")
to_chat(user,span_notice("Your hands are full!"))
return
if(!istype(usr,/mob/living/carbon))
return
if(!cards.len)
to_chat(user,"<span class='notice'>There are no cards in the deck.</span>")
to_chat(user,span_notice("There are no cards in the deck."))
return
var/obj/item/hand/H = user.get_type_in_hands(/obj/item/hand)
if(H && !(H.parentdeck == src))
to_chat(user,"<span class='warning'>You can't mix cards from different decks!</span>")
to_chat(user,span_warning("You can't mix cards from different decks!"))
return
if(!H)
@@ -112,7 +112,7 @@
H.parentdeck = src
H.update_icon()
user.visible_message("<b>\The [user]</b> draws a card.")
to_chat(user,"<span class='notice'>It's the [P].</span>")
to_chat(user,span_notice("It's the [P]."))
/obj/item/deck/verb/deal_card()
@@ -124,7 +124,7 @@
if(usr.stat || !Adjacent(usr)) return
if(!cards.len)
to_chat(usr,"<span class='notice'>There are no cards in the deck.</span>")
to_chat(usr,span_notice("There are no cards in the deck."))
return
var/list/players = list()
@@ -148,7 +148,7 @@
if(usr.stat || !Adjacent(usr)) return
if(!cards.len)
to_chat(usr,"<span class='notice'>There are no cards in the deck.</span>")
to_chat(usr,span_notice("There are no cards in the deck."))
return
var/list/players = list()
@@ -248,10 +248,10 @@
if (H.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
to_chat(user,"<span class='notice'>You try to move your [temp.name], but cannot!</span>")
to_chat(user,span_notice("You try to move your [temp.name], but cannot!"))
return
to_chat(user,"<span class='notice'>You pick up [src].</span>")
to_chat(user,span_notice("You pick up [src]."))
user.put_in_hands(src)
return
@@ -267,10 +267,10 @@
if (H.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
to_chat(user,"<span class='notice'>You try to move your [temp.name], but cannot!</span>")
to_chat(user,span_notice("You try to move your [temp.name], but cannot!"))
return
to_chat(user,"<span class='notice'>You pick up [src].</span>")
to_chat(user,span_notice("You pick up [src]."))
user.put_in_hands(src)
return
@@ -373,7 +373,7 @@
if(user.stat || !Adjacent(user)) return
if(user.hands_are_full()) // Safety check lest the card disappear into oblivion
to_chat(usr,"<span class='danger'>Your hands are full!</span>")
to_chat(usr,span_danger("Your hands are full!"))
return
var/pickablecards = list()

View File

@@ -18,9 +18,9 @@
..()
if(W.has_tool_quality(TOOL_WELDER) || istype(W, /obj/item/flame/lighter))
if(cheater)
to_chat(user, "<span class='warning'>Wait, this [name] is already weighted!</span>")
to_chat(user, span_warning("Wait, this [name] is already weighted!"))
else if(tamper_proof)
to_chat(user, "<span class='warning'>This [name] is proofed against tampering!</span>")
to_chat(user, span_warning("This [name] is proofed against tampering!"))
else
var/to_weight = input("What should the [name] be weighted towards? You can't undo this later, only change the number!","Set the desired result") as null|num
if(isnull(to_weight) || (to_weight < 1) || (to_weight > sides)) //You must input a number higher than 0 and no greater than the number of sides
@@ -110,9 +110,9 @@
else if(sides == 20 && result == 1)
comment = "Ouch, bad luck."
user.visible_message("<span class='notice'>[user] has thrown [src]. It lands on [result]. [comment]</span>", \
"<span class='notice'>You throw [src]. It lands on a [result]. [comment]</span>", \
"<span class='notice'>You hear [src] landing on a [result]. [comment]</span>")
user.visible_message(span_notice("[user] has thrown [src]. It lands on [result]. [comment]"), \
span_notice("You throw [src]. It lands on a [result]. [comment]"), \
span_notice("You hear [src] landing on a [result]. [comment]"))
/*
* Dice packs
@@ -165,9 +165,9 @@
)
/obj/item/storage/dicecup/attack_self(mob/user as mob)
user.visible_message("<span class='notice'>[user] shakes [src].</span>", \
"<span class='notice'>You shake [src].</span>", \
"<span class='notice'>You hear dice rolling.</span>")
user.visible_message(span_notice("[user] shakes [src]."), \
span_notice("You shake [src]."), \
span_notice("You hear dice rolling."))
rollCup(user)
/obj/item/storage/dicecup/proc/rollCup(mob/user as mob)