Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Content.Server/_ES/Masks/ESMaskSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,16 @@ public override void RemoveMask(Entity<MindComponent> mind)

public override void ChangeMask(Entity<MindComponent> mind,
ProtoId<ESMaskPrototype> maskId,
Entity<ESTroupeRuleComponent>? troupe = null)
Entity<ESTroupeRuleComponent>? troupe = null,
bool eraseHistory = false)
{
RemoveMask(mind);
if (eraseHistory)
{
var comp = EnsureComp<ESMaskMemoryComponent>(mind);
if (comp.Masks.Count != 0)
comp.Masks.RemoveAt(comp.Masks.Count - 1);
}
ApplyMask(mind, maskId, troupe);
}
}
Expand Down
6 changes: 3 additions & 3 deletions Content.Shared/_ES/Masks/ESSharedMaskSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ private void GetVerbs(GetVerbsEvent<Verb> args)
{
if (!Mind.TryGetMind(actorComp.PlayerSession.UserId, out var mind))
return;
RemoveMask(mind.Value);
ApplyMask(mind.Value, mask);
ChangeMask(mind.Value, mask, eraseHistory: true);
},
};
args.Verbs.Add(verb);
Expand Down Expand Up @@ -300,7 +299,8 @@ public virtual void ApplyMask(Entity<MindComponent> mind,

public virtual void ChangeMask(Entity<MindComponent> mind,
ProtoId<ESMaskPrototype> maskId,
Entity<ESTroupeRuleComponent>? troupe = null)
Entity<ESTroupeRuleComponent>? troupe = null,
bool eraseHistory = false)
{

}
Expand Down
Loading