mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 03:57:48 +01:00
refactors most spans
This commit is contained in:
+13
-13
@@ -114,7 +114,7 @@ var/list/possible_cable_coil_colours = list(
|
||||
/obj/structure/cable/examine(mob/user)
|
||||
. = ..()
|
||||
if(isobserver(user))
|
||||
. += "<span class='warning'>[powernet?.avail > 0 ? "[DisplayPower(powernet.avail)] in power network." : "The cable is not powered."]</span>"
|
||||
. += span_warning("[powernet?.avail > 0 ? "[DisplayPower(powernet.avail)] in power network." : "The cable is not powered."]")
|
||||
|
||||
// Rotating cables requires d1 and d2 to be rotated
|
||||
/obj/structure/cable/set_dir(new_dir)
|
||||
@@ -180,11 +180,11 @@ var/list/possible_cable_coil_colours = list(
|
||||
if(W.has_tool_quality(TOOL_WIRECUTTER))
|
||||
var/obj/item/stack/cable_coil/CC
|
||||
if(d1 == UP || d2 == UP)
|
||||
to_chat(user, "<span class='warning'>You must cut this cable from above.</span>")
|
||||
to_chat(user, span_warning("You must cut this cable from above."))
|
||||
return
|
||||
|
||||
if(breaker_box)
|
||||
to_chat(user, "<span class='warning'>This cable is connected to nearby breaker box. Use breaker box to interact with it.</span>")
|
||||
to_chat(user, span_warning("This cable is connected to nearby breaker box. Use breaker box to interact with it."))
|
||||
return
|
||||
|
||||
if (shock(user, 50))
|
||||
@@ -199,7 +199,7 @@ var/list/possible_cable_coil_colours = list(
|
||||
src.transfer_fingerprints_to(CC)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<span class='warning'>[user] cuts the cable.</span>", 1)
|
||||
O.show_message(span_warning("[user] cuts the cable."), 1)
|
||||
|
||||
if(d1 == DOWN || d2 == DOWN)
|
||||
var/turf/turf = GetBelow(src)
|
||||
@@ -224,10 +224,10 @@ var/list/possible_cable_coil_colours = list(
|
||||
else if(istype(W, /obj/item/multitool))
|
||||
|
||||
if(powernet && (powernet.avail > 0)) // is it powered?
|
||||
to_chat(user, "<span class='warning'>[DisplayPower(powernet.avail)] in power network.</span>")
|
||||
to_chat(user, span_warning("[DisplayPower(powernet.avail)] in power network."))
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The cable is not powered.</span>")
|
||||
to_chat(user, span_warning("The cable is not powered."))
|
||||
|
||||
shock(user, 5, 0.2)
|
||||
|
||||
@@ -554,11 +554,11 @@ var/list/possible_cable_coil_colours = list(
|
||||
|
||||
if(S.organ_tag == BP_HEAD)
|
||||
if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space))
|
||||
to_chat(user, "<span class='warning'>You can't apply [src] through [H.head]!</span>")
|
||||
to_chat(user, span_warning("You can't apply [src] through [H.head]!"))
|
||||
return 1
|
||||
else
|
||||
if(H.wear_suit && istype(H.wear_suit,/obj/item/clothing/suit/space))
|
||||
to_chat(user, "<span class='warning'>You can't apply [src] through [H.wear_suit]!</span>")
|
||||
to_chat(user, span_warning("You can't apply [src] through [H.wear_suit]!"))
|
||||
return 1
|
||||
|
||||
var/use_amt = min(src.amount, CEILING(S.burn_dam/5, 1), 5)
|
||||
@@ -591,7 +591,7 @@ var/list/possible_cable_coil_colours = list(
|
||||
final_color = possible_cable_coil_colours["Red"]
|
||||
selected_color = "red"
|
||||
color = final_color
|
||||
to_chat(user, "<span class='notice'>You change \the [src]'s color to [lowertext(selected_color)].</span>")
|
||||
to_chat(user, span_notice("You change \the [src]'s color to [lowertext(selected_color)]."))
|
||||
|
||||
/obj/item/stack/cable_coil/proc/update_wclass()
|
||||
if(amount == 1)
|
||||
@@ -614,14 +614,14 @@ var/list/possible_cable_coil_colours = list(
|
||||
if(ishuman(M) && !M.restrained() && !M.stat && !M.paralysis && ! M.stunned)
|
||||
if(!istype(usr.loc,/turf)) return
|
||||
if(src.amount <= 14)
|
||||
to_chat(usr, "<span class='warning'>You need at least 15 lengths to make restraints!</span>")
|
||||
to_chat(usr, span_warning("You need at least 15 lengths to make restraints!"))
|
||||
return
|
||||
var/obj/item/handcuffs/cable/B = new /obj/item/handcuffs/cable(usr.loc)
|
||||
B.color = color
|
||||
to_chat(usr, "<span class='notice'>You wind some cable together to make some restraints.</span>")
|
||||
to_chat(usr, span_notice("You wind some cable together to make some restraints."))
|
||||
src.use(15)
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You cannot do that.</span>")
|
||||
to_chat(usr, span_notice("You cannot do that."))
|
||||
|
||||
/obj/item/stack/cable_coil/cyborg/verb/set_colour()
|
||||
set name = "Change Colour"
|
||||
@@ -685,7 +685,7 @@ var/list/possible_cable_coil_colours = list(
|
||||
|
||||
for(var/obj/structure/cable/LC in F)
|
||||
if((LC.d1 == dirn && LC.d2 == end_dir ) || ( LC.d2 == dirn && LC.d1 == end_dir))
|
||||
to_chat(user, "<span class='warning'>There's already a cable at that position.</span>")
|
||||
to_chat(user, span_warning("There's already a cable at that position."))
|
||||
return
|
||||
|
||||
put_cable(F, user, end_dir, dirn)
|
||||
|
||||
Reference in New Issue
Block a user