mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 14:08:44 +01:00
Circuitboard Unit Test (#19322)
* fix * updated test * types of * correct boards * fix those circuits * clarity * fix * try again * circuit test * Revert "fix those circuits" This reverts commitd4468d669a. * Revert "correct boards" This reverts commitb49b0d7f2e. * Reapply "fix those circuits" This reverts commit1189ee9524. * Reapply "correct boards" This reverts commitaf69adbfe8.
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
/obj/machinery/computer/cryopod/dorms
|
||||
name = "residential oversight console"
|
||||
desc = "An interface between visitors and the residential oversight systems tasked with keeping track of all visitors in the deeper section of the colony."
|
||||
circuit = /obj/item/circuitboard/robotstoragecontrol
|
||||
circuit = /obj/item/circuitboard/dormscontrol
|
||||
|
||||
storage_type = "visitors"
|
||||
storage_name = "Residential Oversight Control"
|
||||
@@ -59,7 +59,7 @@
|
||||
/obj/machinery/computer/cryopod/travel
|
||||
name = "docking oversight console"
|
||||
desc = "An interface between visitors and the docking oversight systems tasked with keeping track of all visitors who enter or exit from the docks."
|
||||
circuit = /obj/item/circuitboard/robotstoragecontrol
|
||||
circuit = /obj/item/circuitboard/travelcontrol
|
||||
|
||||
storage_type = "visitors"
|
||||
storage_name = "Travel Oversight Control"
|
||||
@@ -68,7 +68,7 @@
|
||||
/obj/machinery/computer/cryopod/gateway
|
||||
name = "gateway oversight console"
|
||||
desc = "An interface between visitors and the gateway oversight systems tasked with keeping track of all visitors who enter or exit from the gateway."
|
||||
circuit = /obj/item/circuitboard/robotstoragecontrol
|
||||
circuit = /obj/item/circuitboard/gatewaycontrol
|
||||
|
||||
storage_type = "visitors"
|
||||
storage_name = "Travel Oversight Control"
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
/obj/item/circuitboard/stationalert_security
|
||||
name = T_BOARD("station alert console (security)")
|
||||
build_path = /obj/machinery/computer/station_alert
|
||||
build_path = /obj/machinery/computer/station_alert/security
|
||||
|
||||
/obj/item/circuitboard/stationalert_all
|
||||
name = T_BOARD("station alert console (all)")
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
use_power = USE_POWER_IDLE
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 50
|
||||
circuit = /obj/item/circuitboard/industrial_reagent_pump
|
||||
circuit = /obj/item/circuitboard/industrial_reagent_filter
|
||||
VAR_PROTECTED/filter_side = -1 // L
|
||||
VAR_PRIVATE/filter_reagent_id = ""
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "pumprelay"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
circuit = /obj/item/circuitboard/industrial_reagent_pump
|
||||
circuit = /obj/item/circuitboard/pump_relay
|
||||
|
||||
/obj/machinery/pump_relay/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -48,3 +48,28 @@
|
||||
|
||||
if(failed)
|
||||
TEST_FAIL("missing circuitboard print recipies.")
|
||||
|
||||
/datum/unit_test/all_default_circuits_must_match_machines
|
||||
|
||||
/datum/unit_test/all_default_circuits_must_match_machines/Run()
|
||||
var/failed = FALSE
|
||||
|
||||
// Check the machine deconstructs into the board
|
||||
for(var/obj/machinery/machine_path as anything in subtypesof(/obj/machinery))
|
||||
if((machine_path in typesof(/obj/machinery/airlock_sensor)) || (machine_path in typesof(/obj/machinery/embedded_controller/radio/airlock))) // Snowflake multi-type airlock board
|
||||
continue
|
||||
if(machine_path == /obj/machinery/power/smes) // Ignore this snowflake basetype that isn't constructable
|
||||
continue
|
||||
if(!machine_path.circuit)
|
||||
continue
|
||||
var/obj/item/circuitboard/board_path = initial(machine_path.circuit)
|
||||
if(!board_path)
|
||||
continue
|
||||
|
||||
// Get to the actual test!
|
||||
if(!(machine_path in typesof(board_path.build_path))) // This should be stricted someday... but not today.
|
||||
TEST_NOTICE(src, "[machine_path]'s default board does not match the machine it constructs. \"[board_path]\".")
|
||||
failed = TRUE
|
||||
|
||||
if(failed)
|
||||
TEST_FAIL("machine had an incorrect circuitboard in its definition.")
|
||||
|
||||
@@ -232,7 +232,7 @@ P.S. Before any of you ask, no, you cannot fire yourself or your teammates out o
|
||||
/obj/machinery/computer/cryopod/ert
|
||||
name = "responder oversight console"
|
||||
desc = "An interface between responders and the cryo oversight systems tasked with keeping track of all responders who enter or exit cryostasis."
|
||||
circuit = /obj/item/circuitboard/robotstoragecontrol
|
||||
circuit = /obj/item/circuitboard/cryopodcontrol
|
||||
|
||||
storage_type = "responders"
|
||||
storage_name = "ERT Oversight Control"
|
||||
|
||||
@@ -292,7 +292,7 @@ In the meantime, happy hunting. Go bag me some carp. The mech bay can be found i
|
||||
/obj/machinery/computer/cryopod/merc
|
||||
name = "mercenary oversight console"
|
||||
desc = "An interface between mercenaries and the cryo oversight systems tasked with keeping track of all mercenaries who enter or exit cryostasis."
|
||||
circuit = /obj/item/circuitboard/robotstoragecontrol
|
||||
circuit = /obj/item/circuitboard/cryopodcontrol
|
||||
|
||||
storage_type = "mercenaries"
|
||||
storage_name = "Merc Oversight Control"
|
||||
|
||||
Reference in New Issue
Block a user