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:
ShadowLarkens
2020-08-07 18:08:08 -07:00
parent f1a95c31f8
commit 951f37d2e3
222 changed files with 13749 additions and 9249 deletions

View File

@@ -209,18 +209,21 @@
/obj/machinery/atmospherics/binary/passive_gate/attack_hand(user as mob)
if(..())
return
src.add_fingerprint(usr)
if(!src.allowed(user))
add_fingerprint(usr)
if(!allowed(user))
to_chat(user, "<span class='warning'>Access denied.</span>")
return
usr.set_machine(src)
ui_interact(user)
return
tgui_interact(user)
/obj/machinery/atmospherics/binary/passive_gate/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
/obj/machinery/atmospherics/binary/passive_gate/tgui_interact(mob/user, datum/tgui/ui)
if(stat & (BROKEN|NOPOWER))
return
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "PressureRegulator", name)
ui.open()
/obj/machinery/atmospherics/binary/passive_gate/tgui_data(mob/user)
// this is the data which will be sent to the ui
var/data[0]
@@ -235,51 +238,48 @@
"last_flow_rate" = round(last_flow_rate*10),
)
// update the ui if it exists, returns null if no ui is passed/found
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "pressure_regulator.tmpl", name, 470, 370)
ui.set_initial_data(data) // when the ui is first opened this is the data it will use
ui.open() // open the new ui window
ui.set_auto_update(1) // auto update every Master Controller tick
return data
/obj/machinery/atmospherics/binary/passive_gate/Topic(href,href_list)
if(..()) return 1
/obj/machinery/atmospherics/binary/passive_gate/tgui_act(action, params)
if(..())
return TRUE
if(href_list["toggle_valve"])
unlocked = !unlocked
switch(action)
if("toggle_valve")
. = TRUE
unlocked = !unlocked
if("regulate_mode")
. = TRUE
switch(params["mode"])
if("off") regulate_mode = REGULATE_NONE
if("input") regulate_mode = REGULATE_INPUT
if("output") regulate_mode = REGULATE_OUTPUT
if(href_list["regulate_mode"])
switch(href_list["regulate_mode"])
if ("off") regulate_mode = REGULATE_NONE
if ("input") regulate_mode = REGULATE_INPUT
if ("output") regulate_mode = REGULATE_OUTPUT
if("set_press")
. = TRUE
switch(params["press"])
if("min")
target_pressure = 0
if("max")
target_pressure = max_pressure_setting
if("set")
var/new_pressure = input(usr,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure Control",src.target_pressure) as num
src.target_pressure = between(0, new_pressure, max_pressure_setting)
switch(href_list["set_press"])
if ("min")
target_pressure = 0
if ("max")
target_pressure = max_pressure_setting
if ("set")
var/new_pressure = input(usr,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure Control",src.target_pressure) as num
src.target_pressure = between(0, new_pressure, max_pressure_setting)
if("set_flow_rate")
. = TRUE
switch(params["press"])
if("min")
set_flow_rate = 0
if("max")
set_flow_rate = air1.volume
if("set")
var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[air1.volume]L/s)","Flow Rate Control",src.set_flow_rate) as num
src.set_flow_rate = between(0, new_flow_rate, air1.volume)
switch(href_list["set_flow_rate"])
if ("min")
set_flow_rate = 0
if ("max")
set_flow_rate = air1.volume
if ("set")
var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[air1.volume]kPa)","Flow Rate Control",src.set_flow_rate) as num
src.set_flow_rate = between(0, new_flow_rate, air1.volume)
usr.set_machine(src) //Is this even needed with NanoUI?
src.update_icon()
src.add_fingerprint(usr)
return
update_icon()
add_fingerprint(usr)
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!W.is_wrench())