refactors most spans

This commit is contained in:
Kashargul
2024-10-02 21:10:31 +02:00
parent 5417c7772c
commit a2c673ab7a
1517 changed files with 12436 additions and 12347 deletions
+7 -7
View File
@@ -41,20 +41,20 @@
if(target.stat)
return
if(target == user)
to_chat(user, "<span class='notice'>You can't pull \the [src] by yourself, that would just be sad!</span>")
to_chat(user, span_notice("You can't pull \the [src] by yourself, that would just be sad!"))
return
to_chat(user, "<span class='notice'>You offer \the [src] to \the [target] to pull and wait to see how whether they do.</span>")
to_chat(user, span_notice("You offer \the [src] to \the [target] to pull and wait to see how whether they do."))
var/check_pull = tgui_alert(target, "\The [user] is offering to pull \the [src] with you, do you want to pull it?", "Pull Cracker", list("Yes", "No"))
if(!check_pull || check_pull == "No")
to_chat(user, "<span class='notice'>\The [target] chose not to pull \the [src]!</span>")
to_chat(user, span_notice("\The [target] chose not to pull \the [src]!"))
return
if(!adjacent)
to_chat(user, "<span class='notice'>\The [target] is not standing close enough to pull \the [src]!</span>")
to_chat(user, span_notice("\The [target] is not standing close enough to pull \the [src]!"))
return
var/obj/item/check_hand = user.get_active_hand()
if(check_hand != src)
to_chat(user, "<span class='notice'>\The [src] is no longer in-hand!</span>")
to_chat(target, "<span class='notice'>\The [src] is no longer in-hand!</span>")
to_chat(user, span_notice("\The [src] is no longer in-hand!"))
to_chat(target, span_notice("\The [src] is no longer in-hand!"))
return
var/prize = pick(prizes)
var/joke = pick(jokes)
@@ -77,7 +77,7 @@
var/spawnloc = get_turf(winner)
winner.visible_message("<span class='notice'>\The [winner] wins the cracker prize!</span>","<span class='notice'>You win the cracker prize!</span>")
winner.visible_message(span_notice("\The [winner] wins the cracker prize!"),span_notice("You win the cracker prize!"))
if(prize == "shrinking")
winner.resize(0.25)
winner.visible_message("<b>\The [winner]</b> shrinks suddenly!")
@@ -32,7 +32,7 @@
H.help_shake_act(user)
if(isanimal(L))
var/mob/living/simple_mob/S = L
user.visible_message("<span class='notice'>[user] [S.response_help] \the [S].</span>")
user.visible_message(span_notice("[user] [S.response_help] \the [S]."))
//Egg features.
/obj/item/holder/attack_hand(mob/living/user as mob)
+2 -2
View File
@@ -15,10 +15,10 @@
if (user.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
if(!temp)
to_chat(user, "<span class='notice'>You try to use your hand, but realize it is no longer attached!</span>")
to_chat(user, span_notice("You try to use your hand, but realize it is no longer attached!"))
return
if(held_mob == user) return // No picking your own micro self up
+8 -8
View File
@@ -190,7 +190,7 @@
return 0
if(size_diff >= 0.50 || mob_size < MOB_SMALL || size_diff >= get_effective_size() || ignore_size)
if(buckled)
to_chat(usr,"<span class='notice'>You have to unbuckle \the [src] before you pick them up.</span>")
to_chat(usr,span_notice("You have to unbuckle \the [src] before you pick them up."))
return 0
holder_type = /obj/item/holder/micro
var/obj/item/holder/m_holder = get_scooped(M, G)
@@ -244,9 +244,9 @@
tmob_message = tail.msg_owner_stepunder
if(src_message)
to_chat(src, "<span class='filter_notice'>[STEP_TEXT_OWNER(src_message)]</span>")
to_chat(src, span_filter_notice("[STEP_TEXT_OWNER(src_message)]"))
if(tmob_message)
to_chat(tmob, "<span class='filter_notice'>[STEP_TEXT_PREY(tmob_message)]</span>")
to_chat(tmob, span_filter_notice("[STEP_TEXT_PREY(tmob_message)]"))
return TRUE
return FALSE
@@ -307,8 +307,8 @@
return FALSE
if(tmob.a_intent != I_HELP && prob(35))
to_chat(pred, "<span class='danger'>[prey] dodges out from under your foot!</span>")
to_chat(prey, "<span class='danger'>You narrowly avoid [pred]'s foot!</span>")
to_chat(pred, span_danger("[prey] dodges out from under your foot!"))
to_chat(prey, span_danger("You narrowly avoid [pred]'s foot!"))
return FALSE
now_pushing = 0
@@ -396,8 +396,8 @@
prey.drip(3)
add_attack_logs(pred, prey, "Crushed underfoot (walk, about [calculated_damage] damage)")
to_chat(pred, "<span class='danger'>[message_pred]</span>")
to_chat(prey, "<span class='danger'>[message_prey]</span>")
to_chat(pred, span_danger("[message_pred]"))
to_chat(prey, span_danger("[message_prey]"))
return TRUE
/mob/living/verb/toggle_pickups()
@@ -406,7 +406,7 @@
set category = "IC"
pickup_active = !pickup_active
to_chat(src, "<span class='filter_notice'>You will [pickup_active ? "now" : "no longer"] attempt to pick up mobs when clicking them with help intent.</span>")
to_chat(src, span_filter_notice("You will [pickup_active ? "now" : "no longer"] attempt to pick up mobs when clicking them with help intent."))
#undef STEP_TEXT_OWNER
#undef STEP_TEXT_PREY
+12 -12
View File
@@ -39,7 +39,7 @@
set src in view(1)
size_set_to = (rand(25,200)) /100
usr.visible_message("<span class='warning'>\The [usr] spins the size dial to a random value!</span>","<span class='notice'>You spin the dial to a random value!</span>")
usr.visible_message(span_warning("\The [usr] spins the size dial to a random value!"),span_notice("You spin the dial to a random value!"))
/obj/item/gun/energy/sizegun/consume_next_projectile()
. = ..()
@@ -58,9 +58,9 @@
//We do valid resize testing in actual firings because people move after setting these things.
//Just a basic clamp here to the valid ranges.
size_set_to = clamp((size_select/100), RESIZE_MINIMUM_DORMS, RESIZE_MAXIMUM_DORMS)
to_chat(usr, "<span class='notice'>You set the size to [size_select]%</span>")
to_chat(usr, span_notice("You set the size to [size_select]%"))
if(size_set_to < RESIZE_MINIMUM || size_set_to > RESIZE_MAXIMUM)
to_chat(usr, "<span class='notice'>Note: Resizing limited to 25-200% automatically while outside dormatory areas.</span>") //hint that we clamp it in resize
to_chat(usr, span_notice("Note: Resizing limited to 25-200% automatically while outside dormatory areas.")) //hint that we clamp it in resize
/obj/item/gun/energy/sizegun/update_icon(var/ignore_inhands)
var/grow_mode = "shrink"
@@ -82,7 +82,7 @@
/obj/item/gun/energy/sizegun/examine(mob/user)
. = ..()
. += "<span class='info'>It is currently set at [size_set_to*100]%</span>"
. += span_info("It is currently set at [size_set_to*100]%")
/obj/item/gun/energy/sizegun/admin
name = "modified size gun"
@@ -132,14 +132,14 @@
if(!size_select)
return //cancelled
size_set_to = clamp((size_select/100), 0, 1000) //eheh
to_chat(usr, "<span class='notice'>You set the size to [size_select]%</span>")
to_chat(usr, span_notice("You set the size to [size_select]%"))
/obj/item/gun/energy/sizegun/afterattack(atom/A, mob/living/user, adjacent, params)
if(adjacent) return //A is adjacent, is the user, or is on the user's person
if(backfire)
if(prob(50))
to_chat(user, "<span class='notice'>\The [src] backfires and consumes its entire charge!</span>")
to_chat(user, span_notice("\The [src] backfires and consumes its entire charge!"))
Fire(user, user)
power_supply.charge = 0
var/mob/living/M = loc // TGMC Ammo HUD
@@ -154,7 +154,7 @@
/obj/item/gun/energy/sizegun/attack(atom/A, mob/living/user, adjacent, params)
if(backfire)
if(prob(50))
to_chat(user, "<span class='notice'>\The [src] backfires and consumes its entire charge!</span>")
to_chat(user, span_notice("\The [src] backfires and consumes its entire charge!"))
Fire(user, user)
power_supply.charge = 0
var/mob/living/M = loc // TGMC Ammo HUD
@@ -170,11 +170,11 @@
/obj/item/gun/energy/sizegun/attackby(var/obj/item/A as obj, mob/user as mob)
if(A.has_tool_quality(TOOL_WIRECUTTER))
if(backfire)
to_chat(user, "<span class='warning'>You repair the damage to the \the [src].</span>")
to_chat(user, span_warning("You repair the damage to the \the [src]."))
backfire = 0
name = "size gun"
else
to_chat(user, "<span class='warning'>You snip a wire on \the [src], making it less reliable.</span>")
to_chat(user, span_warning("You snip a wire on \the [src], making it less reliable."))
backfire = 1
name = "unstable size gun"
..()
@@ -210,7 +210,7 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(istype(H.gloves, /obj/item/clothing/gloves/bluespace))
M.visible_message("<span class='warning'>\The [H]'s bracelet flashes and absorbs the beam!</span>","<span class='notice'>Your bracelet flashes and absorbs the beam!</span>")
M.visible_message(span_warning("\The [H]'s bracelet flashes and absorbs the beam!"),span_notice("Your bracelet flashes and absorbs the beam!"))
return
if(!M.resize(set_size, uncapped = M.has_large_resize_bounds(), ignore_prefs = ignoring_prefs))
to_chat(M, span_blue("The beam fires into your body, changing your size!"))
@@ -227,9 +227,9 @@
var/very_big = is_extreme_size(set_size)
if(very_big && can_be_big) // made an extreme size in an area that allows it, don't assume adminbuse
to_chat(firer, "<span class='warning'>[M] will lose this size upon moving into an area where this size is not allowed.</span>")
to_chat(firer, span_warning("[M] will lose this size upon moving into an area where this size is not allowed."))
else if(very_big) // made an extreme size in an area that doesn't allow it, assume adminbuse
to_chat(firer, "<span class='warning'>[M] will retain this normally unallowed size outside this area.</span>")
to_chat(firer, span_warning("[M] will retain this normally unallowed size outside this area."))
M.resize(set_size, uncapped = TRUE, ignore_prefs = TRUE) // Always ignores prefs, caution is advisable