mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
TGUI Engineering: Squashed Edition (Commits Below)
TGUI APCs TGUI vending machines Fix AI default_tgui_interaction TGUI Airlocks Station & Atmospheric Alert TGUI + Misc NTOS-TGUI Fixes TGUI Air Alarms & Central Atmospheric Control Airlock TGUI TG... got rid of UI for fire alarm. í´· TGUI Gas Heating/Cooling System TGUI Gas Pump & Passive Gate + Fixes TGUI Omni Atmospherics TGUI Pipe Dispensers & RPD TGUI IntelliCore & Vending Fix TGUI Handheld Tanks TGUI Portable Pump & Scrubber TGUI Tank Dispenser & Canisters TGUI Radios TGUI SMES & Air Alarm adjustment Tweak vending machine interfaces a tad TGUI Algae Farm TGUI general_air_control - Distro & Waste Console - Riot Control Console - Atmos Intake Console - Engine Cooling Console TGUI Heavy Scrubber Control (and body scanner fix) TGUI trinary devices & shutoff monitor TGUI Telecomms Log Browser TGUI Telecomms Machine Browser TGUI Spaceheater Internal Panel TGUI Gravity Generator TGUI Id Cards & Fix ID Card Images TGUI Id Card Redesign TGUI Turbolift TGUI Suit Cycler & Suit Storage Unit & Vending Fixes TGUI Power Monitor TGUI Signalers TGUI Employment Records TGUI Drone Console TGUI RIGSuits TGUI PA & PACMAN, and Margin Fix TGUI Solar Panels & Fix Power Monitor Adjust TGUI modules & their interaction with NTOS TGUI RCON TGUI Message Monitor Bump TGUI line limit to 120 (ParadiseSS13/Paradise#14002) TGUI Exonet & NTNet Relay TGUI Telecomms Multitool Menu TGUI Shield Capacitor & Shield Generator TGUI Supermatter-everything & Refactors
This commit is contained in:
@@ -87,23 +87,14 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/omni/atmos_filter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
var/list/data = new()
|
||||
|
||||
data = build_uidata()
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "omni_filter.tmpl", "Omni Filter Control", 330, 330)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
/obj/machinery/atmospherics/omni/atmos_filter/tgui_interact(mob/user,datum/tgui/ui = null)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "OmniFilter", name)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/atmospherics/omni/atmos_filter/proc/build_uidata()
|
||||
var/list/data = new()
|
||||
/obj/machinery/atmospherics/omni/atmos_filter/tgui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
data["power"] = use_power
|
||||
data["config"] = configuring
|
||||
@@ -156,34 +147,41 @@
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/omni/atmos_filter/Topic(href, href_list)
|
||||
if(..()) return 1
|
||||
switch(href_list["command"])
|
||||
/obj/machinery/atmospherics/omni/atmos_filter/tgui_act(action, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
switch(action)
|
||||
if("power")
|
||||
if(!configuring)
|
||||
update_use_power(!use_power)
|
||||
else
|
||||
update_use_power(USE_POWER_OFF)
|
||||
. = TRUE
|
||||
if("configure")
|
||||
configuring = !configuring
|
||||
if(configuring)
|
||||
update_use_power(USE_POWER_OFF)
|
||||
|
||||
//only allows config changes when in configuring mode ~otherwise you'll get weird pressure stuff going on
|
||||
if(configuring && !use_power)
|
||||
switch(href_list["command"])
|
||||
if("set_flow_rate")
|
||||
var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate) as num
|
||||
set_flow_rate = between(0, new_flow_rate, max_flow_rate)
|
||||
if("switch_mode")
|
||||
switch_mode(dir_flag(href_list["dir"]), mode_return_switch(href_list["mode"]))
|
||||
if("switch_filter")
|
||||
var/new_filter = input(usr,"Select filter mode:","Change filter",href_list["mode"]) in list("None", "Oxygen", "Nitrogen", "Carbon Dioxide", "Phoron", "Nitrous Oxide")
|
||||
switch_filter(dir_flag(href_list["dir"]), mode_return_switch(new_filter))
|
||||
. = TRUE
|
||||
if("set_flow_rate")
|
||||
if(!configuring || use_power)
|
||||
return
|
||||
var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate) as num
|
||||
set_flow_rate = between(0, new_flow_rate, max_flow_rate)
|
||||
. = TRUE
|
||||
if("switch_mode")
|
||||
if(!configuring || use_power)
|
||||
return
|
||||
switch_mode(dir_flag(params["dir"]), mode_return_switch(params["mode"]))
|
||||
. = TRUE
|
||||
if("switch_filter")
|
||||
if(!configuring || use_power)
|
||||
return
|
||||
var/new_filter = input(usr,"Select filter mode:","Change filter",params["mode"]) in list("None", "Oxygen", "Nitrogen", "Carbon Dioxide", "Phoron", "Nitrous Oxide")
|
||||
switch_filter(dir_flag(params["dir"]), mode_return_switch(new_filter))
|
||||
. = TRUE
|
||||
|
||||
update_icon()
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/omni/atmos_filter/proc/mode_return_switch(var/mode)
|
||||
switch(mode)
|
||||
|
||||
@@ -124,22 +124,13 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/omni/mixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
usr.set_machine(src)
|
||||
|
||||
var/list/data = new()
|
||||
|
||||
data = build_uidata()
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "omni_mixer.tmpl", "Omni Mixer Control", 360, 330)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
/obj/machinery/atmospherics/omni/mixer/tgui_interact(mob/user,datum/tgui/ui = null)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "OmniMixer", name)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/atmospherics/omni/mixer/proc/build_uidata()
|
||||
/obj/machinery/atmospherics/omni/mixer/tgui_data(mob/user)
|
||||
var/list/data = new()
|
||||
|
||||
data["power"] = use_power
|
||||
@@ -172,36 +163,45 @@
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/atmospherics/omni/mixer/Topic(href, href_list)
|
||||
if(..()) return 1
|
||||
/obj/machinery/atmospherics/omni/mixer/tgui_act(action, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
switch(href_list["command"])
|
||||
switch(action)
|
||||
if("power")
|
||||
. = TRUE
|
||||
if(!configuring)
|
||||
update_use_power(!use_power)
|
||||
else
|
||||
update_use_power(USE_POWER_OFF)
|
||||
if("configure")
|
||||
. = TRUE
|
||||
configuring = !configuring
|
||||
if(configuring)
|
||||
update_use_power(USE_POWER_OFF)
|
||||
|
||||
//only allows config changes when in configuring mode ~otherwise you'll get weird pressure stuff going on
|
||||
if(configuring && !use_power)
|
||||
switch(href_list["command"])
|
||||
if("set_flow_rate")
|
||||
var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate) as num
|
||||
set_flow_rate = between(0, new_flow_rate, max_flow_rate)
|
||||
if("switch_mode")
|
||||
switch_mode(dir_flag(href_list["dir"]), href_list["mode"])
|
||||
if("switch_con")
|
||||
change_concentration(dir_flag(href_list["dir"]))
|
||||
if("switch_conlock")
|
||||
con_lock(dir_flag(href_list["dir"]))
|
||||
if("set_flow_rate")
|
||||
. = TRUE
|
||||
if(!configuring || use_power)
|
||||
return
|
||||
var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate) as num
|
||||
set_flow_rate = between(0, new_flow_rate, max_flow_rate)
|
||||
if("switch_mode")
|
||||
. = TRUE
|
||||
if(!configuring || use_power)
|
||||
return
|
||||
switch_mode(dir_flag(params["dir"]), params["mode"])
|
||||
if("switch_con")
|
||||
. = TRUE
|
||||
if(!configuring || use_power)
|
||||
return
|
||||
change_concentration(dir_flag(params["dir"]))
|
||||
if("switch_conlock")
|
||||
. = TRUE
|
||||
if(!configuring || use_power)
|
||||
return
|
||||
con_lock(dir_flag(params["dir"]))
|
||||
|
||||
update_icon()
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/omni/mixer/proc/switch_mode(var/port = NORTH, var/mode = ATM_NONE)
|
||||
if(mode != ATM_INPUT && mode != ATM_OUTPUT)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
return
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
ui_interact(user)
|
||||
tgui_interact(user)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/omni/proc/build_icons()
|
||||
|
||||
Reference in New Issue
Block a user