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:
@@ -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"),
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user