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

* 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)

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

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-07-03 22:25:18 +01:00
committed by GitHub
co-authored by Watermelon914
parent f2341fd2b5
commit 926f3a0360
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