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
+15 -15
View File
@@ -178,7 +178,7 @@
user.visible_message("[user] welds the [glass] plating off the airlock assembly.", "You start to weld the [glass] plating off the airlock assembly.")
if(do_after(user, 4 SECONDS * WT.toolspeed, src, exclusive = TASK_ALL_EXCLUSIVE))
if(!src || !WT.isOn()) return
to_chat(user, "<span class='notice'>You welded the [glass] plating off!</span>")
to_chat(user, span_notice("You welded the [glass] plating off!"))
var/M = text2path("/obj/item/stack/material/[glass]")
new M(src.loc, 2)
glass = 0
@@ -186,18 +186,18 @@
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly.")
if(do_after(user, 4 SECONDS * WT.toolspeed, src, exclusive = TASK_ALL_EXCLUSIVE))
if(!src || !WT.isOn()) return
to_chat(user, "<span class='notice'>You welded the glass panel out!</span>")
to_chat(user, span_notice("You welded the glass panel out!"))
new /obj/item/stack/material/glass/reinforced(src.loc)
glass = 0
else if(!anchored)
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
if(do_after(user, 4 SECONDS * WT.toolspeed, src, exclusive = TASK_ALL_EXCLUSIVE))
if(!src || !WT.isOn()) return
to_chat(user, "<span class='notice'>You dissasembled the airlock assembly!</span>")
to_chat(user, span_notice("You dissasembled the airlock assembly!"))
new /obj/item/stack/material/steel(src.loc, 4)
qdel (src)
else
to_chat(user, "<span class='notice'>You need more welding fuel.</span>")
to_chat(user, span_notice("You need more welding fuel."))
return
else if(W.has_tool_quality(TOOL_WRENCH) && state == 0)
@@ -209,19 +209,19 @@
if(do_after(user, 4 SECONDS * W.toolspeed, src, exclusive = TASK_ALL_EXCLUSIVE))
if(!src) return
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured the airlock assembly!</span>")
to_chat(user, span_notice("You [anchored? "un" : ""]secured the airlock assembly!"))
anchored = !anchored
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored)
var/obj/item/stack/cable_coil/C = W
if (C.get_amount() < 1)
to_chat(user, "<span class='warning'>You need one length of coil to wire the airlock assembly.</span>")
to_chat(user, span_warning("You need one length of coil to wire the airlock assembly."))
return
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
if(do_after(user, 4 SECONDS, src, exclusive = TASK_ALL_EXCLUSIVE) && state == 0 && anchored)
if (C.use(1))
src.state = 1
to_chat(user, "<span class='notice'>You wire the airlock.</span>")
to_chat(user, span_notice("You wire the airlock."))
else if(W.has_tool_quality(TOOL_WIRECUTTER) && state == 1 )
playsound(src, W.usesound, 100, 1)
@@ -229,7 +229,7 @@
if(do_after(user, 4 SECONDS * W.toolspeed, src, exclusive = TASK_ALL_EXCLUSIVE))
if(!src) return
to_chat(user, "<span class='notice'>You cut the airlock wires.!</span>")
to_chat(user, span_notice("You cut the airlock wires.!"))
new/obj/item/stack/cable_coil(src.loc, 1)
src.state = 0
@@ -241,14 +241,14 @@
if(!src) return
user.drop_item()
W.loc = src
to_chat(user, "<span class='notice'>You installed the airlock electronics!</span>")
to_chat(user, span_notice("You installed the airlock electronics!"))
src.state = 2
src.electronics = W
else if(W.has_tool_quality(TOOL_CROWBAR) && state == 2 )
//This should never happen, but just in case I guess
if (!electronics)
to_chat(user, "<span class='notice'>There was nothing to remove.</span>")
to_chat(user, span_notice("There was nothing to remove."))
src.state = 1
return
@@ -257,7 +257,7 @@
if(do_after(user, 4 SECONDS * W.toolspeed, src, exclusive = TASK_ALL_EXCLUSIVE))
if(!src) return
to_chat(user, "<span class='notice'>You removed the airlock electronics!</span>")
to_chat(user, span_notice("You removed the airlock electronics!"))
src.state = 1
electronics.loc = src.loc
electronics = null
@@ -272,7 +272,7 @@
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 4 SECONDS, src, exclusive = TASK_ALL_EXCLUSIVE) && !glass)
if (S.use(1))
to_chat(user, "<span class='notice'>You installed reinforced glass windows into the airlock assembly.</span>")
to_chat(user, span_notice("You installed reinforced glass windows into the airlock assembly."))
glass = 1
else if(material_name)
// Ugly hack, will suffice for now. Need to fix it upstream as well, may rewrite mineral walls. ~Z
@@ -284,16 +284,16 @@
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 4 SECONDS, src, exclusive = TASK_ALL_EXCLUSIVE) && !glass)
if (S.use(2))
to_chat(user, "<span class='notice'>You installed [material_display_name(material_name)] plating into the airlock assembly.</span>")
to_chat(user, span_notice("You installed [material_display_name(material_name)] plating into the airlock assembly."))
glass = material_name
else if(W.has_tool_quality(TOOL_SCREWDRIVER) && state == 2 )
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now finishing the airlock.</span>")
to_chat(user, span_notice("Now finishing the airlock."))
if(do_after(user, 4 SECONDS * W.toolspeed, src, exclusive = TASK_ALL_EXCLUSIVE))
if(!src) return
to_chat(user, "<span class='notice'>You finish the airlock!</span>")
to_chat(user, span_notice("You finish the airlock!"))
var/path
if(istext(glass))
path = text2path("/obj/machinery/door/airlock/[glass]")