diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs index d990f3e3f10..2470b40c29f 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs @@ -1,3 +1,4 @@ +using Content.Server._CorvaxNext.Api; using Content.Server.Administration.Commands; using Content.Server.Antag; using Content.Server.GameTicking.Rules.Components; @@ -165,7 +166,7 @@ private void AddAntagVerbs(GetVerbsEvent args) Icon = new SpriteSpecifier.Rsi(new ResPath("/Textures/Mobs/Silicon/station_ai.rsi"), "ai"), Act = () => { - _antag.ForceMakeAntag(targetPlayer, DefaultApiRule); + _antag.ForceMakeAntag(targetPlayer, DefaultApiRule); }, Impact = LogImpact.High, Message = Loc.GetString("admin-verb-make-api"), diff --git a/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs b/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs index 3273303a6f9..b00ed386363 100644 --- a/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs @@ -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; @@ -23,7 +22,7 @@ public override void Initialize() private void AfterAntagSelected(Entity 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 @@ -33,26 +32,11 @@ private void OnGetBriefing(Entity 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(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(ent); var briefing = isHuman ? Loc.GetString("thief-role-greeting-human") diff --git a/Content.Server/_CorvaxNext/Api/ApiRuleComponent.cs b/Content.Server/_CorvaxNext/Api/ApiRuleComponent.cs new file mode 100644 index 00000000000..901370f570b --- /dev/null +++ b/Content.Server/_CorvaxNext/Api/ApiRuleComponent.cs @@ -0,0 +1,4 @@ +namespace Content.Server._CorvaxNext.Api; + +[RegisterComponent] +public sealed partial class ApiRuleComponent : Component; diff --git a/Content.Server/_CorvaxNext/Api/ApiRuleSystem.cs b/Content.Server/_CorvaxNext/Api/ApiRuleSystem.cs new file mode 100644 index 00000000000..ebb4892e0dd --- /dev/null +++ b/Content.Server/_CorvaxNext/Api/ApiRuleSystem.cs @@ -0,0 +1,28 @@ +using Content.Server.Antag; +using Content.Server.GameTicking.Rules; +using Content.Server.Roles; + +namespace Content.Server._CorvaxNext.Api; + +public sealed class ApiRuleSystem : GameRuleSystem +{ + [Dependency] private readonly AntagSelectionSystem _antag = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnAfterAntagEntitySelected); + SubscribeLocalEvent(OnGetBriefing); + } + + private void OnAfterAntagEntitySelected(EntityUid entity, ApiRuleComponent apiRule, AfterAntagEntitySelectedEvent e) + { + _antag.SendBriefing(e.EntityUid, Loc.GetString("api-role-greeting"), null, null); + } + + private void OnGetBriefing(EntityUid entity, ApiRuleComponent apiRule, GetBriefingEvent e) + { + e.Append(Loc.GetString("api-role-greeting")); + } +} diff --git a/Resources/Audio/_CorvaxNext/Misc/api_greeting.ogg b/Resources/Audio/_CorvaxNext/Misc/api_greeting.ogg new file mode 100644 index 00000000000..4d0ea4a5402 Binary files /dev/null and b/Resources/Audio/_CorvaxNext/Misc/api_greeting.ogg differ diff --git a/Resources/Audio/_CorvaxNext/Misc/attributions.yml b/Resources/Audio/_CorvaxNext/Misc/attributions.yml new file mode 100644 index 00000000000..8bd659f9f90 --- /dev/null +++ b/Resources/Audio/_CorvaxNext/Misc/attributions.yml @@ -0,0 +1,4 @@ +- files: ["api_greeting.ogg"] + license: "CC-BY-4.0" + copyright: "Created by AivelCry using sounds from vengeance-sound.com/samples.php." + source: "https://github.com/FireNameFN/space-station-14-next/blob/503ef7641a977c2e5de70defcf7e2d399fc16a79/Resources/Audio/_CorvaxNext/Misc/api_greeting.ogg" diff --git a/Resources/Locale/ru-RU/_corvaxnext/api.ftl b/Resources/Locale/ru-RU/_corvaxnext/api.ftl index b72182fd1a0..896967b5489 100644 --- a/Resources/Locale/ru-RU/_corvaxnext/api.ftl +++ b/Resources/Locale/ru-RU/_corvaxnext/api.ftl @@ -4,17 +4,16 @@ admin-verb-make-api = Сделать цель агентом похищения api-backpack-category-utilities-name = Набор Утилит api-backpack-category-utilities-description = Набор полезных вещей, содержащий имплантер - хранилища, лазерный кинжал, а также + хранилища, энергокинжал, а также криптографический секвенсор. -ent-ToolboxApi = ящик воровских инструментов неопределённости - .desc = Здесь лежат ваши излюбленные воровские штучки. Осталось вспомнить, какие именно. - -api-round-end-agent-name = агент похищения искусственного интеллекта +api-round-end-agent-name = АПИИ roles-antag-api-objective = Украдите станционный ИИ, действуя скрытно. -objective-condition-api-description = То, зачем я сюда прилетел. Осталось найти интелкарту и пробраться к нему. +objective-issuer-api = [color=#2ed2fd]Агенство[/color] + +objective-condition-api-description = То, зачем вы сюда прилетели. Осталось найти интелкарту и пробраться к нему. steal-target-groups-ai = станционный ИИ, помещённый на интелкарту diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/objects/tools/api_toolbox.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/objects/tools/api_toolbox.ftl new file mode 100644 index 00000000000..b3775495838 --- /dev/null +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/objects/tools/api_toolbox.ftl @@ -0,0 +1,2 @@ +ent-ToolboxApi = ящик воровских инструментов неопределённости + .desc = Здесь лежат ваши излюбленные воровские штучки. Осталось вспомнить, какие именно. diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/objectives/api.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/objectives/api.ftl new file mode 100644 index 00000000000..ff4bfc95838 --- /dev/null +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/objectives/api.ftl @@ -0,0 +1,2 @@ +ent-EscapeApiShuttleObjective = Улететь на Центком живым и свободным. + .desc = Вы ещё нужны агенству. Не дайте себя арестовать. diff --git a/Resources/Prototypes/_CorvaxNext/GameRules/api.yml b/Resources/Prototypes/_CorvaxNext/GameRules/api.yml index 19aa955c30c..dd134d67e90 100644 --- a/Resources/Prototypes/_CorvaxNext/GameRules/api.yml +++ b/Resources/Prototypes/_CorvaxNext/GameRules/api.yml @@ -2,10 +2,10 @@ parent: BaseGameRule id: Api components: - - type: ThiefRule + - type: ApiRule - type: AntagObjectives objectives: - - EscapeThiefShuttleObjective + - EscapeApiShuttleObjective - AiStealObjective - type: AntagSelection agentName: api-round-end-agent-name @@ -17,9 +17,7 @@ allowNonHumans: true multiAntagSetting: NotExclusive startingGear: ApiGear -# components: # Corvax-MRP -# - type: Pacified mindRoles: - MindRoleApi briefing: - sound: "/Audio/Misc/thief_greeting.ogg" + sound: "/Audio/_CorvaxNext/Misc/api_greeting.ogg" diff --git a/Resources/Prototypes/_CorvaxNext/Objectives/api.yml b/Resources/Prototypes/_CorvaxNext/Objectives/api.yml index 862195a1702..c521191acd2 100644 --- a/Resources/Prototypes/_CorvaxNext/Objectives/api.yml +++ b/Resources/Prototypes/_CorvaxNext/Objectives/api.yml @@ -4,7 +4,7 @@ id: BaseApiObjective components: - type: Objective - issuer: objective-issuer-thief + issuer: objective-issuer-api - type: RoleRequirement roles: mindRoles: @@ -29,3 +29,16 @@ checkHasAi: true - type: Objective difficulty: 1 + +- type: entity + parent: [BaseApiObjective, BaseLivingObjective] + id: EscapeApiShuttleObjective + name: Escape to centcomm alive and unrestrained. + description: You don't want your illegal activities to be discovered by anyone, do you? + components: + - type: Objective + difficulty: 1.3 + icon: + sprite: Structures/Furniture/chairs.rsi + state: shuttle + - type: EscapeShuttleCondition