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>
This commit is contained in:
Ed
2023-12-25 06:42:48 +03:00
committed by GitHub
parent 52532e4075
commit 78354052ea
3 changed files with 13 additions and 3 deletions

View 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))
{