mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Change unary atmos machine construction to use constructing mob's dir
This commit is contained in:
@@ -113,7 +113,7 @@
|
|||||||
break
|
break
|
||||||
if(component_check)
|
if(component_check)
|
||||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||||
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc)
|
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, src.dir)
|
||||||
new_machine.component_parts.Cut()
|
new_machine.component_parts.Cut()
|
||||||
src.circuit.construct(new_machine)
|
src.circuit.construct(new_machine)
|
||||||
for(var/obj/O in src)
|
for(var/obj/O in src)
|
||||||
@@ -278,24 +278,9 @@ obj/item/weapon/circuitboard/rdserver
|
|||||||
|
|
||||||
/obj/item/weapon/circuitboard/unary_atmos
|
/obj/item/weapon/circuitboard/unary_atmos
|
||||||
board_type = "machine"
|
board_type = "machine"
|
||||||
var/machine_dir = SOUTH
|
|
||||||
var/init_dirs = SOUTH
|
|
||||||
|
|
||||||
/obj/item/weapon/circuitboard/unary_atmos/attackby(obj/item/I as obj, mob/user as mob)
|
|
||||||
if(istype(I,/obj/item/weapon/screwdriver))
|
|
||||||
machine_dir = turn(machine_dir, 90)
|
|
||||||
init_dirs = machine_dir
|
|
||||||
user.visible_message("\blue \The [user] adjusts the jumper on the [src]'s port configuration pins.", "\blue You adjust the jumper on the port configuration pins. Now set to [dir2text(machine_dir)].")
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/weapon/circuitboard/unary_atmos/examine(mob/user)
|
|
||||||
..(user)
|
|
||||||
user << "The jumper is connecting the [dir2text(machine_dir)] pins."
|
|
||||||
|
|
||||||
/obj/item/weapon/circuitboard/unary_atmos/construct(var/obj/machinery/atmospherics/unary/U)
|
/obj/item/weapon/circuitboard/unary_atmos/construct(var/obj/machinery/atmospherics/unary/U)
|
||||||
//TODO: Move this stuff into the relevant constructor when pipe/construction.dm is cleaned up.
|
//TODO: Move this stuff into the relevant constructor when pipe/construction.dm is cleaned up.
|
||||||
U.set_dir(src.machine_dir)
|
|
||||||
U.initialize_directions = src.init_dirs
|
|
||||||
U.initialize()
|
U.initialize()
|
||||||
U.build_network()
|
U.build_network()
|
||||||
if (U.node)
|
if (U.node)
|
||||||
|
|||||||
@@ -129,8 +129,10 @@ Class Procs:
|
|||||||
return 0
|
return 0
|
||||||
return apc.drain_power()
|
return apc.drain_power()
|
||||||
|
|
||||||
/obj/machinery/New()
|
/obj/machinery/New(l, d=0)
|
||||||
..()
|
..(l)
|
||||||
|
if(d)
|
||||||
|
set_dir(d)
|
||||||
if(!machinery_sort_required && ticker)
|
if(!machinery_sort_required && ticker)
|
||||||
dd_insertObjectList(machines, src)
|
dd_insertObjectList(machines, src)
|
||||||
else
|
else
|
||||||
@@ -335,6 +337,7 @@ Class Procs:
|
|||||||
/obj/machinery/proc/dismantle()
|
/obj/machinery/proc/dismantle()
|
||||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||||
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc)
|
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc)
|
||||||
|
M.set_dir(src.dir)
|
||||||
M.state = 2
|
M.state = 2
|
||||||
M.icon_state = "box_1"
|
M.icon_state = "box_1"
|
||||||
for(var/obj/I in component_parts)
|
for(var/obj/I in component_parts)
|
||||||
|
|||||||
Reference in New Issue
Block a user