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
+48 -48
View File
@@ -47,12 +47,12 @@
if(istype(W, /obj/item/stack/material/plastic))
var/obj/item/stack/material/plastic/P = W
if (P.get_amount() < 8)
to_chat(user, "<span class='warning'>You need eight sheets of plastic to add tires to \the [src].</span>")
to_chat(user, span_warning("You need eight sheets of plastic to add tires to \the [src]."))
return
to_chat(user, "<span class='notice'>You start to add tires to [src].</span>")
to_chat(user, span_notice("You start to add tires to [src]."))
if(do_after(user, 40) && build_stage == 0)
if(P.use(8))
to_chat(user, "<span class='notice'>You add tires to \the [src].</span>")
to_chat(user, span_notice("You add tires to \the [src]."))
increase_step("wheeled [initial(name)]")
return
@@ -60,7 +60,7 @@
if(istype(W, /obj/item/stock_parts/console_screen))
user.drop_item()
qdel(W)
to_chat(user, "<span class='notice'>You add the lights to \the [src].</span>")
to_chat(user, span_notice("You add the lights to \the [src]."))
increase_step()
return
@@ -68,19 +68,19 @@
if(istype(W, /obj/item/stock_parts/spring))
user.drop_item()
qdel(W)
to_chat(user, "<span class='notice'>You add the control system to \the [src].</span>")
to_chat(user, span_notice("You add the control system to \the [src]."))
increase_step()
return
if(istype(W, /obj/item/stack/material/steel))
var/obj/item/stack/material/steel/S = W
if(S.get_amount() < 5)
to_chat(user, "<span class='warning'>You need five sheets of steel to convert \the [src] into a trailer.</span>")
to_chat(user, span_warning("You need five sheets of steel to convert \the [src] into a trailer."))
if(do_after(user, 80) && build_stage == 2)
if(S.use(5))
var/obj/item/vehicle_assembly/quadtrailer/Trailer = new(src)
Trailer.forceMove(get_turf(src))
Trailer.increase_step("framed [initial(Trailer.name)]")
to_chat(user, "<span class='notice'>You convert \the [src] into \the [Trailer].</span>")
to_chat(user, span_notice("You convert \the [src] into \the [Trailer]."))
user.drop_from_inventory(src)
qdel(src)
return
@@ -89,12 +89,12 @@
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if (C.get_amount() < 2)
to_chat(user, "<span class='warning'>You need two coils of wire to wire [src].</span>")
to_chat(user, span_warning("You need two coils of wire to wire [src]."))
return
to_chat(user, "<span class='notice'>You start to wire [src].</span>")
to_chat(user, span_notice("You start to wire [src]."))
if(do_after(user, 40) && build_stage == 3)
if(C.use(2))
to_chat(user, "<span class='notice'>You wire \the [src].</span>")
to_chat(user, span_notice("You wire \the [src]."))
increase_step("wired [initial(name)]")
return
@@ -103,7 +103,7 @@
user.drop_item()
W.forceMove(src)
cell = W
to_chat(user, "<span class='notice'>You add the power supply to \the [src].</span>")
to_chat(user, span_notice("You add the power supply to \the [src]."))
increase_step("powered [initial(name)]")
return
@@ -111,7 +111,7 @@
if(istype(W, /obj/item/stock_parts/motor))
user.drop_item()
qdel(W)
to_chat(user, "<span class='notice'>You add the motor to \the [src].</span>")
to_chat(user, span_notice("You add the motor to \the [src]."))
increase_step()
return
@@ -119,23 +119,23 @@
if(istype(W, /obj/item/stack/material/plasteel))
var/obj/item/stack/material/plasteel/PL = W
if (PL.get_amount() < 2)
to_chat(user, "<span class='warning'>You need two sheets of plasteel to add reinforcement to \the [src].</span>")
to_chat(user, span_warning("You need two sheets of plasteel to add reinforcement to \the [src]."))
return
to_chat(user, "<span class='notice'>You start to add reinforcement to [src].</span>")
to_chat(user, span_notice("You start to add reinforcement to [src]."))
if(do_after(user, 40) && build_stage == 6)
if(PL.use(2))
to_chat(user, "<span class='notice'>You add reinforcement to \the [src].</span>")
to_chat(user, span_notice("You add reinforcement to \the [src]."))
increase_step("reinforced [initial(name)]")
return
if(7)
if(W.has_tool_quality(TOOL_WRENCH) || W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin your finishing touches on \the [src].</span>")
to_chat(user, span_notice("You begin your finishing touches on \the [src]."))
if(do_after(user, 20) && build_stage == 7)
playsound(src, W.usesound, 30, 1)
var/obj/vehicle/train/engine/quadbike/built/product = new(src)
to_chat(user, "<span class='notice'>You finish \the [product]</span>")
to_chat(user, span_notice("You finish \the [product]"))
product.loc = get_turf(src)
product.cell = cell
cell.forceMove(product)
@@ -159,7 +159,7 @@
if(istype(W, /obj/item/vehicle_assembly/quadbike))
var/obj/item/vehicle_assembly/quadbike/Q = W
if(Q.build_stage > 2)
to_chat(user, "<span class='notice'>\The [Q] is too advanced to be of use with \the [src]</span>")
to_chat(user, span_notice("\The [Q] is too advanced to be of use with \the [src]"))
return
user.drop_item()
qdel(W)
@@ -169,19 +169,19 @@
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if (C.get_amount() < 2)
to_chat(user, "<span class='warning'>You need two coils of wire to wire [src].</span>")
to_chat(user, span_warning("You need two coils of wire to wire [src]."))
return
to_chat(user, "<span class='notice'>You start to wire [src].</span>")
to_chat(user, span_notice("You start to wire [src]."))
if(do_after(user, 40) && build_stage == 1)
if(C.use(2))
to_chat(user, "<span class='notice'>You wire \the [src].</span>")
to_chat(user, span_notice("You wire \the [src]."))
increase_step("wired [initial(name)]")
return
if(2)
if(W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You close up \the [src].</span>")
to_chat(user, span_notice("You close up \the [src]."))
var/obj/vehicle/train/trolley/trailer/product = new(src)
product.loc = get_turf(src)
user.drop_from_inventory(src)
@@ -212,12 +212,12 @@
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if (C.get_amount() < 2)
to_chat(user, "<span class='warning'>You need two coils of wire to wire [src].</span>")
to_chat(user, span_warning("You need two coils of wire to wire [src]."))
return
to_chat(user, "<span class='notice'>You start to wire [src].</span>")
to_chat(user, span_notice("You start to wire [src]."))
if(do_after(user, 40) && build_stage == 1)
if(C.use(2))
to_chat(user, "<span class='notice'>You wire \the [src].</span>")
to_chat(user, span_notice("You wire \the [src]."))
increase_step("wired [initial(name)]")
return
@@ -225,12 +225,12 @@
if(istype(W, /obj/item/stack/material/plastic))
var/obj/item/stack/material/plastic/P = W
if (P.get_amount() < 3)
to_chat(user, "<span class='warning'>You need three sheets of plastic to add a seat to \the [src].</span>")
to_chat(user, span_warning("You need three sheets of plastic to add a seat to \the [src]."))
return
to_chat(user, "<span class='notice'>You start to add a seat to [src].</span>")
to_chat(user, span_notice("You start to add a seat to [src]."))
if(do_after(user, 40) && build_stage == 2)
if(P.use(3))
to_chat(user, "<span class='notice'>You add a seat to \the [src].</span>")
to_chat(user, span_notice("You add a seat to \the [src]."))
increase_step("seated [initial(name)]")
return
@@ -238,7 +238,7 @@
if(istype(W, /obj/item/stock_parts/console_screen))
user.drop_item()
qdel(W)
to_chat(user, "<span class='notice'>You add the lights to \the [src].</span>")
to_chat(user, span_notice("You add the lights to \the [src]."))
increase_step()
return
@@ -246,7 +246,7 @@
if(istype(W, /obj/item/stock_parts/spring))
user.drop_item()
qdel(W)
to_chat(user, "<span class='notice'>You add the control system to \the [src].</span>")
to_chat(user, span_notice("You add the control system to \the [src]."))
increase_step()
return
@@ -255,18 +255,18 @@
user.drop_item()
W.forceMove(src)
cell = W
to_chat(user, "<span class='notice'>You add the power supply to \the [src].</span>")
to_chat(user, span_notice("You add the power supply to \the [src]."))
increase_step("powered [initial(name)]")
return
if(6)
if(W.has_tool_quality(TOOL_WRENCH) || W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin your finishing touches on \the [src].</span>")
to_chat(user, span_notice("You begin your finishing touches on \the [src]."))
if(do_after(user, 20) && build_stage == 6)
playsound(src, W.usesound, 30, 1)
var/obj/vehicle/bike/built/product = new(src)
to_chat(user, "<span class='notice'>You finish \the [product]</span>")
to_chat(user, span_notice("You finish \the [product]"))
product.loc = get_turf(src)
product.cell = cell
cell.forceMove(product)
@@ -291,12 +291,12 @@
if(istype(W, /obj/item/stack/material/steel))
var/obj/item/stack/material/steel/S = W
if (S.get_amount() < 6)
to_chat(user, "<span class='warning'>You need six sheets of steel to add treads to \the [src].</span>")
to_chat(user, span_warning("You need six sheets of steel to add treads to \the [src]."))
return
to_chat(user, "<span class='notice'>You start to add treads to [src].</span>")
to_chat(user, span_notice("You start to add treads to [src]."))
if(do_after(user, 40) && build_stage == 0)
if(S.use(6))
to_chat(user, "<span class='notice'>You add treads to \the [src].</span>")
to_chat(user, span_notice("You add treads to \the [src]."))
increase_step("tracked [initial(name)]")
return
@@ -304,7 +304,7 @@
if(istype(W, /obj/item/stock_parts/console_screen))
user.drop_item()
qdel(W)
to_chat(user, "<span class='notice'>You add the lights to \the [src].</span>")
to_chat(user, span_notice("You add the lights to \the [src]."))
increase_step()
return
@@ -312,7 +312,7 @@
if(istype(W, /obj/item/stock_parts/spring))
user.drop_item()
qdel(W)
to_chat(user, "<span class='notice'>You add the control system to \the [src].</span>")
to_chat(user, span_notice("You add the control system to \the [src]."))
increase_step()
return
@@ -320,12 +320,12 @@
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if (C.get_amount() < 2)
to_chat(user, "<span class='warning'>You need two coils of wire to wire [src].</span>")
to_chat(user, span_warning("You need two coils of wire to wire [src]."))
return
to_chat(user, "<span class='notice'>You start to wire [src].</span>")
to_chat(user, span_notice("You start to wire [src]."))
if(do_after(user, 40) && build_stage == 3)
if(C.use(2))
to_chat(user, "<span class='notice'>You wire \the [src].</span>")
to_chat(user, span_notice("You wire \the [src]."))
increase_step("wired [initial(name)]")
return
@@ -334,7 +334,7 @@
user.drop_item()
W.forceMove(src)
cell = W
to_chat(user, "<span class='notice'>You add the power supply to \the [src].</span>")
to_chat(user, span_notice("You add the power supply to \the [src]."))
increase_step("powered [initial(name)]")
return
@@ -342,7 +342,7 @@
if(istype(W, /obj/item/stock_parts/motor))
user.drop_item()
qdel(W)
to_chat(user, "<span class='notice'>You add the motor to \the [src].</span>")
to_chat(user, span_notice("You add the motor to \the [src]."))
increase_step()
return
@@ -350,23 +350,23 @@
if(istype(W, /obj/item/stack/material/plasteel))
var/obj/item/stack/material/plasteel/PL = W
if (PL.get_amount() < 2)
to_chat(user, "<span class='warning'>You need two sheets of plasteel to add reinforcement to \the [src].</span>")
to_chat(user, span_warning("You need two sheets of plasteel to add reinforcement to \the [src]."))
return
to_chat(user, "<span class='notice'>You start to add reinforcement to [src].</span>")
to_chat(user, span_notice("You start to add reinforcement to [src]."))
if(do_after(user, 40) && build_stage == 6)
if(PL.use(2))
to_chat(user, "<span class='notice'>You add reinforcement to \the [src].</span>")
to_chat(user, span_notice("You add reinforcement to \the [src]."))
increase_step("reinforced [initial(name)]")
return
if(7)
if(W.has_tool_quality(TOOL_WRENCH) || W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin your finishing touches on \the [src].</span>")
to_chat(user, span_notice("You begin your finishing touches on \the [src]."))
if(do_after(user, 20) && build_stage == 7)
playsound(src, W.usesound, 30, 1)
var/obj/vehicle/train/engine/quadbike/snowmobile/built/product = new(src)
to_chat(user, "<span class='notice'>You finish \the [product]</span>")
to_chat(user, span_notice("You finish \the [product]"))
product.loc = get_turf(src)
product.cell = cell
cell.forceMove(product)