diff --git a/aurorastation.dme b/aurorastation.dme
index 1539b5feff6..29ba256c51d 100644
--- a/aurorastation.dme
+++ b/aurorastation.dme
@@ -812,7 +812,6 @@
#include "code\game\machinery\embedded_controller\simple_docking_controller.dm"
#include "code\game\machinery\pipe\construction.dm"
#include "code\game\machinery\pipe\pipe_dispenser.dm"
-#include "code\game\machinery\pipe\pipelayer.dm"
#include "code\game\machinery\telecomms\broadcaster.dm"
#include "code\game\machinery\telecomms\logbrowser.dm"
#include "code\game\machinery\telecomms\machine_interactions.dm"
diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm
index 5016f871fa6..000854da6be 100644
--- a/code/game/machinery/CableLayer.dm
+++ b/code/game/machinery/CableLayer.dm
@@ -1,13 +1,12 @@
/obj/machinery/cablelayer
name = "automatic cable layer"
-
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "pipe_d"
- density = 1
+ icon = 'icons/obj/cable_layer.dmi'
+ icon_state = "cable_layer"
+ density = TRUE
var/obj/structure/cable/last_piece
var/obj/item/stack/cable_coil/cable
var/max_cable = 100
- var/on = 0
+ var/on = FALSE
/obj/machinery/cablelayer/Initialize()
. = ..()
diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm
index 7ef07d025e9..6e465597fd7 100644
--- a/code/game/machinery/floorlayer.dm
+++ b/code/game/machinery/floorlayer.dm
@@ -1,17 +1,18 @@
/obj/machinery/floorlayer
-
name = "automatic floor layer"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "pipe_d"
- density = 1
+ desc = "A large piece of machinery used that can place, dismantle, and collect floor tiles."
+ desc_info = "Use a screwdriver to set which tile to lay, a wrench to configure the various modes, and a crowbar to take out tiles. Clicking on it with an empty hand will turn it on and off."
+ icon = 'icons/obj/floor_layer.dmi'
+ icon_state = "floor_layer"
+ density = TRUE
var/turf/old_turf
- var/on = 0
+ var/on = FALSE
var/obj/item/stack/tile/T
var/list/mode = list("dismantle"=0,"laying"=0,"collect"=0)
/obj/machinery/floorlayer/Initialize()
. = ..()
- T = new/obj/item/stack/tile/floor(src)
+ T = new /obj/item/stack/tile/floor/full(src)
/obj/machinery/floorlayer/Move(new_turf,M_Dir)
..()
@@ -26,44 +27,40 @@
if(mode["collect"])
CollectTiles(old_turf)
-
old_turf = new_turf
-/obj/machinery/floorlayer/attack_hand(mob/user as mob)
- on=!on
- user.visible_message("[user] has [!on?"de":""]activated \the [src].", "You [!on?"de":""]activate \the [src].")
- return
+/obj/machinery/floorlayer/attack_hand(mob/user)
+ on = !on
+ user.visible_message("[user] has [!on ? "de" : ""]activated \the [src].", SPAN_NOTICE("You [!on ? "de" : ""]activate \the [src]."))
-/obj/machinery/floorlayer/attackby(var/obj/item/W as obj, var/mob/user as mob)
-
- if (W.iswrench())
- var/m = input("Choose work mode", "Mode") as null|anything in mode
+/obj/machinery/floorlayer/attackby(obj/item/I, mob/user)
+ if(I.iswrench())
+ var/m = input(user, "Choose work mode", "Mode") as null|anything in mode
mode[m] = !mode[m]
var/O = mode[m]
- user.visible_message("[usr] has set \the [src] [m] mode [!O?"off":"on"].", "You set \the [src] [m] mode [!O?"off":"on"].")
+ user.visible_message("[user] has set \the [src] [m] mode [!O ? "off" : "on"].", SPAN_NOTICE("You set \the [src] [m] mode [!O ? "off":"on"]."))
return
- if(istype(W, /obj/item/stack/tile))
- to_chat(user, "\The [W] successfully loaded.")
- user.drop_item(T)
- TakeTile(T)
+ if(istype(I, /obj/item/stack/tile))
+ to_chat(user, SPAN_NOTICE("You successfully load \the [I] into \the [src]."))
+ user.drop_from_inventory(I, src)
+ TakeTile(I)
return
- if(W.iscrowbar())
+ if(I.iscrowbar())
if(!length(contents))
- to_chat(user, "\The [src] is empty.")
+ to_chat(user, SPAN_NOTICE("\The [src] is empty."))
else
- var/obj/item/stack/tile/E = input("Choose remove tile type.", "Tiles") as null|anything in contents
+ var/obj/item/stack/tile/E = input(user, "Choose which set of tiles you want to remove.", "Tiles") as null|anything in contents
if(E)
- to_chat(user, "You remove the [E] from /the [src].")
- E.forceMove(src.loc)
+ to_chat(user, SPAN_NOTICE("You remove \the [E] from \the [src]."))
+ user.put_in_hands(E)
T = null
return
- if(W.isscrewdriver())
- T = input("Choose tile type.", "Tiles") as null|anything in contents
+ if(I.isscrewdriver())
+ T = input(user, "Choose which set of tiles you want \the [src] to lay.", "Tiles") as null|anything in contents
return
- ..()
/obj/machinery/floorlayer/examine(mob/user)
..()
@@ -73,27 +70,26 @@
var/number = 0
if (T)
number = T.get_amount()
- to_chat(user, "\The [src] has [number] tile\s, dismantle is [dismantle?"on":"off"], laying is [laying?"on":"off"], collect is [collect?"on":"off"].")
+ to_chat(user, SPAN_NOTICE("\The [src] has [number] tile\s, dismantle is [dismantle ? "on" : "off"], laying is [laying ? "on" : "off"], collect is [collect ? "on" : "off"]."))
/obj/machinery/floorlayer/proc/reset()
- on=0
- return
+ on = FALSE
/obj/machinery/floorlayer/proc/dismantleFloor(var/turf/new_turf)
if(istype(new_turf, /turf/simulated/floor))
var/turf/simulated/floor/T = new_turf
if(!T.is_plating())
if(!T.broken && !T.burnt)
- new T.flooring.build_type()
+ new T.flooring.build_type(T)
T.make_plating()
return T.is_plating()
- return 0
+ return FALSE
/obj/machinery/floorlayer/proc/TakeNewStack()
for(var/obj/item/stack/tile/tile in contents)
T = tile
- return 1
- return 0
+ return TRUE
+ return FALSE
/obj/machinery/floorlayer/proc/SortStacks()
for(var/obj/item/stack/tile/tile1 in contents)
@@ -108,16 +104,17 @@
/obj/machinery/floorlayer/proc/layFloor(var/turf/w_turf)
if(!T)
if(!TakeNewStack())
- return 0
- w_turf.attackby(T , src)
- return 1
+ return FALSE
+ w_turf.attackby(T, src)
+ return TRUE
/obj/machinery/floorlayer/proc/TakeTile(var/obj/item/stack/tile/tile)
- if(!T) T = tile
+ if(!T)
+ T = tile
tile.forceMove(src)
SortStacks()
/obj/machinery/floorlayer/proc/CollectTiles(var/turf/w_turf)
for(var/obj/item/stack/tile/tile in w_turf)
- TakeTile(tile)
+ TakeTile(tile)
\ No newline at end of file
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index 9bbf5afec02..c383c43ca44 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -1,200 +1,173 @@
/obj/machinery/pipedispenser
name = "pipe dispenser"
- icon = 'icons/obj/stationobjs.dmi'
+ desc = "A large piece of machinery used to dispense pipes that transport and manipulate gasses."
desc_info = "This can be moved by using a wrench. You will need to wrench it again when you want to use it. You can put \
- excess (atmospheric) pipes into the dispenser, as well. The dispenser requires electricity to function."
- icon_state = "pipe_d"
- density = 1
- anchored = 1
- var/unwrenched = 0
- var/wait = 0
+ excess (atmospheric) pipes into the dispenser, as well. It needs electricity to function."
+ icon = 'icons/obj/pipe_dispenser.dmi'
+ icon_state = "pipe_dispenser"
+ density = TRUE
+ anchored = TRUE
-/obj/machinery/pipedispenser/attack_hand(user as mob)
+ var/window_id = "pipedispenser"
+ var/pipe_cooldown = 0
+
+/obj/machinery/pipedispenser/attack_hand(mob/user)
if(..())
return
-///// Z-Level stuff
+
var/dat = {"
-Regular pipes:
-Pipe
-Bent Pipe
-Manifold
-Manual Valve
-Pipe Cap
-4-Way Manifold
-Manual T-Valve
-Manual T-Valve - Mirrored
-Upward Pipe
-Downward Pipe
-Supply pipes:
-Pipe
-Bent Pipe
-Manifold
-Pipe Cap
-4-Way Manifold
-Upward Pipe
-Downward Pipe
-Scrubbers pipes:
-Pipe
-Bent Pipe
-Manifold
-Pipe Cap
-4-Way Manifold
-Upward Pipe
-Downward Pipe
-Devices:
-Universal pipe adapter
-Connector
-Unary Vent
-Gas Pump
-Pressure Regulator
-Scrubbers Pressure Regulator
-Supply Pressure Regulator
-High Power Gas Pump
-Scrubber
-Meter
-Gas Filter
-Gas Filter - Mirrored
-Gas Mixer
-Gas Mixer - Mirrored
-Gas Mixer - T
-Omni Gas Mixer
-Omni Gas Filter
-Heat exchange:
-Pipe
-Bent Pipe
-Junction
-Heat Exchanger
-Insulated pipes:
-Pipe
-Bent Pipe
+ Regular pipes:
+ Pipe
+ Bent Pipe
+ Manifold
+ Manual Valve
+ Pipe Cap
+ 4-Way Manifold
+ Manual T-Valve
+ Manual T-Valve - Mirrored
+ Upward Pipe
+ Downward Pipe
+ Supply pipes:
+ Pipe
+ Bent Pipe
+ Manifold
+ Pipe Cap
+ 4-Way Manifold
+ Upward Pipe
+ Downward Pipe
+ Scrubbers pipes:
+ Pipe
+ Bent Pipe
+ Manifold
+ Pipe Cap
+ 4-Way Manifold
+ Upward Pipe
+ Downward Pipe
+ Devices:
+ Universal pipe adapter
+ Connector
+ Unary Vent
+ Gas Pump
+ Pressure Regulator
+ Scrubbers Pressure Regulator
+ Supply Pressure Regulator
+ High Power Gas Pump
+ Scrubber
+ Meter
+ Gas Filter
+ Gas Filter - Mirrored
+ Gas Mixer
+ Gas Mixer - Mirrored
+ Gas Mixer - T
+ Omni Gas Mixer
+ Omni Gas Filter
+ Heat exchange:
+ Pipe
+ Bent Pipe
+ Junction
+ Heat Exchanger
+ Insulated pipes:
+ Pipe
+ Bent Pipe
+ "}
+ //What number the make points to is in the define # at the top of construction.dm in same folder
-"}
-///// Z-Level stuff
-//What number the make points to is in the define # at the top of construction.dm in same folder
-
- var/datum/browser/pipedispenser_win = new(user, "pipedispenser", capitalize_first_letters(name), 220, 500)
+ var/datum/browser/pipedispenser_win = new(user, window_id, capitalize_first_letters(name), 220, 500)
pipedispenser_win.set_content(dat)
pipedispenser_win.open()
/obj/machinery/pipedispenser/Topic(href, href_list)
if(..())
return
- if(unwrenched || !usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
- usr << browse(null, "window=pipedispenser")
- return
- usr.set_machine(src)
- src.add_fingerprint(usr)
- if(href_list["make"])
- if(!wait)
- var/p_type = text2num(href_list["make"])
- var/p_dir = text2num(href_list["dir"])
- var/obj/item/pipe/P = new (/*usr.loc*/ src.loc, pipe_type=p_type, dir=p_dir)
- P.update()
- P.add_fingerprint(usr)
- wait = 1
- spawn(10)
- wait = 0
- if(href_list["makemeter"])
- if(!wait)
- new /obj/item/pipe_meter(/*usr.loc*/ src.loc)
- wait = 1
- spawn(15)
- wait = 0
- return
-/obj/machinery/pipedispenser/attackby(var/obj/item/W as obj, var/mob/user as mob)
- if(!istype(W, /obj/item/forensics))
- src.add_fingerprint(usr)
- if (istype(W, /obj/item/pipe) || istype(W, /obj/item/pipe_meter))
- to_chat(usr, "You put [W] back to [src].")
- user.drop_from_inventory(W,get_turf(src))
- qdel(W)
+ if(!anchored || use_check_and_message(usr))
+ usr << browse(null, "window=[window_id]")
return
- else if (W.iswrench())
- if (unwrenched==0)
- playsound(src.loc, W.usesound, 50, 1)
- to_chat(user, "You begin to unfasten \the [src] from the floor...")
- if (do_after(user, 40/W.toolspeed))
- user.visible_message( \
- "[user] unfastens \the [src].", \
- "You have unfastened \the [src]. Now it can be pulled somewhere else.", \
- "You hear ratchet.")
- src.anchored = 0
- src.stat |= MAINT
- src.unwrenched = 1
- if (usr.machine==src)
- usr << browse(null, "window=pipedispenser")
- else /*if (unwrenched==1)*/
- playsound(src.loc, W.usesound, 50, 1)
- to_chat(user, "You begin to fasten \the [src] to the floor...")
- if (do_after(user, 20/W.toolspeed))
- user.visible_message( \
- "[user] fastens \the [src].", \
- "You have fastened \the [src]. Now it can dispense pipes.", \
- "You hear ratchet.")
- src.anchored = 1
- src.stat &= ~MAINT
- src.unwrenched = 0
+
+ usr.set_machine(src)
+ add_fingerprint(usr)
+
+ if(pipe_cooldown > world.time)
+ return
+
+ if(href_list["make"])
+ var/obj/item/pipe/P = new(loc, text2num(href_list["make"]), text2num(href_list["dir"]))
+ P.update()
+ P.add_fingerprint(usr)
+ pipe_cooldown = world.time + 1 SECOND
+
+ if(href_list["makemeter"])
+ new /obj/item/pipe_meter(loc)
+ pipe_cooldown = world.time + 1.5 SECONDS
+
+/obj/machinery/pipedispenser/attackby(obj/item/I, mob/user)
+ if(!istype(I, /obj/item/forensics))
+ add_fingerprint(user)
+ if(istype(I, /obj/item/pipe) || istype(I, /obj/item/pipe_meter))
+ to_chat(usr, SPAN_NOTICE("You put \the [I] back into \the [src]."))
+ qdel(I)
+ return
+ else if(I.iswrench())
+ playsound(src.loc, I.usesound, 50, 1)
+ if(!anchored)
+ to_chat(user, SPAN_NOTICE("You begin to unfasten \the [src] from the floor..."))
+ if(do_after(user, 40 / I.toolspeed))
+ user.visible_message("[user] unfastens \the [src].", SPAN_NOTICE("You have unfastened \the [src]. Now it can be pulled somewhere else."), SPAN_NOTICE("You hear ratcheting noise."))
+ anchored = FALSE
+ stat |= MAINT
+ if(usr.machine == src)
+ usr << browse(null, "window=[window_id]")
+ else
+ to_chat(user, SPAN_NOTICE("You begin to fasten \the [src] to the floor..."))
+ if(do_after(user, 20 / I.toolspeed))
+ user.visible_message("[user] fastens \the [src].", SPAN_NOTICE("You have fastened \the [src]. Now it can dispense pipes."), SPAN_NOTICE("You hear ratcheting noise."))
+ anchored = TRUE
+ stat &= ~MAINT
power_change()
else
return ..()
/obj/machinery/pipedispenser/disposal
- name = "Disposal Pipe Dispenser"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "pipe_d"
- density = 1
- anchored = 1.0
-
-/*
-//Allow you to push disposal pipes into it (for those with density 1)
-/obj/machinery/pipedispenser/disposal/Crossed(var/obj/structure/disposalconstruct/pipe as obj)
- if(istype(pipe) && !pipe.anchored)
- qdel(pipe)
-
-Nah
-*/
+ name = "disposal pipe dispenser"
+ desc = "A large piece of machinery used to dispense pipes that transport and manipulate objects."
+ desc_info = "This can be moved by using a wrench. You will need to wrench it again when you want to use it. You can put \
+ excess disposal pipes into the dispenser by dragging them onto it. It needs electricity to function."
+ icon_state = "disposal_dispenser"
+ window_id = "disposaldispenser"
//Allow you to drag-drop disposal pipes into it
-/obj/machinery/pipedispenser/disposal/MouseDrop_T(var/obj/structure/disposalconstruct/pipe as obj, mob/usr as mob)
- if(!usr.canmove || usr.stat || usr.restrained())
- return
-
- if (!istype(pipe) || get_dist(usr, src) > 1 || get_dist(src,pipe) > 1 )
- return
-
- if (pipe.anchored)
+/obj/machinery/pipedispenser/disposal/MouseDrop_T(obj/structure/disposalconstruct/pipe, mob/user)
+ if(!istype(pipe) || pipe.anchored || use_check_and_message(user))
return
qdel(pipe)
-/obj/machinery/pipedispenser/disposal/attack_hand(user as mob)
+/obj/machinery/pipedispenser/disposal/attack_hand(mob/user)
if(..())
return
-///// Z-Level stuff
var/dat = {"Disposal Pipes
-Pipe
-Bent Pipe
-Junction
-Y-Junction
-Trunk
-Bin
-Bin (Small)
-Outlet
-Chute
-Upwards
-Downwards
-Sorting
-Sorting (Wildcard)
-Sorting (Untagged)
-Tagger
-Tagger (Partial)
-"}
-///// Z-Level stuff
+ Pipe
+ Bent Pipe
+ Junction
+ Y-Junction
+ Trunk
+ Bin
+ Bin (Small)
+ Outlet
+ Chute
+ Upwards
+ Downwards
+ Sorting
+ Sorting (Wildcard)
+ Sorting (Untagged)
+ Tagger
+ Tagger (Partial)
+ "}
- user << browse("