mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 15:08:34 +01: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:
@@ -143,10 +143,15 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
/obj/machinery/atmospherics/binary/pump/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, "GasPump", name)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/tgui_data(mob/user)
|
||||
// this is the data which will be sent to the ui
|
||||
var/data[0]
|
||||
|
||||
@@ -159,15 +164,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
"max_power_draw" = power_rating,
|
||||
)
|
||||
|
||||
// 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, "gas_pump.tmpl", name, 470, 290)
|
||||
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/pump/Initialize()
|
||||
. = ..()
|
||||
@@ -204,36 +201,40 @@ Thus, the two variables affect pump operation are set in New():
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/attack_hand(user as mob)
|
||||
/obj/machinery/atmospherics/binary/pump/attack_ghost(mob/user)
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/attack_hand(mob/user)
|
||||
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/pump/Topic(href,href_list)
|
||||
if(..()) return 1
|
||||
/obj/machinery/atmospherics/binary/pump/tgui_act(action, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
if(href_list["power"])
|
||||
update_use_power(!use_power)
|
||||
switch(action)
|
||||
if("power")
|
||||
update_use_power(!use_power)
|
||||
. = TRUE
|
||||
if("set_press")
|
||||
var/press = params["press"]
|
||||
switch(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)
|
||||
. = TRUE
|
||||
|
||||
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)
|
||||
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
src.update_icon()
|
||||
add_fingerprint(usr)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/power_change()
|
||||
var/old_stat = stat
|
||||
|
||||
Reference in New Issue
Block a user