mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Add omni devices to dispenser
- Added omni filters and mixers to pipe dispenser - Added construction code - A couple more cosmetic tweaks
This commit is contained in:
@@ -2,15 +2,10 @@
|
|||||||
// Gas filter - omni variant
|
// Gas filter - omni variant
|
||||||
//--------------------------------------------
|
//--------------------------------------------
|
||||||
/obj/machinery/atmospherics/omni/filter
|
/obj/machinery/atmospherics/omni/filter
|
||||||
name = "Omni gas filter"
|
name = "omni gas filter"
|
||||||
icon = 'icons/obj/atmospherics/omni_devices.dmi'
|
icon = 'icons/obj/atmospherics/omni_devices.dmi'
|
||||||
icon_state = ""
|
icon_state = ""
|
||||||
|
|
||||||
tag_north = ATM_OUTPUT
|
|
||||||
tag_south = ATM_INPUT
|
|
||||||
tag_east = ATM_O2
|
|
||||||
tag_west = ATM_N2
|
|
||||||
|
|
||||||
var/list/filters = new()
|
var/list/filters = new()
|
||||||
var/datum/omni_port/input
|
var/datum/omni_port/input
|
||||||
var/datum/omni_port/output
|
var/datum/omni_port/output
|
||||||
@@ -128,7 +123,7 @@
|
|||||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||||
|
|
||||||
if (!ui)
|
if (!ui)
|
||||||
ui = new(user, src, ui_key, "omni_filter.tmpl", name, 330, 330)
|
ui = new(user, src, ui_key, "omni_filter.tmpl", "Omni Filter Control", 330, 330)
|
||||||
ui.set_initial_data(data)
|
ui.set_initial_data(data)
|
||||||
|
|
||||||
ui.open()
|
ui.open()
|
||||||
|
|||||||
@@ -2,14 +2,9 @@
|
|||||||
// Gas mixer - omni variant
|
// Gas mixer - omni variant
|
||||||
//--------------------------------------------
|
//--------------------------------------------
|
||||||
/obj/machinery/atmospherics/omni/mixer
|
/obj/machinery/atmospherics/omni/mixer
|
||||||
name = "Omni gas mixer"
|
name = "omni gas mixer"
|
||||||
icon = 'icons/obj/atmospherics/omni_devices.dmi'
|
icon = 'icons/obj/atmospherics/omni_devices.dmi'
|
||||||
|
|
||||||
tag_north = ATM_OUTPUT
|
|
||||||
tag_south = ATM_INPUT
|
|
||||||
tag_east = ATM_INPUT
|
|
||||||
tag_west = ATM_INPUT
|
|
||||||
|
|
||||||
var/list/inputs = new()
|
var/list/inputs = new()
|
||||||
var/datum/omni_port/output
|
var/datum/omni_port/output
|
||||||
|
|
||||||
@@ -112,7 +107,7 @@
|
|||||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||||
|
|
||||||
if (!ui)
|
if (!ui)
|
||||||
ui = new(user, src, ui_key, "omni_mixer.tmpl", name, 360, 330)
|
ui = new(user, src, ui_key, "omni_mixer.tmpl", "Omni Mixer Control", 360, 330)
|
||||||
ui.set_initial_data(data)
|
ui.set_initial_data(data)
|
||||||
|
|
||||||
ui.open()
|
ui.open()
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
// Base omni device
|
// Base omni device
|
||||||
//--------------------------------------------
|
//--------------------------------------------
|
||||||
/obj/machinery/atmospherics/omni
|
/obj/machinery/atmospherics/omni
|
||||||
|
name = "omni device"
|
||||||
icon_state = ""
|
icon_state = ""
|
||||||
dir = SOUTH
|
dir = SOUTH
|
||||||
use_power = 1
|
use_power = 1
|
||||||
@@ -81,23 +82,14 @@
|
|||||||
|
|
||||||
if(!istype(W, /obj/item/weapon/wrench))
|
if(!istype(W, /obj/item/weapon/wrench))
|
||||||
return ..()
|
return ..()
|
||||||
var/turf/T = src.loc
|
|
||||||
if(level==1 && isturf(T) && T.intact)
|
|
||||||
user << "\red You must remove the plating first."
|
|
||||||
return 1
|
|
||||||
var/datum/gas_mixture/int_air = return_air()
|
|
||||||
var/datum/gas_mixture/env_air = loc.return_air()
|
|
||||||
if((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
|
|
||||||
user << "\red You cannot unwrench this [src], it too exerted due to internal pressure."
|
|
||||||
add_fingerprint(user)
|
|
||||||
return 1
|
|
||||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
|
||||||
user << "\blue You begin to unfasten \the [src]..."
|
user << "\blue You begin to unfasten \the [src]..."
|
||||||
|
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||||
if(do_after(user, 40))
|
if(do_after(user, 40))
|
||||||
user.visible_message( \
|
user.visible_message( \
|
||||||
"[user] unfastens \the [src].", \
|
"[user] unfastens \the [src].", \
|
||||||
"\blue You have unfastened \the [src].", \
|
"\blue You have unfastened \the [src].", \
|
||||||
"You hear ratchet.")
|
"You hear a ratchet.")
|
||||||
new /obj/item/pipe(loc, make_from=src)
|
new /obj/item/pipe(loc, make_from=src)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ Buildable meters
|
|||||||
#define PIPE_GAS_FILTER_M 23
|
#define PIPE_GAS_FILTER_M 23
|
||||||
#define PIPE_GAS_MIXER_T 24
|
#define PIPE_GAS_MIXER_T 24
|
||||||
#define PIPE_GAS_MIXER_M 25
|
#define PIPE_GAS_MIXER_M 25
|
||||||
|
#define PIPE_OMNI_MIXER 26
|
||||||
|
#define PIPE_OMNI_FILTER 27
|
||||||
|
|
||||||
/obj/item/pipe
|
/obj/item/pipe
|
||||||
name = "pipe"
|
name = "pipe"
|
||||||
@@ -98,6 +100,10 @@ Buildable meters
|
|||||||
src.pipe_type = PIPE_MANIFOLD4W
|
src.pipe_type = PIPE_MANIFOLD4W
|
||||||
else if(istype(make_from, /obj/machinery/atmospherics/pipe/cap))
|
else if(istype(make_from, /obj/machinery/atmospherics/pipe/cap))
|
||||||
src.pipe_type = PIPE_CAP
|
src.pipe_type = PIPE_CAP
|
||||||
|
else if(istype(make_from, /obj/machinery/atmospherics/omni/mixer))
|
||||||
|
src.pipe_type = PIPE_OMNI_MIXER
|
||||||
|
else if(istype(make_from, /obj/machinery/atmospherics/omni/filter))
|
||||||
|
src.pipe_type = PIPE_OMNI_FILTER
|
||||||
///// Z-Level stuff
|
///// Z-Level stuff
|
||||||
else if(istype(make_from, /obj/machinery/atmospherics/pipe/zpipe/up))
|
else if(istype(make_from, /obj/machinery/atmospherics/pipe/zpipe/up))
|
||||||
src.pipe_type = PIPE_UP
|
src.pipe_type = PIPE_UP
|
||||||
@@ -144,6 +150,8 @@ Buildable meters
|
|||||||
"gas filter m", \
|
"gas filter m", \
|
||||||
"gas mixer t", \
|
"gas mixer t", \
|
||||||
"gas mixer m", \
|
"gas mixer m", \
|
||||||
|
"omni mixer", \
|
||||||
|
"omni filter"
|
||||||
)
|
)
|
||||||
name = nlist[pipe_type+1] + " fitting"
|
name = nlist[pipe_type+1] + " fitting"
|
||||||
var/list/islist = list( \
|
var/list/islist = list( \
|
||||||
@@ -175,6 +183,8 @@ Buildable meters
|
|||||||
"m_filter", \
|
"m_filter", \
|
||||||
"t_mixer", \
|
"t_mixer", \
|
||||||
"m_mixer", \
|
"m_mixer", \
|
||||||
|
"omni_mixer", \
|
||||||
|
"omni_filter"
|
||||||
)
|
)
|
||||||
icon_state = islist[pipe_type + 1]
|
icon_state = islist[pipe_type + 1]
|
||||||
|
|
||||||
@@ -239,7 +249,7 @@ Buildable meters
|
|||||||
return dir //dir|acw
|
return dir //dir|acw
|
||||||
if(PIPE_CONNECTOR,PIPE_UVENT,PIPE_SCRUBBER,PIPE_HEAT_EXCHANGE)
|
if(PIPE_CONNECTOR,PIPE_UVENT,PIPE_SCRUBBER,PIPE_HEAT_EXCHANGE)
|
||||||
return dir
|
return dir
|
||||||
if(PIPE_MANIFOLD4W)
|
if(PIPE_MANIFOLD4W, PIPE_OMNI_MIXER, PIPE_OMNI_FILTER)
|
||||||
return dir|flip|cw|acw
|
return dir|flip|cw|acw
|
||||||
if(PIPE_MANIFOLD)
|
if(PIPE_MANIFOLD)
|
||||||
return flip|cw|acw
|
return flip|cw|acw
|
||||||
@@ -304,7 +314,7 @@ Buildable meters
|
|||||||
dir = 1
|
dir = 1
|
||||||
else if(dir==8)
|
else if(dir==8)
|
||||||
dir = 4
|
dir = 4
|
||||||
else if (pipe_type == PIPE_MANIFOLD4W)
|
else if (pipe_type in list(PIPE_MANIFOLD4W, PIPE_OMNI_MIXER, PIPE_OMNI_FILTER))
|
||||||
dir = 2
|
dir = 2
|
||||||
var/pipe_dir = get_pipe_dir()
|
var/pipe_dir = get_pipe_dir()
|
||||||
|
|
||||||
@@ -732,6 +742,18 @@ Buildable meters
|
|||||||
P.node2.initialize()
|
P.node2.initialize()
|
||||||
P.node2.build_network()
|
P.node2.build_network()
|
||||||
///// Z-Level stuff
|
///// Z-Level stuff
|
||||||
|
if(PIPE_OMNI_MIXER)
|
||||||
|
var/obj/machinery/atmospherics/omni/mixer/P = new(loc)
|
||||||
|
var/turf/T = P.loc
|
||||||
|
P.level = T.intact ? 2 : 1
|
||||||
|
P.initialize()
|
||||||
|
P.build_network()
|
||||||
|
if(PIPE_OMNI_FILTER)
|
||||||
|
var/obj/machinery/atmospherics/omni/filter/P = new(loc)
|
||||||
|
var/turf/T = P.loc
|
||||||
|
P.level = T.intact ? 2 : 1
|
||||||
|
P.initialize()
|
||||||
|
P.build_network()
|
||||||
|
|
||||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||||
user.visible_message( \
|
user.visible_message( \
|
||||||
|
|||||||
@@ -38,6 +38,8 @@
|
|||||||
<A href='?src=\ref[src];make=14;dir=1'>Gas Mixer</A><BR>
|
<A href='?src=\ref[src];make=14;dir=1'>Gas Mixer</A><BR>
|
||||||
<A href='?src=\ref[src];make=25;dir=1'>Gas Mixer-Mirrored</A><BR>
|
<A href='?src=\ref[src];make=25;dir=1'>Gas Mixer-Mirrored</A><BR>
|
||||||
<A href='?src=\ref[src];make=24;dir=1'>Gas Mixer-T</A><BR>
|
<A href='?src=\ref[src];make=24;dir=1'>Gas Mixer-T</A><BR>
|
||||||
|
<A href='?src=\ref[src];make=26;dir=1'>Omni Gas Mixer</A><BR>
|
||||||
|
<A href='?src=\ref[src];make=27;dir=1'>Omni Gas Filter</A><BR>
|
||||||
<b>Heat exchange:</b><BR>
|
<b>Heat exchange:</b><BR>
|
||||||
<A href='?src=\ref[src];make=2;dir=1'>Pipe</A><BR>
|
<A href='?src=\ref[src];make=2;dir=1'>Pipe</A><BR>
|
||||||
<A href='?src=\ref[src];make=3;dir=5'>Bent Pipe</A><BR>
|
<A href='?src=\ref[src];make=3;dir=5'>Bent Pipe</A><BR>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Reference in New Issue
Block a user