[MIRROR] Make USB cables attached to locked circuits unable to be modified [MDB IGNORE] (#9882)

* Make USB cables attached to locked circuits unable to be modified (#63084)

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Make USB cables attached to locked circuits unable to be modified

Co-authored-by: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-12-05 10:07:43 -05:00
committed by GitHub
co-authored by Mothblocks RandomGamer123
parent d7f14b05de
commit e7a6101af9
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -355,6 +355,10 @@
source.balloon_alert(user, "no circuit inside")
return COMSIG_CANCEL_USB_CABLE_ATTACK
if(attached_circuit.locked)
source.balloon_alert(user, "circuit is locked!")
return COMSIG_CANCEL_USB_CABLE_ATTACK
usb_cable.attached_circuit = attached_circuit
return COMSIG_USB_CABLE_CONNECTED_TO_CIRCUIT
+4
View File
@@ -153,6 +153,10 @@
connecting_cable.balloon_alert(user, "too far away")
return COMSIG_CANCEL_USB_CABLE_ATTACK
if (connecting_cable.attached_circuit.locked)
connecting_cable.balloon_alert(user, "shell is locked!")
return COMSIG_CANCEL_USB_CABLE_ATTACK
usb_cable_ref = WEAKREF(connecting_cable)
attached_circuit = connecting_cable.attached_circuit