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

@@ -36,7 +36,7 @@
/obj/machinery/particle_accelerator/control_box/attack_hand(mob/user as mob)
if(construction_state >= 3)
interact(user)
tgui_interact(user)
else if(construction_state == 2) // Wires exposed
wires.Interact(user)
@@ -77,36 +77,6 @@
else
icon_state = "[reference]c"
/obj/machinery/particle_accelerator/control_box/Topic(href, href_list)
..()
//Ignore input if we are broken, !silicon guy cant touch us, or nonai controlling from super far away
if(stat & (BROKEN|NOPOWER) || (get_dist(src, usr) > 1 && !istype(usr, /mob/living/silicon)) || (get_dist(src, usr) > 8 && !istype(usr, /mob/living/silicon/ai)))
usr.unset_machine()
usr << browse(null, "window=pacontrol")
return
if( href_list["close"] )
usr << browse(null, "window=pacontrol")
usr.unset_machine()
return
if(href_list["togglep"])
if(!wires.is_cut(WIRE_PARTICLE_POWER))
toggle_power()
else if(href_list["scan"])
part_scan()
else if(href_list["strengthup"])
if(!wires.is_cut(WIRE_PARTICLE_STRENGTH))
add_strength()
else if(href_list["strengthdown"])
if(!wires.is_cut(WIRE_PARTICLE_STRENGTH))
remove_strength()
updateDialog()
update_icon()
/obj/machinery/particle_accelerator/control_box/proc/strength_change()
for(var/obj/structure/particle_accelerator/part in connected_parts)
part.strength = strength
@@ -230,33 +200,54 @@
part.update_icon()
return 1
/obj/machinery/particle_accelerator/control_box/proc/is_interactive(mob/user)
if(!interface_control)
to_chat(user, "<span class='alert'>ERROR: Request timed out. Check wire contacts.</span>")
return FALSE
if(construction_state != 3)
return FALSE
return TRUE
/obj/machinery/particle_accelerator/control_box/interact(mob/user)
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
if(!istype(user, /mob/living/silicon))
user.unset_machine()
user << browse(null, "window=pacontrol")
return
user.set_machine(src)
/obj/machinery/particle_accelerator/control_box/tgui_status(mob/user)
if(is_interactive(user))
return ..()
return STATUS_CLOSE
var/dat = ""
dat += "Particle Accelerator Control Panel<BR>"
dat += "<A href='?src=\ref[src];close=1'>Close</A><BR><BR>"
dat += "Status:<BR>"
if(!assembled)
dat += "Unable to detect all parts!<BR>"
dat += "<A href='?src=\ref[src];scan=1'>Run Scan</A><BR><BR>"
else
dat += "All parts in place.<BR><BR>"
dat += "Power:"
if(active)
dat += "On<BR>"
else
dat += "Off <BR>"
dat += "<A href='?src=\ref[src];togglep=1'>Toggle Power</A><BR><BR>"
dat += "Particle Strength: [src.strength] "
dat += "<A href='?src=\ref[src];strengthdown=1'>--</A>|<A href='?src=\ref[src];strengthup=1'>++</A><BR><BR>"
/obj/machinery/particle_accelerator/control_box/tgui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "ParticleAccelerator", name)
ui.open()
user << browse(dat, "window=pacontrol;size=420x500")
onclose(user, "pacontrol")
return
/obj/machinery/particle_accelerator/control_box/tgui_data(mob/user)
var/list/data = list()
data["assembled"] = assembled
data["power"] = active
data["strength"] = strength
return data
/obj/machinery/particle_accelerator/control_box/tgui_act(action, params)
if(..())
return
switch(action)
if("power")
if(wires.is_cut(WIRE_POWER))
return
toggle_power()
. = TRUE
if("scan")
part_scan()
. = TRUE
if("add_strength")
if(wires.is_cut(WIRE_PARTICLE_STRENGTH))
return
add_strength()
. = TRUE
if("remove_strength")
if(wires.is_cut(WIRE_PARTICLE_STRENGTH))
return
remove_strength()
. = TRUE
update_icon()