[MIRROR] Drastically improved the USB connection for air alarms. Any airlock can now be made into a shell [MDB IGNORE] (#15270)

* Drastically improved the USB connection for air alarms. Any airlock can now be made into a shell (#68632)

The USB connections for air alarms have been improved and now include scrubber control, vent control and the setting of the air alarm mode. Also fixes a bug where the limits were not being properly set.

The scrubber, vent and limit control can be duplicated in the circuit to allow multiple limits/scrubbers/vents to be controlled by one circuit.

Any airlock can be made into a shell during construction by configuring the airlock electronic before insert.

* Drastically improved the USB connection for air alarms. Any airlock can now be made into a shell

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-07-30 00:41:36 +02:00
committed by GitHub
parent f671c7348a
commit fbce7aa40f
16 changed files with 742 additions and 47 deletions
+3 -3
View File
@@ -373,15 +373,15 @@
* Returns a list that can then be added to the return list in get_ui_notices()
* Used by components to list their available columns. Recommended to use at the end of get_ui_notices()
*/
/obj/item/circuit_component/proc/create_table_notices(list/entries)
/obj/item/circuit_component/proc/create_table_notices(list/entries, column_name = "Column", column_name_plural = "Columns")
SHOULD_BE_PURE(TRUE)
SHOULD_NOT_OVERRIDE(TRUE)
. = list()
. += create_ui_notice("Available Columns:", "grey", "question-circle")
. += create_ui_notice("Available [column_name_plural]:", "grey", "question-circle")
for(var/entry in entries)
. += create_ui_notice("Column Name: '[entry]'", "grey", "columns")
. += create_ui_notice("[column_name] Name: '[entry]'", "grey", "columns")
/**
* Called when a circuit component is added to an object with a USB port.
@@ -221,13 +221,13 @@ GLOBAL_LIST_EMPTY_TYPED(integrated_circuits, /obj/item/integrated_circuit)
*/
/obj/item/integrated_circuit/proc/add_component(obj/item/circuit_component/to_add, mob/living/user)
if(to_add.parent)
return
return FALSE
if(SEND_SIGNAL(src, COMSIG_CIRCUIT_ADD_COMPONENT, to_add, user) & COMPONENT_CANCEL_ADD_COMPONENT)
return
return FALSE
if(!to_add.add_to(src))
return
return FALSE
var/success = FALSE
if(user)
@@ -236,7 +236,7 @@ GLOBAL_LIST_EMPTY_TYPED(integrated_circuits, /obj/item/integrated_circuit)
success = to_add.forceMove(src)
if(!success)
return
return FALSE
to_add.rel_x = rand(COMPONENT_MIN_RANDOM_POS, COMPONENT_MAX_RANDOM_POS) - screen_x
to_add.rel_y = rand(COMPONENT_MIN_RANDOM_POS, COMPONENT_MAX_RANDOM_POS) - screen_y
+1 -1
View File
@@ -193,4 +193,4 @@
return
if(result["should_open"])
return COMPONENT_AIRLOCK_SHELL_ALLOW
return COMPONENT_AIRLOCK_SHELL_ALLOW