]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Thief pacifist (#22932)
authorEd <96445749+TheShuEd@users.noreply.github.com>
Mon, 25 Dec 2023 03:42:48 +0000 (06:42 +0300)
committerGitHub <noreply@github.com>
Mon, 25 Dec 2023 03:42:48 +0000 (20:42 -0700)
* pac

* to settings

* ensuuure me princess

* Update Content.Server/GameTicking/Rules/Components/ThiefRuleComponent.cs

Co-authored-by: faint <46868845+ficcialfaint@users.noreply.github.com>
* Update Content.Server/GameTicking/Rules/ThiefRuleSystem.cs

Co-authored-by: faint <46868845+ficcialfaint@users.noreply.github.com>
---------

Co-authored-by: faint <46868845+ficcialfaint@users.noreply.github.com>
Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs
Content.Server/GameTicking/Rules/Components/ThiefRuleComponent.cs
Content.Server/GameTicking/Rules/ThiefRuleSystem.cs

index 3adb2d5605612a5ea023eb04479e4171deb91962..6840651c57b0d30fa63e55622a2438bd6533a643 100644 (file)
@@ -132,7 +132,7 @@ public sealed partial class AdminVerbSystem
                 if (!_minds.TryGetSession(targetMindComp.Mind, out var session))
                     return;
 
-                _thief.MakeThief(session);
+                _thief.MakeThief(session, false); //Midround add pacific is bad
             },
             Impact = LogImpact.High,
             Message = Loc.GetString("admin-verb-make-thief"),
index 31ea30fc86863b9f26844307560ef6f99e1b5081..a7ad4e2d2038844698566d722fb5ee44e2f1417f 100644 (file)
@@ -12,6 +12,11 @@ namespace Content.Server.GameTicking.Rules.Components;
 [RegisterComponent, Access(typeof(ThiefRuleSystem))]
 public sealed partial class ThiefRuleComponent : Component
 {
+    /// <summary>
+    /// Add a Pacified comp to thieves
+    /// </summary>
+    public bool PacifistThieves = true;
+
     /// <summary>
     /// A chance for this mode to be added to the game.
     /// </summary>
index d0f78887069eb52d2c9396842cfa1a40fd370919..9a447f51d282b2a864c3b9b1815de90d6369084e 100644 (file)
@@ -16,6 +16,7 @@ using System.Linq;
 using Content.Shared.Humanoid;
 using Content.Server.Antag;
 using Robust.Server.Audio;
+using Content.Shared.CombatMode.Pacification;
 
 namespace Content.Server.GameTicking.Rules;
 
@@ -87,11 +88,11 @@ public sealed class ThiefRuleSystem : GameRuleSystem<ThiefRuleComponent>
 
         foreach(var thief in selectedThieves)
         {
-            MakeThief(thief);
+            MakeThief(thief, component.PacifistThieves);
         }
     }
 
-    public bool MakeThief(ICommonSession thief)
+    public bool MakeThief(ICommonSession thief, bool AddPacified)
     {
         var thiefRule = EntityQuery<ThiefRuleComponent>().FirstOrDefault();
         if (thiefRule == null)
@@ -123,6 +124,10 @@ public sealed class ThiefRuleSystem : GameRuleSystem<ThiefRuleComponent>
             PrototypeId = thiefRule.ThiefPrototypeId
         });
 
+        //Add Pacified
+        if (AddPacified)
+            EnsureComp<PacifiedComponent>(mind.OwnedEntity.Value);
+
         // Notificate player about new role assignment
         if (_mindSystem.TryGetSession(mindId, out var session))
         {