]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Merge branch 'master' into ion-storm-refactor
authorScarKy0 <106310278+ScarKy0@users.noreply.github.com>
Thu, 14 Nov 2024 13:45:55 +0000 (14:45 +0100)
committerGitHub <noreply@github.com>
Thu, 14 Nov 2024 13:45:55 +0000 (14:45 +0100)
1  2 
Content.Server/Silicons/Laws/SiliconLawSystem.cs
Resources/Locale/en-US/interaction/interaction-popup-component.ftl
Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml
Resources/Prototypes/Entities/Mobs/Cyborgs/borg_chassis.yml
Resources/Prototypes/Entities/Mobs/Player/silicon.yml
Resources/Prototypes/GameRules/events.yml

index 27ed6702d6a8ba9814c293a907ecfe8ecf429961,9a361132a5ca7f02eaff669325d6bb6c64f2a368..c2aa20f401c59ca3d0966bbdc921c70853a979d3
@@@ -180,37 -177,10 +179,35 @@@ public sealed class SiliconLawSystem : 
          if (component.AntagonistRole == null || !_mind.TryGetMind(uid, out var mindId, out _))
              return;
  
-         if (_roles.MindHasRole<SubvertedSiliconRoleComponent>(mindId))
-             return;
-         _roles.MindAddRole(mindId, new SubvertedSiliconRoleComponent { PrototypeId = component.AntagonistRole });
+         if (!_roles.MindHasRole<SubvertedSiliconRoleComponent>(mindId))
+             _roles.MindAddRole(mindId, "MindRoleSubvertedSilicon");
      }
  
 +    private void OnStartIonStormedMindAdded(EntityUid uid, StartIonStormedComponent component, MindAddedMessage args)
 +    {
 +        if (HasComp<StartIonStormedComponent>(uid))
 +            EnsureStartIonStormedRole(uid, component);
 +    }
 +
 +    private void OnStartIonStormedMindRemoved(EntityUid uid, StartIonStormedComponent component, MindRemovedMessage args)
 +    {
 +        if (component.AntagonistRole == null)
 +            return;
 +
 +        _roles.MindTryRemoveRole<SubvertedSiliconRoleComponent>(args.Mind);
 +    }
 +
 +    private void EnsureStartIonStormedRole(EntityUid uid, StartIonStormedComponent component)
 +    {
 +        if (component.AntagonistRole == null || !_mind.TryGetMind(uid, out var mindId, out _))
 +            return;
 +
 +        if (_roles.MindHasRole<SubvertedSiliconRoleComponent>(mindId))
 +            return;
 +
 +        _roles.MindAddRole(mindId, new SubvertedSiliconRoleComponent { PrototypeId = component.AntagonistRole });
 +    }
 +
      public SiliconLawset GetLaws(EntityUid uid, SiliconLawBoundComponent? component = null)
      {
          if (!Resolve(uid, ref component))
index 763557e6c91bbf5e845a3128677b4ab115742eea,08218accede474480e45607281027a809106f17a..6718c576a69a7a7dba297aa78fc7d047249775cd
@@@ -35,7 -35,7 +35,8 @@@
      - id: RevenantSpawn
      - id: SleeperAgents
      - id: ZombieOutbreak
 +    - id: DerelictCyborgSpawn
+     - id: LoneOpsSpawn
  
  - type: entity
    id: BaseStationEvent