From: Ed <96445749+TheShuEd@users.noreply.github.com>
Date: Mon, 25 Dec 2023 03:42:48 +0000 (+0300)
Subject: Thief pacifist (#22932)
X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=78354052eae0231e2d41715c0528f08ec29d3111;p=space-station-14.git
Thief pacifist (#22932)
* 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>
---
diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs
index 3adb2d5605..6840651c57 100644
--- a/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs
+++ b/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs
@@ -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"),
diff --git a/Content.Server/GameTicking/Rules/Components/ThiefRuleComponent.cs b/Content.Server/GameTicking/Rules/Components/ThiefRuleComponent.cs
index 31ea30fc86..a7ad4e2d20 100644
--- a/Content.Server/GameTicking/Rules/Components/ThiefRuleComponent.cs
+++ b/Content.Server/GameTicking/Rules/Components/ThiefRuleComponent.cs
@@ -12,6 +12,11 @@ namespace Content.Server.GameTicking.Rules.Components;
[RegisterComponent, Access(typeof(ThiefRuleSystem))]
public sealed partial class ThiefRuleComponent : Component
{
+ ///
+ /// Add a Pacified comp to thieves
+ ///
+ public bool PacifistThieves = true;
+
///
/// A chance for this mode to be added to the game.
///
diff --git a/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs b/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs
index d0f7888706..9a447f51d2 100644
--- a/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs
+++ b/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs
@@ -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
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().FirstOrDefault();
if (thiefRule == null)
@@ -123,6 +124,10 @@ public sealed class ThiefRuleSystem : GameRuleSystem
PrototypeId = thiefRule.ThiefPrototypeId
});
+ //Add Pacified
+ if (AddPacified)
+ EnsureComp(mind.OwnedEntity.Value);
+
// Notificate player about new role assignment
if (_mindSystem.TryGetSession(mindId, out var session))
{