mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-28 10:01:58 +00:00
* Refactors atom/Initialize Captialized for compiling correctness and to be more inline with Destroy Will now be called from atom/New if the world initialization loop in SSobj has already run. Should always call the base. Now comes with the `roundstart` parameter indicating whether or not it was called by SSobj or atom/New Other fixes/tweaks: - Renamed a proc called Initialize in abduction consoles to Setup - Removed /obj/item/device/radio/headset/headset_sec/department: Broken and referenced literally nowhere in the code - Removed a spawn from the Initialize of turbine_computer which made literally zero sense - Generalized the proc which fixes RND servers with no id set Reasoning: It's better to check roundstart per function than to have to duplicate code in New and Initialize. Think of it as a safer New for atoms. If we move enough stuff to it, initial map load performance will increase due to less New calls * Fixed a thing * Actually, fuck the police * >Expecting a merge without errors * >Not calling ..() in New * Sanic * Fix the headset bug * Makes sure the map loaders dew it right * Fixes ruins being initialized twice * Rename roundstart -> mapload * Revert "Rename roundstart -> mapload" This reverts commit 667c327fd2ccfa3ce4f4db52eac03f9e8b0f6812. * Remove unrelated change * A more direct solution to map loads * And now we shouldnt need this warning * Add the new var to SSobj recovery * Revert "Revert "Rename roundstart -> mapload"" This reverts commit dee07dbd5e4696554ac43aae5b91cce743b9b9e0. * Line endings
81 lines
2.1 KiB
Plaintext
81 lines
2.1 KiB
Plaintext
/datum/computer/file/embedded_program/simple_vent_controller
|
|
|
|
var/airpump_tag
|
|
|
|
/datum/computer/file/embedded_program/simple_vent_controller/receive_user_command(command)
|
|
switch(command)
|
|
if("vent_inactive")
|
|
var/datum/signal/signal = new
|
|
signal.data = list(
|
|
"tag" = airpump_tag,
|
|
"sigtype"="command"
|
|
)
|
|
signal.data["power"] = 0
|
|
post_signal(signal)
|
|
|
|
if("vent_pump")
|
|
var/datum/signal/signal = new
|
|
signal.data = list(
|
|
"tag" = airpump_tag,
|
|
"sigtype"="command"
|
|
)
|
|
signal.data["stabalize"] = 1
|
|
signal.data["power"] = 1
|
|
post_signal(signal)
|
|
|
|
if("vent_clear")
|
|
var/datum/signal/signal = new
|
|
signal.transmission_method = 1 //radio signal
|
|
signal.data = list(
|
|
"tag" = airpump_tag,
|
|
"sigtype"="command"
|
|
)
|
|
signal.data["purge"] = 1
|
|
signal.data["power"] = 1
|
|
post_signal(signal)
|
|
|
|
/datum/computer/file/embedded_program/simple_vent_controller/process()
|
|
return 0
|
|
|
|
|
|
/obj/machinery/embedded_controller/radio/simple_vent_controller
|
|
icon = 'icons/obj/airlock_machines.dmi'
|
|
icon_state = "airlock_control_standby"
|
|
|
|
name = "vent controller"
|
|
density = 0
|
|
|
|
frequency = 1229
|
|
power_channel = ENVIRON
|
|
|
|
// Setup parameters only
|
|
var/airpump_tag
|
|
|
|
/obj/machinery/embedded_controller/radio/simple_vent_controller/Initialize(mapload)
|
|
..()
|
|
|
|
if(!mapload)
|
|
return
|
|
var/datum/computer/file/embedded_program/simple_vent_controller/new_prog = new
|
|
|
|
new_prog.airpump_tag = airpump_tag
|
|
new_prog.master = src
|
|
program = new_prog
|
|
|
|
/obj/machinery/embedded_controller/radio/simple_vent_controller/update_icon()
|
|
if(on && program)
|
|
icon_state = "airlock_control_standby"
|
|
else
|
|
icon_state = "airlock_control_off"
|
|
|
|
|
|
/obj/machinery/embedded_controller/radio/simple_vent_controller/return_text()
|
|
var/state_options = null
|
|
state_options = {"<A href='?src=\ref[src];command=vent_inactive'>Deactivate Vent</A><BR>
|
|
<A href='?src=\ref[src];command=vent_pump'>Activate Vent / Pump</A><BR>
|
|
<A href='?src=\ref[src];command=vent_clear'>Activate Vent / Clear</A><BR>"}
|
|
var/output = {"<B>Vent Control Console</B><HR>
|
|
[state_options]<HR>"}
|
|
|
|
return output
|