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
@@ -49,13 +49,13 @@
name = "dufflebag of holding"
var/tilted = 0
icon_state = "holdingduffle"
/obj/item/storage/backpack/holding/duffle/Initialize()
. = ..()
if(prob(50))
icon_state = "[icon_state]_tilted"
tilted = 1
/obj/item/storage/backpack/holding/duffle/verb/tilt()
set name = "Adjust Duffelbag Angle"
set desc = "Adjust the angle of your dufflebag for cosmetic effect"
@@ -76,7 +76,7 @@
/obj/item/storage/backpack/holding/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/storage/backpack/holding))
to_chat(user, "<span class='warning'>The Bluespace interfaces of the two devices conflict and malfunction.</span>")
to_chat(user, span_warning("The Bluespace interfaces of the two devices conflict and malfunction."))
qdel(W)
return
. = ..()
@@ -175,13 +175,13 @@
var/tilted = 0
var/can_tilt = 1
max_storage_space = INVENTORY_DUFFLEBAG_SPACE
/obj/item/storage/backpack/dufflebag/Initialize()
. = ..()
if(prob(50))
icon_state = "[icon_state]_tilted"
tilted = 1
/obj/item/storage/backpack/dufflebag/verb/tilt()
set name = "Adjust Duffelbag Angle"
set desc = "Adjust the angle of your dufflebag for cosmetic effect"
@@ -514,34 +514,34 @@
if(H.stat)
return
if(H.back == src)
to_chat(H, "<span class='warning'>How do you expect to work on \the [src] while it's on your back?</span>")
to_chat(H, span_warning("How do you expect to work on \the [src] while it's on your back?"))
return
if(!parachute) //This packs the parachute
H.visible_message("<b>\The [H]</b> starts to pack \the [src]!", \
"<span class='notice'>You start to pack \the [src]!</span>", \
span_notice("You start to pack \the [src]!"), \
"You hear the shuffling of cloth.")
if(do_after(H, 50))
H.visible_message("<b>\The [H]</b> finishes packing \the [src]!", \
"<span class='notice'>You finish packing \the [src]!</span>", \
span_notice("You finish packing \the [src]!"), \
"You hear the shuffling of cloth.")
parachute = TRUE
else
H.visible_message("<b>\The [src]</b> gives up on packing \the [src]!", \
"<span class='notice'>You give up on packing \the [src]!</span>")
span_notice("You give up on packing \the [src]!"))
return
else //This unpacks the parachute
H.visible_message("<b>\The [src]</b> starts to unpack \the [src]!", \
"<span class='notice'>You start to unpack \the [src]!</span>", \
span_notice("You start to unpack \the [src]!"), \
"You hear the shuffling of cloth.")
if(do_after(H, 25))
H.visible_message("<b>\The [src]</b> finishes unpacking \the [src]!", \
"<span class='notice'>You finish unpacking \the [src]!</span>", \
span_notice("You finish unpacking \the [src]!"), \
"You hear the shuffling of cloth.")
parachute = FALSE
else
H.visible_message("<b>\The [src]</b> decides not to unpack \the [src]!", \
"<span class='notice'>You decide not to unpack \the [src]!</span>")
span_notice("You decide not to unpack \the [src]!"))
return
/obj/item/storage/backpack/satchel/ranger
@@ -549,4 +549,4 @@
desc = "A satchel designed for the Go Go ERT Rangers series to allow for slightly bigger carry capacity for the ERT-Rangers.\
Unlike the show claims, it is not a phoron-enhanced satchel of holding with plot-relevant content."
icon = 'icons/obj/clothing/ranger.dmi'
icon_state = "ranger_satchel"
icon_state = "ranger_satchel"
@@ -15,7 +15,7 @@
if(istype(H) && istype(H.tail_style, taurtype))
return 1
else
to_chat(H, "<span class='warning'>[no_message]</span>")
to_chat(H, span_warning("[no_message]"))
return 0
/* If anyone wants to make some... this is how you would.
@@ -201,4 +201,3 @@
icon_override = 'icons/inventory/back/mob_vr.dmi'
icon_state = "satchel_strapless"
item_state_slots = null
@@ -138,7 +138,7 @@
/obj/item/storage/bag/ore/attackby(obj/item/W as obj, mob/user as mob)
if(current_capacity >= max_storage_space)
to_chat(user, "<span class='notice'>\the [src] is too full to possibly fit anything else inside of it.</span>")
to_chat(user, span_notice("\the [src] is too full to possibly fit anything else inside of it."))
return
if (istype(W, /obj/item/ore))
@@ -186,13 +186,13 @@
success = 1
if(!silent) //Let's do a single check and then do more instead of a bunch at once.
if(success && !failure && !max_pickup_reached) //Picked stuff up, did not reach capacity, did not reach max_pickup.
to_chat(user, "<span class='notice'>You put everything in [src].</span>")
to_chat(user, span_notice("You put everything in [src]."))
else if(success && failure) //Picked stuff up to capacity.
to_chat(user, "<span class='notice'>You fill the [src].</span>")
to_chat(user, span_notice("You fill the [src]."))
else if(success && max_pickup_reached) //Picked stuff up to the max_pickup
to_chat(user, "<span class='notice'>You fill the [src] with as much as you can grab in one go.</span>")
to_chat(user, span_notice("You fill the [src] with as much as you can grab in one go."))
else //Failed. The bag is full.
to_chat(user, "<span class='notice'>You fail to pick anything up with \the [src].</span>")
to_chat(user, span_notice("You fail to pick anything up with \the [src]."))
if(istype(user.pulling, /obj/structure/ore_box)) //Bit of a crappy way to do this, as it doubles spam for the user, but it works. //Then let me fix it. ~CL.
var/obj/structure/ore_box/OB = user.pulling
for(var/ore in stored_ore)
@@ -236,11 +236,11 @@
if(istype(user, /mob/living))
add_fingerprint(user)
. += "<span class='notice'>It holds:</span>"
. += span_notice("It holds:")
var/has_ore = 0
for(var/ore in stored_ore)
if(stored_ore[ore] > 0)
. += "<span class='notice'>- [stored_ore[ore]] [ore]</span>"
. += span_notice("- [stored_ore[ore]] [ore]")
has_ore = 1
if(!has_ore)
. += "Nothing."
@@ -295,7 +295,7 @@
current += S.get_amount()
if(capacity == current)//If it's full, you're done
if(!stop_messages)
to_chat(usr, "<span class='warning'>The snatcher is full.</span>")
to_chat(usr, span_warning("The snatcher is full."))
return 0
return 1
@@ -20,7 +20,7 @@
set category = "Object"
if(show_above_suit == -1)
to_chat(usr, "<span class='notice'>\The [src] cannot be worn above your suit!</span>")
to_chat(usr, span_notice("\The [src] cannot be worn above your suit!"))
return
show_above_suit = !show_above_suit
update_icon()
@@ -65,7 +65,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list(
name = user.mind.my_religion.bible_name
icon_state = user.mind.my_religion.bible_icon_state
item_state = user.mind.my_religion.bible_item_state
to_chat(user, "<span class='notice'>You invoke [user.mind.my_religion.deity] and prepare a copy of [src].</span>")
to_chat(user, span_notice("You invoke [user.mind.my_religion.deity] and prepare a copy of [src]."))
/**
* Checks if we are allowed to interact with a radial menu
@@ -104,7 +104,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list(
if(!proximity) return
if(user.mind && (user.mind.assigned_role == JOB_CHAPLAIN))
if(A.reagents && A.reagents.has_reagent("water")) //blesses all the water in the holder
to_chat(user, "<span class='notice'>You bless [A].</span>")
to_chat(user, span_notice("You bless [A]."))
var/water2holy = A.reagents.get_reagent_amount("water")
A.reagents.del_reagent("water")
A.reagents.add_reagent("holywater",water2holy)
@@ -52,7 +52,7 @@
if (!found) // User is too far away
return
// Now make the cardboard
to_chat(user, "<span class='notice'>You fold [src] flat.</span>")
to_chat(user, span_notice("You fold [src] flat."))
playsound(src, 'sound/items/storage/boxfold.ogg', 30, 1)
new foldable(get_turf(src))
qdel(src)
@@ -369,7 +369,7 @@
if(istype(W) && !W.lit && !W.burnt)
if(prob(25))
W.light(user)
user.visible_message("<span class='notice'>[user] manages to light the match on the matchbox.</span>")
user.visible_message(span_notice("[user] manages to light the match on the matchbox."))
else
playsound(src, 'sound/items/cigs_lighters/matchstick_hit.ogg', 25, 0, -1)
W.update_icon()
@@ -27,7 +27,7 @@
..()
/obj/item/storage/vore_egg/proc/hatch(mob/living/user as mob)
visible_message("<span class='danger'>\The [src] begins to shake as something pushes out from within!</span>")
visible_message(span_danger("\The [src] begins to shake as something pushes out from within!"))
animate_shake()
if(do_after(user, 50))
if(use_sound)
@@ -312,7 +312,7 @@
var/obj/item/clothing/mask/smokable/cigarette/cig = locate() in src
if(cig == null)
to_chat(user, "<span class='notice'>Looks like the packet is out of cigarettes.</span>")
to_chat(user, span_notice("Looks like the packet is out of cigarettes."))
return
// Instead of running equip_to_slot_if_possible() we check here first,
@@ -326,7 +326,7 @@
user.equip_to_slot(cig, slot_wear_mask)
reagents.maximum_volume = 15 * contents.len
to_chat(user, "<span class='notice'>You take a cigarette out of the pack.</span>")
to_chat(user, span_notice("You take a cigarette out of the pack."))
update_icon()
else
..()
@@ -73,7 +73,7 @@
name = "oxygen deprivation first aid kit"
desc = "A box full of oxygen goodies."
icon_state = "o2"
item_state_slots = list(slot_r_hand_str = "firstaid-o2", slot_l_hand_str = "firstaid-o2")
item_state_slots = list(slot_r_hand_str = "firstaid-o2", slot_l_hand_str = "firstaid-o2")
starts_with = list(
/obj/item/reagent_containers/pill/dexalin,
/obj/item/reagent_containers/pill/dexalin,
@@ -210,13 +210,13 @@
if(istype(W, /obj/item/pen) || istype(W, /obj/item/flashlight/pen))
var/tmp_label = sanitizeSafe(tgui_input_text(user, "Enter a label for [name]", "Label", label_text, MAX_NAME_LEN), MAX_NAME_LEN)
if(length(tmp_label) > 50)
to_chat(user, "<span class='notice'>The label can be at most 50 characters long.</span>")
to_chat(user, span_notice("The label can be at most 50 characters long."))
else if(length(tmp_label) > 10)
to_chat(user, "<span class='notice'>You set the label.</span>")
to_chat(user, span_notice("You set the label."))
label_text = tmp_label
update_name_label()
else
to_chat(user, "<span class='notice'>You set the label to \"[tmp_label]\".</span>")
to_chat(user, span_notice("You set the label to \"[tmp_label]\"."))
label_text = tmp_label
update_name_label()
else
@@ -28,17 +28,17 @@
if (user.hand)
temp = H.get_organ("l_hand")
if(!temp)
to_chat(user, "<span class='warning'>You need two hands to pick this up!</span>")
to_chat(user, span_warning("You need two hands to pick this up!"))
return
if(user.get_inactive_hand())
to_chat(user, "<span class='warning'>You need your other hand to be empty</span>")
to_chat(user, span_warning("You need your other hand to be empty"))
return
return ..()
/obj/item/storage/laundry_basket/attack_self(mob/user as mob)
var/turf/T = get_turf(user)
to_chat(user, "<span class='notice'>You dump the [src]'s contents onto \the [T].</span>")
to_chat(user, span_notice("You dump the [src]'s contents onto \the [T]."))
return ..()
/obj/item/storage/laundry_basket/pickup(mob/user)
@@ -20,21 +20,21 @@
/obj/item/storage/lockbox/attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/card/id))
if(src.broken)
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
to_chat(user, span_warning("It appears to be broken."))
return
if(src.allowed(user))
src.locked = !( src.locked )
if(src.locked)
src.icon_state = src.icon_locked
to_chat(user, "<span class='notice'>You lock \the [src]!</span>")
to_chat(user, span_notice("You lock \the [src]!"))
close_all()
return
else
src.icon_state = src.icon_closed
to_chat(user, "<span class='notice'>You unlock \the [src]!</span>")
to_chat(user, span_notice("You unlock \the [src]!"))
return
else
to_chat(user, "<span class='warning'>Access Denied</span>")
to_chat(user, span_warning("Access Denied"))
else if(istype(W, /obj/item/melee/energy/blade))
if(emag_act(INFINITY, user, W, "The locker has been sliced open by [user] with an energy blade!", "You hear metal being sliced and sparks flying."))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
@@ -45,13 +45,13 @@
if(!locked)
..()
else
to_chat(user, "<span class='warning'>It's locked!</span>")
to_chat(user, span_warning("It's locked!"))
return
/obj/item/storage/lockbox/show_to(mob/user as mob)
if(locked)
to_chat(user, "<span class='warning'>It's locked!</span>")
to_chat(user, span_warning("It's locked!"))
else
..()
return
@@ -59,13 +59,13 @@
/obj/item/storage/lockbox/emag_act(var/remaining_charges, var/mob/user, var/emag_source, var/visual_feedback = "", var/audible_feedback = "")
if(!broken)
if(visual_feedback)
visual_feedback = "<span class='warning'>[visual_feedback]</span>"
visual_feedback = span_warning("[visual_feedback]")
else
visual_feedback = "<span class='warning'>The locker has been sliced open by [user] with an electromagnetic card!</span>"
visual_feedback = span_warning("The locker has been sliced open by [user] with an electromagnetic card!")
if(audible_feedback)
audible_feedback = "<span class='warning'>[audible_feedback]</span>"
audible_feedback = span_warning("[audible_feedback]")
else
audible_feedback = "<span class='warning'>You hear a faint electrical spark.</span>"
audible_feedback = span_warning("You hear a faint electrical spark.")
broken = 1
locked = 0
@@ -36,7 +36,7 @@ MRE Stuff
/obj/item/storage/mre/open(mob/user)
if(!opened)
to_chat(usr, "<span class='notice'>You tear open the bag, breaking the vacuum seal.</span>")
to_chat(usr, span_notice("You tear open the bag, breaking the vacuum seal."))
opened = 1
update_icon()
. = ..()
@@ -236,7 +236,7 @@ MRE Stuff
/obj/item/storage/mrebag/open(mob/user)
if(!opened && !isobserver(user))
to_chat(usr, "<span class='notice'>The pouch heats up as you break the vacuum seal.</span>")
to_chat(usr, span_notice("The pouch heats up as you break the vacuum seal."))
opened = 1
update_icon()
. = ..()
@@ -47,22 +47,22 @@
if (do_after(user, 20 * W.toolspeed))
src.open =! src.open
playsound(src, W.usesound, 50, 1)
user.show_message(text("<span class='notice'>You [] the service panel.</span>", (src.open ? "open" : "close")))
user.show_message(span_notice("You [src.open ? "open" : "close"] the service panel."))
return
if (istype(W, /obj/item/multitool) && (src.open == 1)&& (!src.l_hacking))
user.show_message("<span class='notice'>Now attempting to reset internal memory, please hold.</span>", 1)
user.show_message(span_notice("Now attempting to reset internal memory, please hold."), 1)
src.l_hacking = 1
if (do_after(usr, 100))
if (prob(40))
src.l_setshort = 1
src.l_set = 0
src.code = ""
user.show_message("<span class='notice'>Internal memory reset. Please give it a few seconds to reinitialize.</span>", 1)
user.show_message(span_notice("Internal memory reset. Please give it a few seconds to reinitialize."), 1)
sleep(80)
src.l_setshort = 0
src.l_hacking = 0
else
user.show_message("<span class='warning'>Unable to reset internal memory.</span>", 1)
user.show_message(span_warning("Unable to reset internal memory."), 1)
src.l_hacking = 0
else src.l_hacking = 0
return
@@ -82,7 +82,7 @@
/obj/item/storage/secure/AltClick(mob/user as mob)
if (isliving(user) && Adjacent(user) && (src.locked == 1))
to_chat(user, "<span class='warning'>[src] is locked and cannot be opened!</span>")
to_chat(user, span_warning("[src] is locked and cannot be opened!"))
else if (isliving(user) && Adjacent(user) && (!src.locked))
src.open(usr)
else
@@ -170,7 +170,7 @@
/obj/item/storage/secure/briefcase/attack_hand(mob/user as mob)
if ((src.loc == user) && (src.locked == 1))
to_chat(user, "<span class='warning'>[src] is locked and cannot be opened!</span>")
to_chat(user, span_warning("[src] is locked and cannot be opened!"))
else if ((src.loc == user) && (!src.locked))
src.open(usr)
else
@@ -443,24 +443,24 @@
return 0 //Means the item is already in the storage item
if(storage_slots != null && contents.len >= storage_slots)
if(!stop_messages)
to_chat(usr, "<span class='notice'>[src] is full, make some space.</span>")
to_chat(usr, span_notice("[src] is full, make some space."))
return 0 //Storage item is full
if(LAZYLEN(can_hold) && !is_type_in_list(W, can_hold))
if(!stop_messages)
if (istype(W, /obj/item/hand_labeler))
return 0
to_chat(usr, "<span class='notice'>[src] cannot hold [W].</span>")
to_chat(usr, span_notice("[src] cannot hold [W]."))
return 0
if(LAZYLEN(cant_hold) && is_type_in_list(W, cant_hold))
if(!stop_messages)
to_chat(usr, "<span class='notice'>[src] cannot hold [W].</span>")
to_chat(usr, span_notice("[src] cannot hold [W]."))
return 0
if (max_w_class != null && W.w_class > max_w_class)
if(!stop_messages)
to_chat(usr, "<span class='notice'>[W] is too long for \the [src].</span>")
to_chat(usr, span_notice("[W] is too long for \the [src]."))
return 0
var/total_storage_space = W.get_storage_cost()
@@ -469,12 +469,12 @@
if(total_storage_space > max_storage_space)
if(!stop_messages)
to_chat(usr, "<span class='notice'>[src] is too full, make some space.</span>")
to_chat(usr, span_notice("[src] is too full, make some space."))
return 0
if(W.w_class >= src.w_class && (istype(W, /obj/item/storage)))
if(!stop_messages)
to_chat(usr, "<span class='notice'>[src] cannot hold [W] as it's a storage item of the same size.</span>")
to_chat(usr, span_notice("[src] cannot hold [W] as it's a storage item of the same size."))
return 0 //To prevent the stacking of same sized storage items.
return 1
@@ -501,11 +501,11 @@
if(!prevent_warning)
for(var/mob/M in viewers(usr, null))
if (M == usr)
to_chat(usr, "<span class='notice'>You put \the [W] into [src].</span>")
to_chat(usr, span_notice("You put \the [W] into [src]."))
else if (M in range(1)) //If someone is standing close enough, they can tell what it is...
M.show_message("<span class='notice'>\The [usr] puts [W] into [src].</span>")
M.show_message(span_notice("\The [usr] puts [W] into [src]."))
else if (W && W.w_class >= 3) //Otherwise they can only see large or normal items from a distance...
M.show_message("<span class='notice'>\The [usr] puts [W] into [src].</span>")
M.show_message(span_notice("\The [usr] puts [W] into [src]."))
src.orient2hud(usr)
if(usr.s_active)
@@ -592,14 +592,14 @@
var/obj/item/tray/T = W
if(T.calc_carry() > 0)
if(prob(85))
to_chat(user, "<span class='warning'>The tray won't fit in [src].</span>")
to_chat(user, span_warning("The tray won't fit in [src]."))
return
else
W.forceMove(get_turf(user))
if ((user.client && user.s_active != src))
user.client.screen -= W
W.dropped(user)
to_chat(user, "<span class='warning'>God damn it!</span>")
to_chat(user, span_warning("God damn it!"))
W.add_fingerprint(user)
return handle_item_insertion(W)
@@ -644,11 +644,11 @@
success = 1
handle_item_insertion(I, 1) //The 1 stops the "You put the [src] into [S]" insertion message from being displayed.
if(success && !failure)
to_chat(user, "<span class='notice'>You put everything in [src].</span>")
to_chat(user, span_notice("You put everything in [src]."))
else if(success)
to_chat(user, "<span class='notice'>You put some things in [src].</span>")
to_chat(user, span_notice("You put some things in [src]."))
else
to_chat(user, "<span class='notice'>You fail to pick anything up with \the [src].</span>")
to_chat(user, span_notice("You fail to pick anything up with \the [src]."))
/obj/item/storage/verb/toggle_gathering_mode()
set name = "Switch Gathering Method"
@@ -828,7 +828,7 @@
. = ..()
if(open && contents.len)
var/display_item = contents[1]
. += "<span class='notice'>\The [src] contains \the [display_item]!</span>"
. += span_notice("\The [src] contains \the [display_item]!")
/obj/item/storage/AllowDrop()
return TRUE
@@ -897,5 +897,5 @@
// Scoop and insert target into storage
var/obj/item/holder/H = new user.holder_type(get_turf(user), user)
src.handle_item_insertion(H, 1)
to_chat(user, "<span class='notice'>You climb into \the [src].</span>")
to_chat(user, span_notice("You climb into \the [src]."))
return ..()