]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Prevent borgs from being able to be briefly toggled off. (#32485)
authorBramvanZijp <56019239+BramvanZijp@users.noreply.github.com>
Tue, 1 Oct 2024 15:13:59 +0000 (17:13 +0200)
committerGitHub <noreply@github.com>
Tue, 1 Oct 2024 15:13:59 +0000 (01:13 +1000)
* Prevent borgs from being able to be briefly toggled off.

* Use the pre-existing component instead of making an unneccesary duplicate.

Content.Shared/Item/ItemToggle/ItemToggleSystem.cs
Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml

index 98029f97d5f6ecc6b89a7cb53fbb90375348bd94..d5bbaac12c330eaff4530f275b9a430100b21c33 100644 (file)
@@ -71,7 +71,7 @@ public sealed class ItemToggleSystem : EntitySystem
 
     private void OnActivateVerb(Entity<ItemToggleComponent> ent, ref GetVerbsEvent<ActivationVerb> args)
     {
-        if (!args.CanAccess || !args.CanInteract)
+        if (!args.CanAccess || !args.CanInteract || !ent.Comp.OnActivate)
             return;
 
         var user = args.User;
index 955ddfd2e3e2cb89f68d7991f0ede1f2e31bd4c3..54bd58af78f3644469a09f2d38b073d637f5404e 100644 (file)
     cellSlotId: cell_slot
     fitsInCharger: true
   - type: ItemToggle
+    onActivate: false # You should not be able to turn off a borg temporarily.
     activated: false # gets activated when a mind is added
     onUse: false # no item-borg toggling sorry
   - type: ItemTogglePointLight