From: JCGWE30 <70826117+JCGWE30@users.noreply.github.com> Date: Sat, 10 May 2025 23:35:27 +0000 (-0500) Subject: Dragon Direction Briefing Fixed (#37181) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=29147edabde8e1a9c79badb2b2b6d30b768bf078;p=space-station-14.git Dragon Direction Briefing Fixed (#37181) * All Fixed Up * Remove Log Manager * Updated Conventions * Typo Fix --- diff --git a/Content.Server/GameTicking/Rules/DragonRuleSystem.cs b/Content.Server/GameTicking/Rules/DragonRuleSystem.cs index 96021e6123..de13218568 100644 --- a/Content.Server/GameTicking/Rules/DragonRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/DragonRuleSystem.cs @@ -1,7 +1,11 @@ using Content.Server.Antag; +using Content.Server.Dragon; using Content.Server.GameTicking.Rules.Components; +using Content.Server.Mind; +using Content.Server.Roles; using Content.Server.Station.Components; using Content.Server.Station.Systems; +using Content.Shared.CharacterInfo; using Content.Shared.Localizations; using Robust.Server.GameObjects; @@ -12,16 +16,37 @@ public sealed class DragonRuleSystem : GameRuleSystem [Dependency] private readonly TransformSystem _transform = default!; [Dependency] private readonly AntagSelectionSystem _antag = default!; [Dependency] private readonly StationSystem _station = default!; + [Dependency] private readonly RoleSystem _roleSystem = default!; + [Dependency] private readonly MindSystem _mind = default!; public override void Initialize() { base.Initialize(); SubscribeLocalEvent(AfterAntagEntitySelected); + SubscribeLocalEvent(UpdateBriefing); + } + + private void UpdateBriefing(Entity entity, ref GetBriefingEvent args) + { + var ent = args.Mind.Comp.OwnedEntity; + + if(ent is null) + return; + + args.Append(MakeBriefing(ent.Value)); } private void AfterAntagEntitySelected(Entity ent, ref AfterAntagEntitySelectedEvent args) { + if (!_mind.TryGetMind(args.EntityUid, out var mindId, out var mind)) + return; + + _roleSystem.MindHasRole(mindId, out var dragonRole); + + if(dragonRole is null) + return; + _antag.SendBriefing(args.EntityUid, MakeBriefing(args.EntityUid), null, null); } diff --git a/Resources/Prototypes/Roles/MindRoles/mind_roles.yml b/Resources/Prototypes/Roles/MindRoles/mind_roles.yml index 687b7e17bf..79223ed67d 100644 --- a/Resources/Prototypes/Roles/MindRoles/mind_roles.yml +++ b/Resources/Prototypes/Roles/MindRoles/mind_roles.yml @@ -144,8 +144,6 @@ subtype: role-subtype-dragon exclusiveAntag: true - type: DragonRole - - type: RoleBriefing - briefing: dragon-role-briefing # Ninja - type: entity