mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 13:05:44 +01:00
Ports use_tool proc from /tg/ (#13411)
This commit is contained in:
@@ -28,15 +28,9 @@
|
||||
|
||||
/obj/structure/banner/attackby(obj/item/W, mob/user)
|
||||
if(W.iswrench())
|
||||
switch(anchored)
|
||||
if(0)
|
||||
anchored = 1
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
user.visible_message("[user.name] secures [src.name] to the floor.", "You secure [src.name] to the floor.", "You hear a ratchet")
|
||||
if(1)
|
||||
anchored = 0
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", "You unsecure [src.name] from the floor.", "You hear a ratchet")
|
||||
anchored = !anchored
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
user.visible_message("[user.name] [anchored ? "" : "un" ]secures \the [src.name] [anchored ? "to" : "from" ] the floor.", "You [anchored ? "" : "un" ]secure \the [src.name] [anchored ? "to" : "from" ] the floor.", "You hear a ratchet.")
|
||||
return
|
||||
|
||||
/obj/structure/banner/unmovable
|
||||
@@ -128,4 +122,4 @@
|
||||
desc = "A deep blue banner adorned with the logo of the Stellar Corporate Conglomerate."
|
||||
desc_fluff = "The Stellar Corporate Conglomerate, also known as Chainlink, is a joint alliance between the NanoTrasen Corporation, Hephaestus Industries, Idris Incorporated, Zeng-Hu Pharmaceuticals and Zavodskoi Interstellar to exercise an undisputed economic dominance over the Orion Spur."
|
||||
icon_state = "scc_banner_down"
|
||||
icon_up = "scc_banner_up"
|
||||
icon_up = "scc_banner_up"
|
||||
|
||||
@@ -179,14 +179,14 @@ LINEN BINS
|
||||
/obj/item/bedsheet/attackby(obj/item/I, mob/user)
|
||||
if(I.isscrewdriver())
|
||||
user.visible_message(SPAN_NOTICE("\The [user] begins poking eyeholes in \the [src] with \the [I]."), SPAN_NOTICE("You begin poking eyeholes in \the [src] with \the [I]."))
|
||||
if(do_after(user, 50/I.toolspeed))
|
||||
if(I.use_tool(src, user, 50, volume = 50))
|
||||
to_chat(user, SPAN_NOTICE("You poke eyeholes in \the [src]!"))
|
||||
new /obj/item/bedsheet/costume(get_turf(src))
|
||||
qdel(src)
|
||||
return TRUE
|
||||
else if(is_sharp(I))
|
||||
user.visible_message(SPAN_NOTICE("\The [user] begins cutting up \the [src] with \the [I]."), SPAN_NOTICE("You begin cutting up \the [src] with \the [I]."))
|
||||
if(do_after(user, 50 / I.toolspeed))
|
||||
if(I.use_tool(src, user, 50, volume = 50))
|
||||
to_chat(user, SPAN_NOTICE("You cut \the [src] into pieces!"))
|
||||
new /obj/item/stack/material/cloth(get_turf(src), rand(2, 5))
|
||||
qdel(src)
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
playsound(loc, 'sound/items/welder_pry.ogg', 50, 1)
|
||||
if (!do_after(user, 2 SECONDS, act_target = src, extra_checks = CALLBACK(src, .proc/is_open)))
|
||||
return
|
||||
if(!WT.remove_fuel(0,user))
|
||||
if(!WT.use(0,user))
|
||||
to_chat(user, SPAN_NOTICE("You need more welding fuel to complete this task."))
|
||||
return
|
||||
else
|
||||
@@ -379,9 +379,9 @@
|
||||
"You hear a welding torch on metal."
|
||||
)
|
||||
playsound(loc, 'sound/items/welder_pry.ogg', 50, 1)
|
||||
if (!do_after(user, 2/W.toolspeed SECONDS, act_target = src, extra_checks = CALLBACK(src, .proc/is_closed)))
|
||||
if(!W.use_tool(src, user, 20, volume = 50, extra_checks = CALLBACK(src, .proc/is_closed)))
|
||||
return
|
||||
if(!WT.remove_fuel(0,user))
|
||||
if(!WT.use(0,user))
|
||||
to_chat(user, SPAN_NOTICE("You need more welding fuel to complete this task."))
|
||||
return
|
||||
welded = !welded
|
||||
|
||||
@@ -46,10 +46,9 @@
|
||||
manipulating = TRUE
|
||||
visible_message(SPAN_NOTICE("[user] begins cutting down \the [src]."),
|
||||
SPAN_NOTICE("You begin cutting down \the [src]."))
|
||||
if(!do_after(user, 30/W.toolspeed))
|
||||
if(!W.use_tool(src, user, 30, volume = 50))
|
||||
manipulating = FALSE
|
||||
return
|
||||
playsound(src.loc, 'sound/items/wirecutter.ogg', 50, 1)
|
||||
visible_message(SPAN_NOTICE("[user] cuts down \the [src]."),
|
||||
SPAN_NOTICE("You cut down \the [src]."))
|
||||
dismantle()
|
||||
|
||||
@@ -185,11 +185,11 @@
|
||||
to_chat(user, SPAN_WARNING("\The [src] isn't ready to be welded yet. It doesn't have any installed material to remove, and it has to be unsecured to deconstruct it."))
|
||||
return
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
if(WT.use(0, user))
|
||||
playsound(src.loc, 'sound/items/welder_pry.ogg', 50, 1)
|
||||
if(istext(glass))
|
||||
user.visible_message("<b>[user]</b> starts welding the [glass] plating off the airlock assembly.", SPAN_NOTICE("You start welding the [glass] plating off the airlock assembly."))
|
||||
if(do_after(user, 40 / W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("You weld the [glass] plating off."))
|
||||
@@ -198,7 +198,7 @@
|
||||
glass = FALSE
|
||||
else if(glass == TRUE)
|
||||
user.visible_message("<b>[user]</b> starts welding the glass panel out of the airlock assembly.", SPAN_NOTICE("You start welding the glass panel out of the airlock assembly."))
|
||||
if(do_after(user, 40 / W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("You weld the glass panel out."))
|
||||
@@ -206,7 +206,7 @@
|
||||
glass = FALSE
|
||||
else if(!anchored)
|
||||
user.visible_message("<b>[user]</b> starts disassembling the airlock assembly.", SPAN_NOTICE("You start disassembling the airlock assembly."))
|
||||
if(do_after(user, 40 / W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("You disassemble the airlock assembly."))
|
||||
@@ -220,8 +220,6 @@
|
||||
to_chat(user, SPAN_WARNING("You have to remove the wiring before you can use the wrench on \the [src]."))
|
||||
return
|
||||
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
|
||||
if(anchored)
|
||||
user.visible_message("<b>[user]</b> begins unsecuring the airlock assembly from the floor.", \
|
||||
SPAN_NOTICE("You start unsecuring the airlock assembly from the floor."))
|
||||
@@ -229,7 +227,7 @@
|
||||
user.visible_message("<b>[user]</b> begins securing the airlock assembly to the floor.", \
|
||||
SPAN_NOTICE("You start securing the airlock assembly to the floor."))
|
||||
|
||||
if(do_after(user, 40 / W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if(!src)
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("You [anchored? "un" : ""]secure \the [src]."))
|
||||
@@ -247,7 +245,7 @@
|
||||
to_chat(user, SPAN_WARNING("You need three lengths of coil to wire the airlock assembly."))
|
||||
return
|
||||
user.visible_message("<b>[user]</b> starts wiring the airlock assembly.", SPAN_NOTICE("You start wiring the airlock assembly."))
|
||||
if(do_after(user, 40) && state == STATE_UNWIRED && anchored)
|
||||
if(W.use_tool(src, user, 40, volume = 50) && state == STATE_UNWIRED && anchored)
|
||||
if(C.use(3))
|
||||
state = STATE_WIRED
|
||||
to_chat(user, SPAN_NOTICE("You wire the airlock."))
|
||||
@@ -263,7 +261,7 @@
|
||||
playsound(src.loc, 'sound/items/wirecutter.ogg', 100, 1)
|
||||
user.visible_message("<b>[user]</b> starts cutting the wires from the airlock assembly.", SPAN_NOTICE("You start cutting the wires from airlock assembly."))
|
||||
|
||||
if(do_after(user, 40 / W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if(!src)
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("You cut the airlock wires."))
|
||||
@@ -282,7 +280,7 @@
|
||||
playsound(src.loc, 'sound/items/screwdriver.ogg', 100, 1)
|
||||
user.visible_message("<b>[user]</b> starts installing \the [EL] into the airlock assembly.", SPAN_NOTICE("You start installing \the [EL] into the airlock assembly."))
|
||||
EL.is_installed = TRUE
|
||||
if(do_after(user, 40 / W.toolspeed) && state == STATE_WIRED)
|
||||
if(W.use_tool(src, user, 40, volume = 50) && state == STATE_WIRED)
|
||||
EL.is_installed = FALSE
|
||||
if(!src)
|
||||
return
|
||||
@@ -305,10 +303,9 @@
|
||||
state = STATE_WIRED
|
||||
return
|
||||
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("<b>[user]</b> starts removing the electronics from \the [src].", SPAN_NOTICE("You start removing the electronics from \the [src]."))
|
||||
|
||||
if(do_after(user, 40 / W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if(!src)
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("You remove \the [electronics]."))
|
||||
@@ -325,9 +322,8 @@
|
||||
if(S)
|
||||
if(S.get_amount() >= 1)
|
||||
if(material_name == "rglass")
|
||||
playsound(src.loc, /decl/sound_category/crowbar_sound, 100, 1)
|
||||
user.visible_message("<b>[user]</b> starts installing [S] into the airlock assembly.", "You start installing [S] into the airlock assembly.")
|
||||
if(do_after(user, 40) && !glass)
|
||||
if(W.use_tool(src, user, 40, volume = 50) && !glass)
|
||||
if(S.use(1))
|
||||
to_chat(user, SPAN_NOTICE("You install reinforced glass windows into the airlock assembly."))
|
||||
glass = 1
|
||||
@@ -339,7 +335,7 @@
|
||||
if(S.get_amount() >= 2)
|
||||
playsound(src.loc, /decl/sound_category/crowbar_sound, 100, 1)
|
||||
user.visible_message("<b>[user]</b> starts installing [S] into the airlock assembly.", "You start installing [S] into the airlock assembly.")
|
||||
if(do_after(user, 40) && !glass)
|
||||
if(W.use_tool(src, user, 40, volume = 50) && !glass)
|
||||
if (S.use(2))
|
||||
to_chat(user, SPAN_NOTICE("You install [SSmaterials.material_display_name(material_name)] plating into the airlock assembly."))
|
||||
glass = material_name
|
||||
@@ -349,10 +345,9 @@
|
||||
to_chat(user, SPAN_WARNING("\The [src] doesn't have any electronics installed."))
|
||||
return
|
||||
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("<b>[user]</b> starts finishing \the [src].", SPAN_NOTICE("You start finishing \the [src]."))
|
||||
|
||||
if(do_after(user, 40 / W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if(!src)
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("You finish the airlock!"))
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
if(!WT.isOn())
|
||||
to_chat(user, SPAN_WARNING("\The [WT] isn't turned on."))
|
||||
return
|
||||
if(WT.remove_fuel(0, user))
|
||||
if(WT.use(0, user))
|
||||
to_chat(user, SPAN_NOTICE("You use \the [WT] to remove \the [src]."))
|
||||
playsound(src, WT.usesound, 80, 1)
|
||||
new /obj/item/stack/material/steel(get_turf(src),rand(1,3))
|
||||
|
||||
@@ -73,16 +73,14 @@
|
||||
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(W.iswrench() && state == 0)
|
||||
if(anchored && !reinf_material)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>Now disassembling the girder...</span>")
|
||||
if(do_after(user,40/W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You dissasembled the girder!</span>")
|
||||
dismantle()
|
||||
else if(!anchored)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>Now securing the girder...</span>")
|
||||
if(do_after(user, 40/W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
to_chat(user, "<span class='notice'>You secured the girder!</span>")
|
||||
reset_girder()
|
||||
|
||||
@@ -101,7 +99,7 @@
|
||||
var/obj/item/melee/energy/WT = W
|
||||
if(WT.active)
|
||||
to_chat(user, "<span class='notice'>Now slicing apart the girder...</span>")
|
||||
if(do_after(user,30/W.toolspeed))
|
||||
if(W.use_tool(src, user, 30, volume = 50))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You slice apart the girder!</span>")
|
||||
dismantle()
|
||||
@@ -111,7 +109,7 @@
|
||||
|
||||
else if(istype(W, /obj/item/melee/energy/blade))
|
||||
to_chat(user, "<span class='notice'>Now slicing apart the girder...</span>")
|
||||
if(do_after(user,30/W.toolspeed))
|
||||
if(W.use_tool(src, user, 30, volume = 50))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You slice apart the girder!</span>")
|
||||
dismantle()
|
||||
@@ -120,7 +118,7 @@
|
||||
var/obj/item/melee/chainsword/WT = W
|
||||
if(WT.active)
|
||||
to_chat(user, "<span class='notice'>Now slicing apart the girder...</span>")
|
||||
if(do_after(user,60/W.toolspeed))
|
||||
if(WT.use_tool(src, user, 60, volume = 50))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You slice apart the girder!</span>")
|
||||
dismantle()
|
||||
@@ -142,32 +140,29 @@
|
||||
|
||||
else if(W.isscrewdriver())
|
||||
if(state == 2)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>Now unsecuring support struts...</span>")
|
||||
if(do_after(user,40/W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if(!src)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You unsecured the support struts!</span>")
|
||||
state = 1
|
||||
else if(anchored && !reinf_material)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
reinforcing = !reinforcing
|
||||
to_chat(user, "<span class='notice'>\The [src] can now be [reinforcing? "reinforced" : "constructed"]!</span>")
|
||||
return
|
||||
|
||||
else if(W.iswirecutter() && state == 1)
|
||||
playsound(src.loc, 'sound/items/wirecutter.ogg', 100, 1)
|
||||
to_chat(user, "<span class='notice'>Now removing support struts...</span>")
|
||||
if(do_after(user,40/W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You removed the support struts!</span>")
|
||||
reinf_material = null
|
||||
reset_girder()
|
||||
|
||||
else if(W.iscrowbar() && state == 0 && anchored)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>Now dislodging the girder...</span>")
|
||||
if(do_after(user, 40/W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You dislodged the girder!</span>")
|
||||
icon_state = "displaced"
|
||||
@@ -331,15 +326,14 @@
|
||||
|
||||
/obj/structure/girder/cult/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(W.iswrench())
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>Now disassembling the girder...</span>")
|
||||
if(do_after(user,40/W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
to_chat(user, "<span class='notice'>You dissasembled the girder!</span>")
|
||||
dismantle()
|
||||
|
||||
else if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
to_chat(user, "<span class='notice'>Now slicing apart the girder...</span>")
|
||||
if(do_after(user,30/W.toolspeed))
|
||||
if(W.use_tool(src, user, 30, volume = 50))
|
||||
to_chat(user, "<span class='notice'>You slice apart the girder!</span>")
|
||||
dismantle()
|
||||
|
||||
@@ -352,7 +346,7 @@
|
||||
var/obj/item/melee/energy/WT = W
|
||||
if(WT.active)
|
||||
to_chat(user, "<span class='notice'>Now slicing apart the girder...</span>")
|
||||
if(do_after(user,30/W.toolspeed))
|
||||
if(W.use_tool(src, user, 30, volume = 50))
|
||||
to_chat(user, "<span class='notice'>You slice apart the girder!</span>")
|
||||
dismantle()
|
||||
else
|
||||
@@ -361,7 +355,7 @@
|
||||
|
||||
else if(istype(W, /obj/item/melee/energy/blade))
|
||||
to_chat(user, "<span class='notice'>Now slicing apart the girder...</span>")
|
||||
if(do_after(user,30/W.toolspeed))
|
||||
if(W.use_tool(src, user, 30, volume = 50))
|
||||
to_chat(user, "<span class='notice'>You slice apart the girder!</span>")
|
||||
dismantle()
|
||||
|
||||
@@ -369,7 +363,7 @@
|
||||
var/obj/item/melee/chainsword/WT = W
|
||||
if(WT.active)
|
||||
to_chat(user, "<span class='notice'>Now slicing apart the girder...</span>")
|
||||
if(do_after(user,60/W.toolspeed))
|
||||
if(WT.use_tool(src, user, 60, volume = 50))
|
||||
to_chat(user, "<span class='notice'>You slice apart the girder!</span>")
|
||||
dismantle()
|
||||
else
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
return
|
||||
if (C.iswelder())
|
||||
var/obj/item/weldingtool/WT = C
|
||||
if(WT.remove_fuel(0, user))
|
||||
if(WT.use(0, user))
|
||||
to_chat(user, "<span class='notice'>Slicing lattice joints ...</span>")
|
||||
new /obj/item/stack/rods(src.loc)
|
||||
qdel(src)
|
||||
@@ -80,23 +80,25 @@
|
||||
layer = 2.7 // Above wires.
|
||||
|
||||
/obj/structure/lattice/catwalk/attackby(obj/item/C, mob/user)
|
||||
if (C.iswelder())
|
||||
if(C.iswelder())
|
||||
var/obj/item/weldingtool/WT = C
|
||||
if (do_after(user, 5/C.toolspeed, act_target = src) && WT.remove_fuel(1, user))
|
||||
to_chat(user, "<span class='notice'>You slice apart [src].</span>")
|
||||
playsound(src, 'sound/items/welder.ogg', 50, 1)
|
||||
if(!WT.use(1, user))
|
||||
to_chat(user, SPAN_WARNING("You need more welding fuel to complete this task."))
|
||||
return
|
||||
if(C.use_tool(src, user, 5, volume = 50))
|
||||
to_chat(user, SPAN_NOTICE("You slice apart [src]."))
|
||||
var/obj/item/stack/rods/R = new /obj/item/stack/rods(get_turf(src))
|
||||
R.amount = return_amount
|
||||
R.update_icon()
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/lattice/catwalk/indoor/attackby(obj/item/C, mob/user)
|
||||
if (C.isscrewdriver())
|
||||
anchored = !anchored
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "" : "un"]anchor [src].</span>")
|
||||
playsound(src, C.usesound, 50, 1)
|
||||
queue_smooth(src)
|
||||
queue_smooth_neighbors(src)
|
||||
if(C.isscrewdriver())
|
||||
if(C.use_tool(src, user, 5, volume = 50))
|
||||
anchored = !anchored
|
||||
to_chat(user, SPAN_NOTICE("You [anchored ? "" : "un"]anchor [src]."))
|
||||
queue_smooth(src)
|
||||
queue_smooth_neighbors(src)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -146,7 +148,7 @@
|
||||
/obj/structure/lattice/catwalk/indoor/grate/attackby(obj/item/C, mob/user)
|
||||
if(C.iswelder() && damaged)
|
||||
var/obj/item/weldingtool/WT = C
|
||||
if(do_after(user, 5/C.toolspeed, act_target = src) && WT.remove_fuel(1, user))
|
||||
if(C.use_tool(src, user, 5, volume = 50) && WT.use(1, user))
|
||||
to_chat(user, SPAN_NOTICE("You slice apart the [src] leaving nothing useful behind."))
|
||||
playsound(src, 'sound/items/welder.ogg', 50, 1)
|
||||
qdel(src)
|
||||
|
||||
@@ -414,23 +414,21 @@
|
||||
|
||||
/obj/structure/device/piano/attackby(obj/item/O as obj, mob/user as mob)
|
||||
if (O.iswrench())
|
||||
if (anchored)
|
||||
playsound(src.loc, O.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to loosen \the [src]'s casters...</span>")
|
||||
if (do_after(user, 40/O.toolspeed))
|
||||
if(anchored)
|
||||
to_chat(user, SPAN_NOTICE("You begin to loosen \the [src]'s casters..."))
|
||||
if(O.use_tool(src, user, 40, volume = 50))
|
||||
user.visible_message( \
|
||||
"[user] loosens \the [src]'s casters.", \
|
||||
"<span class='notice'>You have loosened \the [src]. Now it can be pulled somewhere else.</span>", \
|
||||
"You hear ratchet.")
|
||||
src.anchored = 0
|
||||
SPAN_NOTICE("[user] loosens \the [src]'s casters."), \
|
||||
SPAN_NOTICE("You have loosened \the [src]. Now it can be pulled somewhere else."), \
|
||||
"You hear a ratchet.")
|
||||
src.anchored = FALSE
|
||||
else
|
||||
playsound(src.loc, O.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to tighten \the [src] to the floor...</span>")
|
||||
if (do_after(user, 20/O.toolspeed))
|
||||
to_chat(user, SPAN_NOTICE("You begin to tighten \the [src] to the floor..."))
|
||||
if(O.use_tool(src, user, 20, volume = 50))
|
||||
user.visible_message( \
|
||||
"[user] tightens \the [src]'s casters.", \
|
||||
"<span class='notice'>You have tightened \the [src]'s casters. Now it can be played again</span>.", \
|
||||
"You hear ratchet.")
|
||||
src.anchored = 1
|
||||
SPAN_NOTICE("[user] tightens \the [src]'s casters."), \
|
||||
SPAN_NOTICE("You have tightened \the [src]'s casters. Now it can be played again"), \
|
||||
"You hear a ratchet.")
|
||||
src.anchored = TRUE
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/obj/structure/pit/attackby(obj/item/W, mob/user)
|
||||
if(istype(W,/obj/item/shovel))
|
||||
visible_message("<span class='notice'>\The [user] starts [open ? "filling" : "digging open"] \the [src]</span>")
|
||||
if(do_after(user, 50))
|
||||
if(W.use_tool(src, user, 50, volume = 50))
|
||||
visible_message("<span class='notice'>\The [user] [open ? "fills" : "digs open"] \the [src]!</span>")
|
||||
if(open)
|
||||
close(user)
|
||||
|
||||
@@ -58,10 +58,9 @@
|
||||
manipulating = TRUE
|
||||
visible_message(SPAN_NOTICE("[user] begins cutting down \the [src]."),
|
||||
SPAN_NOTICE("You begin cutting down \the [src]."))
|
||||
if(!do_after(user, 30/W.toolspeed))
|
||||
if(!W.use_tool(src, user, 30, volume = 50))
|
||||
manipulating = FALSE
|
||||
return
|
||||
playsound(src.loc, 'sound/items/wirecutter.ogg', 50, 1)
|
||||
visible_message(SPAN_NOTICE("[user] cuts down \the [src]."), SPAN_NOTICE("You cut down \the [src]."))
|
||||
dismantle()
|
||||
|
||||
|
||||
@@ -224,9 +224,8 @@
|
||||
// Dismantle
|
||||
if(W.iswrench())
|
||||
if(!anchored)
|
||||
playsound(get_turf(src), W.usesound, 50, TRUE)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts dismantling \the [src]..."), SPAN_NOTICE("You start dismantling \the [src]..."))
|
||||
if(do_after(user, 20, src))
|
||||
if(W.use_tool(src, user, 20, volume = 50))
|
||||
if(anchored)
|
||||
return
|
||||
user.visible_message(SPAN_NOTICE("\The [user] dismantles \the [src]."), SPAN_NOTICE("You dismantle \the [src]."))
|
||||
|
||||
@@ -241,9 +241,8 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bed/dismantle(obj/item/W, mob/user)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
user.visible_message("<b>[user]</b> begins dismantling \the [src].", SPAN_NOTICE("You begin dismantling \the [src]."))
|
||||
if(do_after(user, 20 / W.toolspeed))
|
||||
if(W.use_tool(src, user, 20, volume = 50))
|
||||
user.visible_message("\The [user] dismantles \the [src].", SPAN_NOTICE("You dismantle \the [src]."))
|
||||
if(padding_material)
|
||||
padding_material.place_sheet(get_turf(src))
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
if(I.iscrowbar())
|
||||
to_chat(user, SPAN_NOTICE("You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]."))
|
||||
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
|
||||
if(do_after(user, 30/I.toolspeed))
|
||||
if(I.use_tool(src, user, 30, volume = 0))
|
||||
user.visible_message(SPAN_NOTICE("[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!"), SPAN_NOTICE("You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!"), "You hear grinding porcelain.")
|
||||
cistern = !cistern
|
||||
update_icon()
|
||||
@@ -176,8 +176,7 @@
|
||||
if(I.iswrench())
|
||||
var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings
|
||||
to_chat(user, SPAN_NOTICE("You begin to adjust the temperature valve with \the [I]."))
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 50/I.toolspeed))
|
||||
if(I.use_tool(src, user, 50, volume = 50))
|
||||
watertemp = newtemp
|
||||
user.visible_message(SPAN_NOTICE("[user] adjusts the shower with \the [I]."), SPAN_NOTICE("You adjust the shower with \the [I]."))
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -70,13 +70,13 @@ obj/structure/windoor_assembly/Destroy()
|
||||
//I really should have spread this out across more states but thin little windoors are hard to sprite.
|
||||
switch(state)
|
||||
if("01")
|
||||
if(W.iswelder() && !anchored )
|
||||
if(W.iswelder() && !anchored)
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0,user))
|
||||
if (WT.use(0,user))
|
||||
user.visible_message("[user] dissassembles the windoor assembly.", "You start to dissassemble the windoor assembly.")
|
||||
playsound(src.loc, 'sound/items/welder_pry.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, 40/W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "<span class='notice'>You dissasembled the windoor assembly!</span>")
|
||||
new /obj/item/stack/material/glass/reinforced(get_turf(src), 5)
|
||||
@@ -89,10 +89,9 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
|
||||
if(W.iswrench() && !anchored)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor.")
|
||||
|
||||
if(do_after(user, 40/W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You've secured the windoor assembly!</span>")
|
||||
src.anchored = 1
|
||||
@@ -103,10 +102,9 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
|
||||
else if(W.iswrench() && anchored)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor.")
|
||||
|
||||
if(do_after(user, 40/W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You've unsecured the windoor assembly!</span>")
|
||||
src.anchored = 0
|
||||
@@ -123,7 +121,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start to reinforce the windoor with rods.</span>")
|
||||
|
||||
if(do_after(user,40/W.toolspeed) && !secure)
|
||||
if(W.use_tool(src, user, 40, volume = 50) && !secure)
|
||||
if (R.use(4))
|
||||
to_chat(user, "<span class='notice'>You reinforce the windoor.</span>")
|
||||
src.secure = "secure_"
|
||||
@@ -137,7 +135,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
user.visible_message("[user] wires the windoor assembly.", "You start to wire the windoor assembly.")
|
||||
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(do_after(user, 40/W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if (CC.use(1))
|
||||
to_chat(user, "<span class='notice'>You wire the windoor!</span>")
|
||||
src.state = "02"
|
||||
@@ -155,7 +153,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
playsound(src.loc, 'sound/items/wirecutter.ogg', 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
|
||||
|
||||
if(do_after(user, 40/W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if(!src) return
|
||||
|
||||
to_chat(user, "<span class='notice'>You cut the windoor wires.!</span>")
|
||||
@@ -185,10 +183,9 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
//Screwdriver to remove airlock electronics. Step 6 undone.
|
||||
else if(W.isscrewdriver() && src.electronics)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly.")
|
||||
|
||||
if(do_after(user, 40/W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
if(!src || !src.electronics) return
|
||||
to_chat(user, "<span class='notice'>You've removed the airlock electronics!</span>")
|
||||
if(src.secure)
|
||||
@@ -205,10 +202,9 @@ obj/structure/windoor_assembly/Destroy()
|
||||
to_chat(usr, "<span class='warning'>The assembly is missing electronics.</span>")
|
||||
return
|
||||
usr << browse(null, "window=windoor_access")
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame.")
|
||||
|
||||
if(do_after(user, 40/W.toolspeed))
|
||||
if(W.use_tool(src, user, 40, volume = 50))
|
||||
|
||||
if(!src) return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user