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
@@ -238,10 +238,10 @@ var/list/name_to_material
// Placeholders for light tiles and rglass.
/datum/material/proc/build_rod_product(var/mob/user, var/obj/item/stack/used_stack, var/obj/item/stack/target_stack)
if(!rod_product)
to_chat(user, "<span class='warning'>You cannot make anything out of \the [target_stack]</span>")
to_chat(user, span_warning("You cannot make anything out of \the [target_stack]"))
return
if(used_stack.get_amount() < 1 || target_stack.get_amount() < 1)
to_chat(user, "<span class='warning'>You need one rod and one sheet of [display_name] to make anything useful.</span>")
to_chat(user, span_warning("You need one rod and one sheet of [display_name] to make anything useful."))
return
used_stack.use(1)
target_stack.use(1)
@@ -251,15 +251,15 @@ var/list/name_to_material
/datum/material/proc/build_wired_product(var/mob/living/user, var/obj/item/stack/used_stack, var/obj/item/stack/target_stack)
if(!wire_product)
to_chat(user, "<span class='warning'>You cannot make anything out of \the [target_stack]</span>")
to_chat(user, span_warning("You cannot make anything out of \the [target_stack]"))
return
if(used_stack.get_amount() < 5 || target_stack.get_amount() < 1)
to_chat(user, "<span class='warning'>You need five wires and one sheet of [display_name] to make anything useful.</span>")
to_chat(user, span_warning("You need five wires and one sheet of [display_name] to make anything useful."))
return
used_stack.use(5)
target_stack.use(1)
to_chat(user, "<span class='notice'>You attach wire to the [name].</span>")
to_chat(user, span_notice("You attach wire to the [name]."))
var/obj/item/product = new wire_product(get_turf(user))
user.put_in_hands(product)
+4 -4
View File
@@ -25,12 +25,12 @@
return 0
if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>This task is too complex for your clumsy hands.</span>")
to_chat(user, span_warning("This task is too complex for your clumsy hands."))
return 1
var/turf/T = user.loc
if(!istype(T))
to_chat(user, "<span class='warning'>You must be standing on open flooring to build a window.</span>")
to_chat(user, span_warning("You must be standing on open flooring to build a window."))
return 1
var/message = "Sheet-[used_stack.name] ([used_stack.get_amount()] sheet\s left)"
@@ -68,7 +68,7 @@
else
failed_to_build = 1
if(failed_to_build)
to_chat(user, "<span class='warning'>There is no room in this location.</span>")
to_chat(user, span_warning("There is no room in this location."))
return 1
var/build_path = /obj/structure/windoor_assembly
@@ -82,7 +82,7 @@
build_path = created_window
if(used_stack.get_amount() < sheets_needed)
to_chat(user, "<span class='warning'>You need at least [sheets_needed] sheets to build this.</span>")
to_chat(user, span_warning("You need at least [sheets_needed] sheets to build this."))
return 1
// Build the structure and update sheet count etc.
+7 -7
View File
@@ -47,14 +47,14 @@ var/global/list/datum/stack_recipe/rods_recipes = list( \
var/obj/item/weldingtool/WT = W.get_welder()
if(get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least two rods to do this.</span>")
to_chat(user, span_warning("You need at least two rods to do this."))
return
if(WT.remove_fuel(0,user))
var/obj/item/stack/material/steel/new_item = new(usr.loc)
new_item.add_to_stacks(usr)
for (var/mob/M in viewers(src))
M.show_message("<span class='notice'>[src] is shaped into metal by [user.name] with the weldingtool.</span>", 3, "<span class='notice'>You hear welding.</span>", 2)
M.show_message(span_notice("[src] is shaped into metal by [user.name] with the weldingtool."), 3, span_notice("You hear welding."), 2)
var/obj/item/stack/rods/R = src
src = null
var/replace = (user.get_inactive_hand()==R)
@@ -68,7 +68,7 @@ var/global/list/datum/stack_recipe/rods_recipes = list( \
new_splint.add_fingerprint(user)
user.visible_message("<b>\The [user]</b> constructs \a [new_splint] out of a [singular_name].", \
"<span class='notice'>You use make \a [new_splint] out of a [singular_name].</span>")
span_notice("You use make \a [new_splint] out of a [singular_name]."))
src.use(1)
return
@@ -93,17 +93,17 @@ var/global/list/datum/stack_recipe/rods_recipes = list( \
else if(!in_use)
if(get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least two rods to do this.</span>")
to_chat(user, span_warning("You need at least two rods to do this."))
return
to_chat(usr, "<span class='notice'>Assembling grille...</span>")
to_chat(usr, span_notice("Assembling grille..."))
in_use = 1
if (!do_after(usr, 10))
in_use = 0
return
var/obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc )
to_chat(usr, "<span class='notice'>You assemble a grille</span>")
to_chat(usr, span_notice("You assemble a grille"))
in_use = 0
F.add_fingerprint(usr)
use(2)
return
*/
*/
@@ -18,7 +18,7 @@
/obj/item/stack/animalhide/attackby(obj/item/W as obj, mob/user as mob)
if(has_edge(W) || is_sharp(W))
//visible message on mobs is defined as visible_message(var/message, var/self_message, var/blind_message)
user.visible_message("<b>\The [user]</b> starts cutting hair off \the [src]", "<span class='notice'>You start cutting the hair off \the [src]</span>", "You hear the sound of a knife rubbing against flesh")
user.visible_message("<b>\The [user]</b> starts cutting hair off \the [src]", span_notice("You start cutting the hair off \the [src]"), "You hear the sound of a knife rubbing against flesh")
var/scraped = 0
while(amount > 0 && do_after(user, 2.5 SECONDS, user))
//Try locating an exisitng stack on the tile and add to there if possible
@@ -51,7 +51,7 @@
var/time = (3 SECONDS / max(W.force / 10, 1)) * W.toolspeed
user.setClickCooldown(time)
if(do_after(user, time, src) && use(1))
to_chat(user, "<span class='notice'>You cut up a log into planks.</span>")
to_chat(user, span_notice("You cut up a log into planks."))
playsound(src, 'sound/effects/woodcutting.ogg', 50, 1)
var/obj/item/stack/material/wood/existing_wood = null
for(var/obj/item/stack/material/wood/M in user.loc)
@@ -61,7 +61,7 @@
var/obj/item/stack/material/wood/new_wood = new plank_type(user.loc, 2)
if(existing_wood && new_wood.transfer_to(existing_wood))
to_chat(user, "<span class='notice'>You add the newly-formed wood to the stack. It now contains [existing_wood.get_amount()] planks.</span>")
to_chat(user, span_notice("You add the newly-formed wood to the stack. It now contains [existing_wood.get_amount()] planks."))
else
return ..()
@@ -79,4 +79,4 @@
/obj/item/stack/material/stick/fivestack
amount = 5
color = "#824B28"
color = "#824B28"
+2 -2
View File
@@ -33,7 +33,7 @@
burn_user = FALSE
if(burn_user)
H.visible_message("<span class='danger'>\The [src] flashes as it scorches [H]'s hands!</span>")
H.visible_message(span_danger("\The [src] flashes as it scorches [H]'s hands!"))
H.apply_damage(amount / 2 + 5, BURN, "r_hand", used_weapon="Supermatter Chunk")
H.apply_damage(amount / 2 + 5, BURN, "l_hand", used_weapon="Supermatter Chunk")
H.drop_from_inventory(src, get_turf(H))
@@ -52,4 +52,4 @@
qdel(src)
return
SSradiation.radiate(get_turf(src), amount * 2)
..()
..()