From 7ff01fa2fc50011a773e7aa45afdd1b592322747 Mon Sep 17 00:00:00 2001 From: FN Date: Sun, 10 Nov 2024 09:03:44 +0700 Subject: [PATCH] Starts and ends --- .../Administration/Systems/AdminVerbSystem.Antags.cs | 6 ++++-- Content.Server/GameTicking/Rules/ThiefRuleSystem.cs | 8 +++++--- .../Objectives/Components/StealConditionComponent.cs | 3 ++- Content.Server/Objectives/Systems/StealConditionSystem.cs | 3 ++- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs index a39ff1d8ec0..d990f3e3f10 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs @@ -33,9 +33,10 @@ public sealed partial class AdminVerbSystem [ValidatePrototypeId] private const string DefaultThiefRule = "Thief"; - // Corvax-Next-Api + // Corvax-Next-Api-Start [ValidatePrototypeId] private const string DefaultApiRule = "Api"; + // Corvax-Next-Api-End [ValidatePrototypeId] private const string PirateGearId = "PirateGear"; @@ -156,7 +157,7 @@ private void AddAntagVerbs(GetVerbsEvent args) }; args.Verbs.Add(thief); - // Corvax-Next-Api + // Corvax-Next-Api-Start Verb api = new() { Text = Loc.GetString("admin-verb-text-make-api"), @@ -170,5 +171,6 @@ private void AddAntagVerbs(GetVerbsEvent args) Message = Loc.GetString("admin-verb-make-api"), }; args.Verbs.Add(api); + // Corvax-Next-Api-End } } diff --git a/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs b/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs index 06b7226e9cf..3273303a6f9 100644 --- a/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs @@ -34,7 +34,7 @@ private void OnGetBriefing(Entity role, ref GetBriefingEvent if (ent is null) return; - // Corvax-Next-Api + // Corvax-Next-Api-Start var api = false; foreach (var id in args.Mind.Comp.MindRoles) @@ -43,13 +43,15 @@ private void OnGetBriefing(Entity role, ref GetBriefingEvent api = true; args.Append(MakeBriefing(ent.Value, api)); + // Corvax-Next-Api-End } - // Corvax-Next-Api - private string MakeBriefing(EntityUid ent, bool api) + private string MakeBriefing(EntityUid ent, bool api) // Corvax-Next-Api { + // Corvax-Next-Api-Start if (api) return Loc.GetString("api-role-greeting"); + // Corvax-Next-Api-End var isHuman = HasComp(ent); var briefing = isHuman diff --git a/Content.Server/Objectives/Components/StealConditionComponent.cs b/Content.Server/Objectives/Components/StealConditionComponent.cs index fb62c497e8e..4d12ad7fcd6 100644 --- a/Content.Server/Objectives/Components/StealConditionComponent.cs +++ b/Content.Server/Objectives/Components/StealConditionComponent.cs @@ -34,9 +34,10 @@ public sealed partial class StealConditionComponent : Component [DataField] public bool CheckAlive = false; - // Corvax-Next-Api + // Corvax-Next-Api-Start [DataField] public bool CheckHasAi = false; + // Corvax-Next-Api-End /// /// The minimum number of items you need to steal to fulfill a objective diff --git a/Content.Server/Objectives/Systems/StealConditionSystem.cs b/Content.Server/Objectives/Systems/StealConditionSystem.cs index c48635093ec..64025db78a9 100644 --- a/Content.Server/Objectives/Systems/StealConditionSystem.cs +++ b/Content.Server/Objectives/Systems/StealConditionSystem.cs @@ -197,11 +197,12 @@ private int CheckStealTarget(EntityUid entity, StealConditionComponent condition } } - // Corvax-Next-Api + // Corvax-Next-Api-Start if (condition.CheckHasAi) if (TryComp(entity, out var holder)) if (holder.Slot.Item is null) return 0; + // Corvax-Next-Api-End return TryComp(entity, out var stack) ? stack.Count : 1; }