mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +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
|
||||
//--------------------------------------------
|
||||
/obj/machinery/atmospherics/omni/filter
|
||||
name = "Omni gas filter"
|
||||
name = "omni gas filter"
|
||||
icon = 'icons/obj/atmospherics/omni_devices.dmi'
|
||||
icon_state = ""
|
||||
|
||||
tag_north = ATM_OUTPUT
|
||||
tag_south = ATM_INPUT
|
||||
tag_east = ATM_O2
|
||||
tag_west = ATM_N2
|
||||
|
||||
var/list/filters = new()
|
||||
var/datum/omni_port/input
|
||||
var/datum/omni_port/output
|
||||
@@ -128,7 +123,7 @@
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
|
||||
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.open()
|
||||
|
||||
@@ -2,14 +2,9 @@
|
||||
// Gas mixer - omni variant
|
||||
//--------------------------------------------
|
||||
/obj/machinery/atmospherics/omni/mixer
|
||||
name = "Omni gas mixer"
|
||||
name = "omni gas mixer"
|
||||
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/datum/omni_port/output
|
||||
|
||||
@@ -112,7 +107,7 @@
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
|
||||
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.open()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// Base omni device
|
||||
//--------------------------------------------
|
||||
/obj/machinery/atmospherics/omni
|
||||
name = "omni device"
|
||||
icon_state = ""
|
||||
dir = SOUTH
|
||||
use_power = 1
|
||||
@@ -81,23 +82,14 @@
|
||||
|
||||
if(!istype(W, /obj/item/weapon/wrench))
|
||||
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]..."
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 40))
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
"You hear a ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user