Skip to content

Commit

Permalink
Revert ThiefRuleSystem again
Browse files Browse the repository at this point in the history
  • Loading branch information
FireNameFN committed Nov 10, 2024
1 parent e8311dc commit 650e5c8
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions Content.Server/GameTicking/Rules/ThiefRuleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Content.Server.GameTicking.Rules.Components;
using Content.Server.Roles;
using Content.Shared.Humanoid;
using Content.Shared.Roles;

namespace Content.Server.GameTicking.Rules;

Expand All @@ -23,7 +22,7 @@ public override void Initialize()
private void AfterAntagSelected(Entity<ThiefRuleComponent> mindId, ref AfterAntagEntitySelectedEvent args)
{
var ent = args.EntityUid;
_antag.SendBriefing(ent, MakeBriefing(ent, args.Def.PrefRoles.Contains("Api")), null, null); // Corvax-Next-Api
_antag.SendBriefing(ent, MakeBriefing(ent), null, null);
}

// Character screen briefing
Expand All @@ -33,26 +32,11 @@ private void OnGetBriefing(Entity<ThiefRoleComponent> role, ref GetBriefingEvent

if (ent is null)
return;

// Corvax-Next-Api-Start
var api = false;

foreach (var id in args.Mind.Comp.MindRoles)
if (TryComp<MindRoleComponent>(id, out var mindRole))
if (mindRole.AntagPrototype == "Api")
api = true;

args.Append(MakeBriefing(ent.Value, api));
// Corvax-Next-Api-End
args.Append(MakeBriefing(ent.Value));
}

private string MakeBriefing(EntityUid ent, bool api) // Corvax-Next-Api
private string MakeBriefing(EntityUid ent)
{
// Corvax-Next-Api-Start
if (api)
return Loc.GetString("api-role-greeting");
// Corvax-Next-Api-End

var isHuman = HasComp<HumanoidAppearanceComponent>(ent);
var briefing = isHuman
? Loc.GetString("thief-role-greeting-human")
Expand Down

0 comments on commit 650e5c8

Please sign in to comment.