diff --git a/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm b/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm
index 1c308a0e0b..fb686820ee 100644
--- a/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm
@@ -140,7 +140,7 @@
/obj/machinery/atmospherics/binary/algae_farm/attack_hand(mob/user)
if(..())
return 1
- ui_interact(user)
+ tgui_interact(user)
/obj/machinery/atmospherics/binary/algae_farm/RefreshParts()
..()
@@ -165,7 +165,13 @@
moles_per_tick = initial(moles_per_tick) + (manip_rating**2 - 1)
-/obj/machinery/atmospherics/binary/algae_farm/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/nano_ui/master_ui = null, var/datum/topic_state/state = default_state)
+/obj/machinery/atmospherics/binary/algae_farm/tgui_interact(mob/user, datum/tgui/ui)
+ ui = SStgui.try_update_ui(user, src, ui)
+ if(!ui)
+ ui = new(user, src, "AlgaeFarm", name)
+ ui.open()
+
+/obj/machinery/atmospherics/binary/algae_farm/tgui_data(mob/user)
var/data[0]
data["panelOpen"] = panel_open
@@ -198,41 +204,28 @@
"percent" = air2.total_moles ? round((air2.gas[output_gas] / air2.total_moles) * 100) : 0,
"moles" = round(air2.gas[output_gas], 0.01))
- // 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)
- ui = new(user, src, ui_key, "algae_farm_vr.tmpl", "Algae Farm Control Panel", 500, 600)
- ui.set_initial_data(data)
- ui.set_auto_update(TRUE)
- ui.open()
+ return data
-/obj/machinery/atmospherics/binary/algae_farm/Topic(href, href_list)
+/obj/machinery/atmospherics/binary/algae_farm/tgui_act(action, params)
if(..())
- return 1
- usr.set_machine(src)
+ return TRUE
add_fingerprint(usr)
- // Queue management can be done even while busy
- if(href_list["activate"])
- update_use_power(USE_POWER_ACTIVE)
- update_icon()
- updateUsrDialog()
- return
-
- if(href_list["deactivate"])
- update_use_power(USE_POWER_IDLE)
- update_icon()
- updateUsrDialog()
- return
-
- if(href_list["ejectMaterial"])
- var/matName = href_list["ejectMaterial"]
- if(!(matName in stored_material))
- return
- eject_materials(matName, 0)
- updateUsrDialog()
- return
+ switch(action)
+ if("toggle")
+ if(use_power == USE_POWER_IDLE)
+ update_use_power(USE_POWER_ACTIVE)
+ else
+ update_use_power(USE_POWER_IDLE)
+ update_icon()
+ . = TRUE
+ if("ejectMaterial")
+ var/matName = params["mat"]
+ if(!(matName in stored_material))
+ return
+ eject_materials(matName, 0)
+ . = TRUE
// TODO - These should be replaced with materials datum.
diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
index 1c501e87f0..bfbcb48734 100644
--- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
@@ -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, "Access denied.")
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())
diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm
index 0df0217497..54e034dc92 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm
@@ -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, "Access denied.")
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
diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm
index 9f0862d800..56171a0880 100644
--- a/code/ATMOSPHERICS/components/omni_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm
@@ -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)
diff --git a/code/ATMOSPHERICS/components/omni_devices/mixer.dm b/code/ATMOSPHERICS/components/omni_devices/mixer.dm
index 0210d09e69..077be63b30 100644
--- a/code/ATMOSPHERICS/components/omni_devices/mixer.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/mixer.dm
@@ -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)
diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
index 54acc3db99..be7f905a77 100644
--- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
@@ -110,7 +110,7 @@
return
src.add_fingerprint(usr)
- ui_interact(user)
+ tgui_interact(user)
return
/obj/machinery/atmospherics/omni/proc/build_icons()
diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
index bde060a11a..e2aaee092c 100755
--- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
@@ -111,7 +111,7 @@
if(frequency)
set_frequency(frequency)
-/obj/machinery/atmospherics/trinary/atmos_filter/attack_hand(user as mob) // -- TLE
+/obj/machinery/atmospherics/trinary/atmos_filter/attack_hand(user) // -- TLE
if(..())
return
@@ -119,81 +119,106 @@
to_chat(user, "Access denied.")
return
- var/dat
- var/current_filter_type
- switch(filter_type)
- if(0)
- current_filter_type = "Phoron"
- if(1)
- current_filter_type = "Oxygen"
- if(2)
- current_filter_type = "Nitrogen"
- if(3)
- current_filter_type = "Carbon Dioxide"
- if(4)
- current_filter_type = "Nitrous Oxide"
- if(-1)
- current_filter_type = "Nothing"
- else
- current_filter_type = "ERROR - Report this bug to the admin, please!"
+ tgui_interact(user)
- dat += {"
- Power: [use_power?"On":"Off"]
- Filtering: [current_filter_type]
|
- [scrubber.name] - Pressure: [round(scrubber.air_contents.return_pressure(), 0.01)] kPa - Flow Rate: [round(scrubber.last_flow_rate,0.1)] L/s - |
-
- Turn On
- Turn Off - Load: [round(scrubber.last_power_draw)] W - |
-
| X | Sender | Recipient | Message |
|---|---|---|---|
| [pda.sender] | [pda.recipient] | [pda.message] |
| Sender | -Sender's Job | -Recipient | -Message |
| [customsender] | -[customjob] | -[customrecepient ? customrecepient.owner : "NONE"] | -[custommessage] |
| X | Sending Dep. | Receiving Dep. | -Message | Stamp | ID Auth. | Priority. |
|---|---|---|---|---|---|---|
| [rc.send_dpt] | -[rc.rec_dpt] | [rc.message] | [rc.stamp] | [rc.id_auth] | [rc.priority] |
"}
- dat += text("Search Records
", src)
- dat += text("New Record
", src)
- dat += {"
-
| Records: | -
|---|
| Name | -ID | -Rank | -Fingerprints | -
|---|---|---|---|
| [] | ", background, src, R, R.fields["name"]) - dat += text("[] | ", R.fields["id"]) - dat += text("[] | ", R.fields["rank"]) - dat += text("[] | ", R.fields["fingerprint"]) - dat += "
| "
- dat += "Name: [active1.fields["name"]] " - dat += "ID: [active1.fields["id"]] \n" - dat += "Entity Classification: [active1.fields["brain_type"]] \n" - dat += "Sex: [active1.fields["sex"]] \n" - dat += "Age: [active1.fields["age"]] \n" - dat += "Rank: [active1.fields["rank"]] \n" - dat += "Fingerprint: [active1.fields["fingerprint"]] \n" - dat += "Physical Status: [active1.fields["p_stat"]] \n" - dat += "Mental Status: [active1.fields["m_stat"]] \n" +/obj/machinery/computer/skills/tgui_interact(mob/user, datum/tgui/ui = null) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "GeneralRecords", "Employee Records") // 800, 380 + ui.open() + ui.set_autoupdate(FALSE) - dat += "Employment/skills summary: " - dat += decode(active1.fields["notes"]) - dat += " " - var/counter = 1 - while(src.active1.fields[text("com_[]", counter)]) - dat += text("[] Delete Entry ", src.active1.fields[text("com_[]", counter)], src, counter) - counter++ - dat += "Add Entry | "
-
- dat += "Photo: "
- dat += "![]() |
| Search Results for '[]': | ", tempname) - dat += {" -
|---|
| Name | -ID | -Rank | -Fingerprints | -|
|---|---|---|---|---|
| [] | ", background, src, R, R.fields["name"]) - dat += text("[] | ", R.fields["id"]) - dat += text("[] | ", R.fields["rank"]) - dat += text("[] | ", R.fields["fingerprint"]) - dat += text("[] |
| ")
- dat += text("Name: [] ", registered_name) - dat += text("Sex: [] \n", sex) - dat += text("Age: [] \n", age) - dat += text("Rank: [] \n", assignment) - dat += text("Fingerprint: [] \n", fingerprint_hash) - dat += text("Blood Type: [] \n", blood_type) - dat += text("DNA Hash: [] \n", dna_hash) - if(front && side) - dat +=" | Photo:![]() ![]() | "
- dat += "
At greencorps we love the environment, and space. With this package you are able to help mother nature and produce energy without any usage of fossil fuel or phoron! Singularity energy is dangerous while solar energy is safe, which is why it's better. Now here is how you setup your own solar array.
You can make a solar panel by wrenching the solar assembly onto a cable node. Adding a glass panel, reinforced or regular glass will do, will finish the construction of your solar panel. It is that easy!
Now after setting up 19 more of these solar panels you will want to create a solar tracker to keep track of our mother nature's gift, the SSsun.sun. These are the same steps as before except you insert the tracker equipment circuit into the assembly before performing the final step of adding the glass. You now have a tracker! Now the last step is to add a computer to calculate the SSsun.sun's movements and to send commands to the solar panels to change direction with the SSsun.sun. Setting up the solar computer is the same as setting up any computer, so you should have no trouble in doing that. You do need to put a wire node under the computer, and the wire needs to be connected to the tracker.
Congratulations, you should have a working solar array. If you are having trouble, here are some tips. Make sure all solar equipment are on a cable node, even the computer. You can always deconstruct your creations if you make a mistake.
That's all to it, be safe, be green!
" - -/proc/rate_control(var/S, var/V, var/C, var/Min=1, var/Max=5, var/Limit=null) //How not to name vars - var/href = "-[href]=-[Min]'>- [(C?C : 0)] [href]=[Min]'>+[href]=[Max]'>+" - if(Limit) return "[href]=-[Limit]'>-"+rate+"[href]=[Limit]'>+" - return rate diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 3d651a2a0f..4e6c5a6cb5 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -390,11 +390,11 @@ if(Adjacent(user)) return attack_hand(user) else - ui_interact(user) + tgui_interact(user) return /obj/machinery/power/supermatter/attack_ai(mob/user as mob) - ui_interact(user) + tgui_interact(user) /obj/machinery/power/supermatter/attack_hand(mob/user as mob) var/datum/gender/TU = gender_datums[user.get_visible_gender()] @@ -404,9 +404,15 @@ Consume(user) +/obj/machinery/power/supermatter/tgui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "AiSupermatter", name) + ui.open() + // This is purely informational UI that may be accessed by AIs or robots -/obj/machinery/power/supermatter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - var/data[0] +/obj/machinery/power/supermatter/tgui_data(mob/user) + var/list/data = list() data["integrity_percentage"] = round(get_integrity()) var/datum/gas_mixture/env = null @@ -421,12 +427,7 @@ data["ambient_pressure"] = round(env.return_pressure()) data["detonating"] = grav_pulling - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) - if (!ui) - ui = new(user, src, ui_key, "supermatter_crystal.tmpl", "Supermatter Crystal", 500, 300) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/power/supermatter/attackby(obj/item/weapon/W as obj, mob/living/user as mob) diff --git a/code/modules/resleeving/infomorph.dm b/code/modules/resleeving/infomorph.dm index 45c5d4193b..7fd716bc96 100644 --- a/code/modules/resleeving/infomorph.dm +++ b/code/modules/resleeving/infomorph.dm @@ -417,7 +417,7 @@ var/list/infomorph_emotions = list( desc = "Modify the settings on your integrated radio." if(radio) - radio.ui_interact(src,"main",null,1,conscious_state) + radio.tgui_interact(src) else to_chat(src, "You don't have a radio!") diff --git a/code/modules/shieldgen/shield_capacitor.dm b/code/modules/shieldgen/shield_capacitor.dm index 2ef3f17a85..d76a18045a 100644 --- a/code/modules/shieldgen/shield_capacitor.dm +++ b/code/modules/shieldgen/shield_capacitor.dm @@ -18,6 +18,7 @@ use_power = USE_POWER_OFF //doesn't use APC power var/charge_rate = 100000 //100 kW var/obj/machinery/shield_gen/owned_gen + interact_offline = TRUE /obj/machinery/shield_capacitor/advanced name = "advanced shield capacitor" @@ -67,36 +68,30 @@ /obj/machinery/shield_capacitor/attack_hand(mob/user) if(stat & (BROKEN)) return - interact(user) + tgui_interact(user) -/obj/machinery/shield_capacitor/interact(mob/user) - if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN)) ) - if (!istype(user, /mob/living/silicon)) - user.unset_machine() - user << browse(null, "window=shield_capacitor") - return - var/t = "Shield Capacitor Control Console| Index | Law |
| {{:value.index}}. | {{:value.law}} |
| Radio Subspace Transceiver | -{{:helper.link("Enabled", null, {'radio' : 0}, data.radio ? 'selected' : null)}} | -{{:helper.link("Disabled", null, {'radio' : 1}, data.radio ? null : 'redButton' )}} | -
| Wireless Interface | -{{:helper.link("Enabled", null, {'wireless' : 0}, data.wireless ? 'selected' : null)}} | -{{:helper.link("Disabled", null, {'wireless' : 1}, data.wireless ? null : 'redButton' )}} | -
| AI shutdown in progress... | ||
| AI Power | -{{:helper.link("Shutdown", 'radiation', {'wipe' : 1}, null, 'redButton')}} | -
| - | |
- Remote Control- |
-
- Thermostat- |
- - |
|
-
-
-
- {{:helper.link('Off', null, { 'rcon' : 1}, data.remote_connection && !data.remote_access ? (data.rcon == 1 ? 'yellowButton' : 'disabled') : null, data.rcon == 1 ? 'selected' : null)}}
- {{:helper.link('Auto', null, { 'rcon' : 2}, data.remote_connection && !data.remote_access ? (data.rcon == 2 ? 'yellowButton' : 'disabled') : null, data.rcon == 2 ? 'selected' : null)}}
- {{:helper.link('On', null, { 'rcon' : 3}, data.remote_connection && !data.remote_access ? (data.rcon == 3 ? 'yellowButton' : 'disabled') : null, data.rcon == 3 ? 'selected' : null)}}
-
- |
- - {{:helper.link(data.target_temperature, null, { 'temperature' : 1})}} - | -