Fixed being able to insert infinitely many components into a shell. Fixes being able to view the shell's circuit in a locked shell. (#59962)

This commit is contained in:
Watermelon914
2021-07-03 14:59:38 -03:00
committed by GitHub
parent b54bffe24a
commit ebac974568
2 changed files with 18 additions and 2 deletions
@@ -29,6 +29,9 @@
/// Whether the integrated circuit is on or not. Handled by the shell.
var/on = FALSE
/// Whether the integrated circuit is locked or not. Handled by the shell.
var/locked = FALSE
/// The ID that is authorized to unlock/lock the shell so that the circuit can/cannot be removed.
var/datum/weakref/owner_id
@@ -262,6 +265,11 @@
return shell
return ..()
/obj/item/integrated_circuit/can_interact(mob/user)
if(locked)
return FALSE
return ..()
/obj/item/integrated_circuit/ui_state(mob/user)
if(!shell)
return GLOB.hands_state