mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 12:08:28 +01:00
cleans up some more update Dialog (#19208)
* cleans up some more update Dialog * . * pod UI * . * modern rcon console * . * no dupe tags * . * nbeeds a recode * . * . * ice cream as tgui * , * legacy drone fab * more a POI object * . * missing dels * navbeacon * eh that is part of the default now * del useless list * . * . * . * retail scanner * better * finish retail * . * be gone * . * .
This commit is contained in:
@@ -151,11 +151,6 @@ GLOBAL_LIST_EMPTY(apcs)
|
||||
var/nightshift_setting = NIGHTSHIFT_AUTO
|
||||
var/last_nightshift_switch = 0
|
||||
|
||||
/obj/machinery/power/apc/updateDialog()
|
||||
if(stat & (BROKEN|MAINT))
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/power/apc/connect_to_network()
|
||||
//Override because the APC does not directly connect to the network; it goes through a terminal.
|
||||
//The terminal is what the power computer looks for anyway.
|
||||
|
||||
@@ -29,91 +29,6 @@
|
||||
|
||||
monitor.tgui_interact(user)
|
||||
|
||||
/*
|
||||
/obj/machinery/computer/fusion_fuel_control/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/computer/fusion_fuel_control/interact(var/mob/user)
|
||||
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=fuel_control")
|
||||
return
|
||||
|
||||
if (!istype(user, /mob/living/silicon) && get_dist(src, user) > 1)
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=fuel_control")
|
||||
return
|
||||
|
||||
if(!id_tag)
|
||||
to_chat(user, span_warning("This console has not been assigned an ident tag. Please contact your system administrator or conduct a manual update with a standard multitool."))
|
||||
return
|
||||
|
||||
var/dat = span_bold("Reactor Core Fuel Control #[id_tag]") + "<BR>"
|
||||
dat += {"
|
||||
<hr>
|
||||
<table border=1 width='100%'>
|
||||
<tr>
|
||||
<td><b>Contains</b></td>
|
||||
<td><b>Assembly</b></td>
|
||||
<td><b>Remaining</b></td>
|
||||
</tr>"}
|
||||
|
||||
for(var/obj/machinery/fusion_fuel_injector/I in fuel_injectors)
|
||||
if(!id_tag || !I.id_tag || I.id_tag != id_tag || get_dist(src, I) > scan_range)
|
||||
continue
|
||||
|
||||
dat += "<tr>"
|
||||
|
||||
if(I.stat & (BROKEN|NOPOWER))
|
||||
dat += "<td>" + span_danger("ERROR") + "</td>"
|
||||
dat += "<td>" + span_danger("ERROR") + "</td>"
|
||||
dat += "<td>" + span_danger("ERROR") + "</td>"
|
||||
else
|
||||
dat += "<td>[I.cur_assembly ? I.cur_assembly.fuel_type : "NONE"]</td>"
|
||||
if(I.cur_assembly)
|
||||
dat += "<td><a href='byond://?src=\ref[src];toggle_injecting=\ref[I]'>\[[I.injecting ? "Halt injecting" : "Begin injecting"]\]</a></td>"
|
||||
else
|
||||
dat += "<td>None</td>"
|
||||
if(I.cur_assembly)
|
||||
dat += "<td>[I.cur_assembly.percent_depleted * 100]%</td>"
|
||||
else
|
||||
dat += "<td>NA</td>"
|
||||
|
||||
dat += "</tr>"
|
||||
|
||||
dat += {"</table><hr>
|
||||
<A href='byond://?src=\ref[src];refresh=1'>Refresh</A>
|
||||
<A href='byond://?src=\ref[src];close=1'>Close</A><BR>"}
|
||||
|
||||
var/datum/browser/popup = new(user, "fuel_control", "Fusion Fuel Control Console", 800, 400, src)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
user.set_machine(src)
|
||||
|
||||
/obj/machinery/computer/fusion_fuel_control/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["toggle_injecting"])
|
||||
var/obj/machinery/fusion_fuel_injector/I = locate(href_list["toggle_injecting"])
|
||||
if(I.id_tag != id_tag || get_dist(src, I) > scan_range)
|
||||
return
|
||||
|
||||
if(istype(I))
|
||||
if(I.injecting)
|
||||
I.StopInjecting()
|
||||
else
|
||||
I.BeginInjecting()
|
||||
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=fuel_control")
|
||||
usr.unset_machine()
|
||||
|
||||
updateDialog()
|
||||
*/
|
||||
|
||||
/obj/machinery/computer/fusion_fuel_control/attackby(var/obj/item/W, var/mob/user)
|
||||
..()
|
||||
if(istype(W, /obj/item/multitool))
|
||||
@@ -121,21 +36,3 @@
|
||||
if(new_ident && user.Adjacent(src))
|
||||
monitor.fuel_tag = new_ident
|
||||
return
|
||||
|
||||
/*
|
||||
/obj/machinery/computer/fusion_fuel_control/update_icon()
|
||||
if(stat & (BROKEN))
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "broken"
|
||||
set_light(0)
|
||||
|
||||
if(stat & (NOPOWER))
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "computer"
|
||||
set_light(0)
|
||||
|
||||
if(!stat & (BROKEN|NOPOWER))
|
||||
icon = initial(icon)
|
||||
icon_state = initial(icon_state)
|
||||
set_light(light_range_on, light_power_on)
|
||||
*/
|
||||
|
||||
@@ -96,8 +96,6 @@ GLOBAL_LIST_EMPTY(all_turbines)
|
||||
stored_energy = 0
|
||||
return
|
||||
|
||||
updateDialog()
|
||||
|
||||
var/datum/gas_mixture/air1 = circ1.return_transfer_air()
|
||||
var/datum/gas_mixture/air2 = circ2.return_transfer_air()
|
||||
|
||||
|
||||
@@ -353,7 +353,6 @@ GLOBAL_LIST_EMPTY(gravity_generators)
|
||||
if(charge_count % 4 == 0 && prob(75)) // Let them know it is charging/discharging.
|
||||
playsound(src, 'sound/effects/empulse.ogg', 100, 1)
|
||||
|
||||
updateDialog()
|
||||
if(prob(25)) // To help stop "Your clothes feel warm." spam.
|
||||
pulse_radiation()
|
||||
|
||||
|
||||
@@ -236,7 +236,6 @@
|
||||
var/temp_loss = (temperature - cooling_temperature)/TEMPERATURE_DIVISOR
|
||||
temp_loss = between(2, round(temp_loss, 1), TEMPERATURE_CHANGE_MAX)
|
||||
temperature = max(temperature - temp_loss, cooling_temperature)
|
||||
updateDialog()
|
||||
|
||||
if(overheating)
|
||||
overheating--
|
||||
|
||||
@@ -340,9 +340,14 @@
|
||||
// Multitool - change RCON tag
|
||||
if(istype(W, /obj/item/multitool))
|
||||
var/newtag = tgui_input_text(user, "Enter new RCON tag. Use \"NO_TAG\" to disable RCON or leave empty to cancel.", "SMES RCON system", "", MAX_NAME_LEN)
|
||||
if(newtag)
|
||||
RCon_tag = newtag
|
||||
to_chat(user, span_notice("You changed the RCON tag to: [newtag]"))
|
||||
if(!newtag)
|
||||
return
|
||||
for(var/obj/machinery/power/smes/buildable/smes in GLOB.smeses)
|
||||
if(smes.RCon_tag == newtag)
|
||||
to_chat(user, span_warning("The entered RCON tag [newtag] already exists. Aborting."))
|
||||
return
|
||||
RCon_tag = newtag
|
||||
to_chat(user, span_notice("You changed the RCON tag to: [newtag]"))
|
||||
return
|
||||
// Charged above 1% and safeties are enabled.
|
||||
if((charge > (capacity/100)) && safeties_enabled)
|
||||
|
||||
@@ -362,7 +362,6 @@ GLOBAL_LIST_EMPTY(solars_list)
|
||||
connected_tracker.set_angle(SSsun.sun.angle)
|
||||
|
||||
set_panels(cdir)
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/power/solar_control/update_icon()
|
||||
if(stat & BROKEN)
|
||||
@@ -458,8 +457,6 @@ GLOBAL_LIST_EMPTY(solars_list)
|
||||
if(powernet)
|
||||
add_avail(connected_power)
|
||||
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/power/solar_control/tgui_act(action, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
@@ -273,45 +273,41 @@
|
||||
if(lastgen > 100)
|
||||
add_overlay(image('icons/obj/pipes.dmi', "turb-o", FLY_LAYER))
|
||||
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/power/turbine/attack_hand(var/mob/user as mob)
|
||||
if((. = ..()))
|
||||
return
|
||||
src.interact(user)
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/machinery/power/turbine/interact(mob/user)
|
||||
if(!Adjacent(user) || (stat & (NOPOWER|BROKEN)) && !issilicon(user))
|
||||
user.unset_machine(src)
|
||||
user << browse(null, "window=turbine")
|
||||
/obj/machinery/power/turbine/tgui_interact(mob/user, datum/tgui/ui, datum/tgui/parent_ui, custom_state)
|
||||
. = ..()
|
||||
if(!Adjacent(user) && !issilicon(user))
|
||||
return
|
||||
user.set_machine(src)
|
||||
|
||||
var/t = "<TT><B>Gas Turbine Generator</B><HR><PRE>"
|
||||
t += "Generated power : [DisplayPower(lastgen)]<BR><BR>"
|
||||
t += "Turbine: [round(compressor.rpm)] RPM<BR>"
|
||||
t += "Starter: [ compressor.starter ? "<A href='byond://?src=\ref[src];str=1'>Off</A> " + span_bold("On") : span_bold("Off") + " <A href='byond://?src=\ref[src];str=1'>On</A>"]"
|
||||
t += "</PRE><HR><A href='byond://?src=\ref[src];close=1'>Close</A>"
|
||||
t += "</TT>"
|
||||
var/datum/browser/popup = new(user, "turbine", name, 700, 500, src)
|
||||
popup.set_content(t)
|
||||
popup.open()
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/power/turbine/Topic(href, href_list)
|
||||
if(..())
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
if(href_list["close"])
|
||||
usr << browse(null, "window=turbine")
|
||||
usr.unset_machine(src)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "Turbine", name)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/power/turbine/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
|
||||
return list(
|
||||
"display_power" = lastgen,
|
||||
"turbine_rpm" = compressor?.rpm,
|
||||
"starter" = compressor?.starter
|
||||
)
|
||||
|
||||
/obj/machinery/power/turbine/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
else if(href_list["str"])
|
||||
if(compressor)
|
||||
|
||||
switch(action)
|
||||
if("start_stop")
|
||||
if(!compressor)
|
||||
return FALSE
|
||||
compressor.starter = !compressor.starter
|
||||
updateDialog()
|
||||
|
||||
return TRUE
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Turbine Computer
|
||||
|
||||
Reference in New Issue
Block a user