From 88bbe840617b601dad3aa226283e5549c728fc9c Mon Sep 17 00:00:00 2001 From: FN Date: Sat, 9 Nov 2024 13:44:07 +0700 Subject: [PATCH 1/9] First commit --- .../Systems/AdminVerbSystem.Antags.cs | 19 ++++++++++++ .../GameTicking/Rules/ThiefRuleSystem.cs | 20 ++++++++++-- .../Components/StealConditionComponent.cs | 4 +++ .../Systems/StealConditionSystem.cs | 7 +++++ Resources/Locale/ru-RU/_CorvaxNext/api.ftl | 21 +++++++++++++ .../Entities/Mobs/Player/silicon.yml | 2 ++ .../_CorvaxNext/Catalog/api_toolbox_sets.yml | 11 +++++++ .../Entities/Objects/Tools/api_toolbox.yml | 21 +++++++++++++ .../Prototypes/_CorvaxNext/GameRules/api.yml | 29 +++++++++++++++++ .../Objectives/ai_steal_target_group.yml | 6 ++++ .../Prototypes/_CorvaxNext/Objectives/api.yml | 31 +++++++++++++++++++ .../Objectives/api_objective_groups.yml | 9 ++++++ .../_CorvaxNext/Roles/Antags/api.yml | 18 +++++++++++ .../Roles/MindRoles/api_mind_role.yml | 10 ++++++ 14 files changed, 205 insertions(+), 3 deletions(-) create mode 100644 Resources/Locale/ru-RU/_CorvaxNext/api.ftl create mode 100644 Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml create mode 100644 Resources/Prototypes/_CorvaxNext/Entities/Objects/Tools/api_toolbox.yml create mode 100644 Resources/Prototypes/_CorvaxNext/GameRules/api.yml create mode 100644 Resources/Prototypes/_CorvaxNext/Objectives/ai_steal_target_group.yml create mode 100644 Resources/Prototypes/_CorvaxNext/Objectives/api.yml create mode 100644 Resources/Prototypes/_CorvaxNext/Objectives/api_objective_groups.yml create mode 100644 Resources/Prototypes/_CorvaxNext/Roles/Antags/api.yml create mode 100644 Resources/Prototypes/_CorvaxNext/Roles/MindRoles/api_mind_role.yml diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs index 28918e960e5..a39ff1d8ec0 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs @@ -33,6 +33,10 @@ public sealed partial class AdminVerbSystem [ValidatePrototypeId] private const string DefaultThiefRule = "Thief"; + // Corvax-Next-Api + [ValidatePrototypeId] + private const string DefaultApiRule = "Api"; + [ValidatePrototypeId] private const string PirateGearId = "PirateGear"; @@ -151,5 +155,20 @@ private void AddAntagVerbs(GetVerbsEvent args) Message = Loc.GetString("admin-verb-make-thief"), }; args.Verbs.Add(thief); + + // Corvax-Next-Api + Verb api = new() + { + Text = Loc.GetString("admin-verb-text-make-api"), + Category = VerbCategory.Antag, + Icon = new SpriteSpecifier.Rsi(new ResPath("/Textures/Mobs/Silicon/station_ai.rsi"), "ai"), + Act = () => + { + _antag.ForceMakeAntag(targetPlayer, DefaultApiRule); + }, + Impact = LogImpact.High, + Message = Loc.GetString("admin-verb-make-api"), + }; + args.Verbs.Add(api); } } diff --git a/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs b/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs index b00ed386363..06b7226e9cf 100644 --- a/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/ThiefRuleSystem.cs @@ -2,6 +2,7 @@ using Content.Server.GameTicking.Rules.Components; using Content.Server.Roles; using Content.Shared.Humanoid; +using Content.Shared.Roles; namespace Content.Server.GameTicking.Rules; @@ -22,7 +23,7 @@ public override void Initialize() private void AfterAntagSelected(Entity mindId, ref AfterAntagEntitySelectedEvent args) { var ent = args.EntityUid; - _antag.SendBriefing(ent, MakeBriefing(ent), null, null); + _antag.SendBriefing(ent, MakeBriefing(ent, args.Def.PrefRoles.Contains("Api")), null, null); // Corvax-Next-Api } // Character screen briefing @@ -32,11 +33,24 @@ private void OnGetBriefing(Entity role, ref GetBriefingEvent if (ent is null) return; - args.Append(MakeBriefing(ent.Value)); + + // Corvax-Next-Api + 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)); } - private string MakeBriefing(EntityUid ent) + // Corvax-Next-Api + private string MakeBriefing(EntityUid ent, bool api) { + if (api) + return Loc.GetString("api-role-greeting"); + var isHuman = HasComp(ent); var briefing = isHuman ? Loc.GetString("thief-role-greeting-human") diff --git a/Content.Server/Objectives/Components/StealConditionComponent.cs b/Content.Server/Objectives/Components/StealConditionComponent.cs index cdade8cc8d7..fb62c497e8e 100644 --- a/Content.Server/Objectives/Components/StealConditionComponent.cs +++ b/Content.Server/Objectives/Components/StealConditionComponent.cs @@ -34,6 +34,10 @@ public sealed partial class StealConditionComponent : Component [DataField] public bool CheckAlive = false; + // Corvax-Next-Api + [DataField] + public bool CheckHasAi = false; + /// /// 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 48814e7ba3c..c48635093ec 100644 --- a/Content.Server/Objectives/Systems/StealConditionSystem.cs +++ b/Content.Server/Objectives/Systems/StealConditionSystem.cs @@ -13,6 +13,7 @@ using Content.Shared.Mobs.Components; using Content.Shared.Movement.Pulling.Components; using Content.Shared.Stacks; +using Content.Shared.Silicons.StationAi; namespace Content.Server.Objectives.Systems; @@ -196,6 +197,12 @@ private int CheckStealTarget(EntityUid entity, StealConditionComponent condition } } + // Corvax-Next-Api + if (condition.CheckHasAi) + if (TryComp(entity, out var holder)) + if (holder.Slot.Item is null) + return 0; + return TryComp(entity, out var stack) ? stack.Count : 1; } } diff --git a/Resources/Locale/ru-RU/_CorvaxNext/api.ftl b/Resources/Locale/ru-RU/_CorvaxNext/api.ftl new file mode 100644 index 00000000000..28cd2d0f889 --- /dev/null +++ b/Resources/Locale/ru-RU/_CorvaxNext/api.ftl @@ -0,0 +1,21 @@ +admin-verb-text-make-api = Сделать АПИИ +admin-verb-make-api = Сделать цель агентом похищения искуственного интеллекта. + +api-backpack-category-utilities-name = Набор Утилит +api-backpack-category-utilities-description = Набор полезных вещей, содержащий имплантеры хранилища и голопаразита, а также лазерный кинжал. + +ent-ToolboxApi = ящик воровских инструментов неопределённости + .desc = Здесь лежат ваши излюбленные воровские штучки. Осталось вспомнить, какие именно. + +api-round-end-agent-name = агент похищения искуственного интеллекта + +roles-antag-api-objective = Украдите станционный ИИ, действуя скрытно. + +objective-condition-api-description = То, зачем я сюда прилетел. Осталось найти интелкарту и пробраться к нему. + +steal-target-groups-ai = станционный ИИ, помещённый на интелкарту + +api-role-greeting = + Вы агент похищения искуственного интеллекта, также известный как АПИИ. + У вас здесь одна цель: украсть станционный ИИ с помощью интелкарты. + Старайтесь действовать скрытно, вы это любите. diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index 98cfd5a8a12..9022a5e229c 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -301,6 +301,8 @@ unshaded: Empty: { state: empty } Occupied: { state: full } + - type: StealTarget # Corvax-Next-Api + stealGroup: Ai - type: entity id: PlayerStationAiEmpty diff --git a/Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml b/Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml new file mode 100644 index 00000000000..7636bed77c7 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml @@ -0,0 +1,11 @@ +- type: thiefBackpackSet + id: UtilitiesSet + name: api-backpack-category-utilities-name + description: api-backpack-category-utilities-description + sprite: + sprite: /Textures/Objects/Tools/Toolboxes/toolbox_syn.rsi + state: icon + content: + - StorageImplanter + - BoxHoloparasite + - EnergyDaggerBox diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Objects/Tools/api_toolbox.yml b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Tools/api_toolbox.yml new file mode 100644 index 00000000000..9848ab84792 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Tools/api_toolbox.yml @@ -0,0 +1,21 @@ +- type: entity + id: ToolboxApi + name: api undetermined toolbox + description: This is where your favorite api's supplies lie. Try to remember which ones. + parent: [ BaseItem, BaseMinorContraband ] + components: + - type: Sprite + sprite: Objects/Tools/Toolboxes/toolbox_thief.rsi + state: icon + - type: ThiefUndeterminedBackpack + maxSelectedSets: 3 + possibleSets: + - ChameleonSet + - SyndieSet + - UtilitiesSet + - type: ActivatableUI + key: enum.ThiefBackpackUIKey.Key + - type: UserInterface + interfaces: + enum.ThiefBackpackUIKey.Key: + type: ThiefBackpackBoundUserInterface diff --git a/Resources/Prototypes/_CorvaxNext/GameRules/api.yml b/Resources/Prototypes/_CorvaxNext/GameRules/api.yml new file mode 100644 index 00000000000..ff361c53751 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/GameRules/api.yml @@ -0,0 +1,29 @@ +- type: entity + parent: BaseGameRule + id: Api + components: + - type: ThiefRule + - type: AntagObjectives + objectives: + - EscapeThiefShuttleObjective + - type: AntagRandomObjectives + sets: + - groups: ApiObjectiveGroups + maxPicks: 1 + maxDifficulty: 1 + - type: AntagSelection + agentName: api-round-end-agent-name + definitions: + - prefRoles: [ Api ] + max: 1 + playerRatio: 15 + lateJoinAdditional: true + allowNonHumans: true + multiAntagSetting: NotExclusive + startingGear: ApiGear +# components: # Corvax-MRP +# - type: Pacified + mindRoles: + - MindRoleApi + briefing: + sound: "/Audio/Misc/thief_greeting.ogg" diff --git a/Resources/Prototypes/_CorvaxNext/Objectives/ai_steal_target_group.yml b/Resources/Prototypes/_CorvaxNext/Objectives/ai_steal_target_group.yml new file mode 100644 index 00000000000..df26a8b227f --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Objectives/ai_steal_target_group.yml @@ -0,0 +1,6 @@ +- type: stealTargetGroup + id: Ai + name: steal-target-groups-ai + sprite: + sprite: Mobs/Silicon/station_ai.rsi + state: ai diff --git a/Resources/Prototypes/_CorvaxNext/Objectives/api.yml b/Resources/Prototypes/_CorvaxNext/Objectives/api.yml new file mode 100644 index 00000000000..862195a1702 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Objectives/api.yml @@ -0,0 +1,31 @@ +- type: entity + abstract: true + parent: BaseObjective + id: BaseApiObjective + components: + - type: Objective + issuer: objective-issuer-thief + - type: RoleRequirement + roles: + mindRoles: + - ThiefRole + +- type: entity + abstract: true + parent: [BaseApiObjective, BaseStealObjective] + id: BaseApiStealObjective + components: + - type: StealCondition + verifyMapExistence: false + descriptionText: objective-condition-api-description + checkStealAreas: true + +- type: entity + parent: BaseApiStealObjective + id: AiStealObjective + components: + - type: StealCondition + stealGroup: Ai + checkHasAi: true + - type: Objective + difficulty: 1 diff --git a/Resources/Prototypes/_CorvaxNext/Objectives/api_objective_groups.yml b/Resources/Prototypes/_CorvaxNext/Objectives/api_objective_groups.yml new file mode 100644 index 00000000000..5ec96791a28 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Objectives/api_objective_groups.yml @@ -0,0 +1,9 @@ +- type: weightedRandom + id: ApiObjectiveGroups + weights: + ApiObjectiveGroupAi: 1 + +- type: weightedRandom + id: ApiObjectiveGroupAi + weights: + AiStealObjective: 1 diff --git a/Resources/Prototypes/_CorvaxNext/Roles/Antags/api.yml b/Resources/Prototypes/_CorvaxNext/Roles/Antags/api.yml new file mode 100644 index 00000000000..0d76b8fb684 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Roles/Antags/api.yml @@ -0,0 +1,18 @@ +- type: antag + id: Api + name: roles-antag-thief-name + antagonist: true + setPreference: true + objective: roles-antag-api-objective + guides: [ Thieves ] + requirements: + - !type:OverallPlaytimeRequirement + time: 108000 # 30h # Corvax-RoleTime + +- type: startingGear + id: ApiGear + storage: + back: + - ToolboxApi + - ClothingHandsChameleonThief + - ThiefBeacon diff --git a/Resources/Prototypes/_CorvaxNext/Roles/MindRoles/api_mind_role.yml b/Resources/Prototypes/_CorvaxNext/Roles/MindRoles/api_mind_role.yml new file mode 100644 index 00000000000..9ee673e979f --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Roles/MindRoles/api_mind_role.yml @@ -0,0 +1,10 @@ +# Thief +- type: entity + parent: BaseMindRoleAntag + id: MindRoleApi + name: Api Role +# description: mind-role-api-description + components: + - type: MindRole + antagPrototype: Api + - type: ThiefRole From 3531d2fe08b143a6b424b63a83fc25925b42ea43 Mon Sep 17 00:00:00 2001 From: FN Date: Sat, 9 Nov 2024 15:40:09 +0700 Subject: [PATCH 2/9] Improvements --- Resources/Prototypes/_CorvaxNext/GameRules/api.yml | 6 +----- .../_CorvaxNext/Objectives/api_objective_groups.yml | 9 --------- Resources/Prototypes/_CorvaxNext/Roles/Antags/api.yml | 2 +- 3 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 Resources/Prototypes/_CorvaxNext/Objectives/api_objective_groups.yml diff --git a/Resources/Prototypes/_CorvaxNext/GameRules/api.yml b/Resources/Prototypes/_CorvaxNext/GameRules/api.yml index ff361c53751..19aa955c30c 100644 --- a/Resources/Prototypes/_CorvaxNext/GameRules/api.yml +++ b/Resources/Prototypes/_CorvaxNext/GameRules/api.yml @@ -6,11 +6,7 @@ - type: AntagObjectives objectives: - EscapeThiefShuttleObjective - - type: AntagRandomObjectives - sets: - - groups: ApiObjectiveGroups - maxPicks: 1 - maxDifficulty: 1 + - AiStealObjective - type: AntagSelection agentName: api-round-end-agent-name definitions: diff --git a/Resources/Prototypes/_CorvaxNext/Objectives/api_objective_groups.yml b/Resources/Prototypes/_CorvaxNext/Objectives/api_objective_groups.yml deleted file mode 100644 index 5ec96791a28..00000000000 --- a/Resources/Prototypes/_CorvaxNext/Objectives/api_objective_groups.yml +++ /dev/null @@ -1,9 +0,0 @@ -- type: weightedRandom - id: ApiObjectiveGroups - weights: - ApiObjectiveGroupAi: 1 - -- type: weightedRandom - id: ApiObjectiveGroupAi - weights: - AiStealObjective: 1 diff --git a/Resources/Prototypes/_CorvaxNext/Roles/Antags/api.yml b/Resources/Prototypes/_CorvaxNext/Roles/Antags/api.yml index 0d76b8fb684..7846ba83edb 100644 --- a/Resources/Prototypes/_CorvaxNext/Roles/Antags/api.yml +++ b/Resources/Prototypes/_CorvaxNext/Roles/Antags/api.yml @@ -2,7 +2,7 @@ id: Api name: roles-antag-thief-name antagonist: true - setPreference: true + setPreference: false objective: roles-antag-api-objective guides: [ Thieves ] requirements: From d6f9b6c230115a5c3e4b29ec872360002aa1eeaa Mon Sep 17 00:00:00 2001 From: FN Date: Sat, 9 Nov 2024 16:15:28 +0700 Subject: [PATCH 3/9] Fix --- Resources/Locale/ru-RU/_CorvaxNext/api.ftl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Resources/Locale/ru-RU/_CorvaxNext/api.ftl b/Resources/Locale/ru-RU/_CorvaxNext/api.ftl index 28cd2d0f889..cd5d37ef893 100644 --- a/Resources/Locale/ru-RU/_CorvaxNext/api.ftl +++ b/Resources/Locale/ru-RU/_CorvaxNext/api.ftl @@ -2,7 +2,9 @@ admin-verb-text-make-api = Сделать АПИИ admin-verb-make-api = Сделать цель агентом похищения искуственного интеллекта. api-backpack-category-utilities-name = Набор Утилит -api-backpack-category-utilities-description = Набор полезных вещей, содержащий имплантеры хранилища и голопаразита, а также лазерный кинжал. +api-backpack-category-utilities-description = + Набор полезных вещей, содержащий имплантеры + хранилища и голопаразита, а также лазерный кинжал. ent-ToolboxApi = ящик воровских инструментов неопределённости .desc = Здесь лежат ваши излюбленные воровские штучки. Осталось вспомнить, какие именно. From 5efb452e66a04af18de244175d0f6dd7331c0215 Mon Sep 17 00:00:00 2001 From: FN Date: Sun, 10 Nov 2024 06:26:26 +0700 Subject: [PATCH 4/9] Removed holo --- Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml b/Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml index 7636bed77c7..fd08001b4e3 100644 --- a/Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml +++ b/Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml @@ -7,5 +7,4 @@ state: icon content: - StorageImplanter - - BoxHoloparasite - EnergyDaggerBox From 3ed59236f871ccca4878cd824091d09add763e44 Mon Sep 17 00:00:00 2001 From: FN Date: Sun, 10 Nov 2024 08:44:09 +0700 Subject: [PATCH 5/9] Edited items --- Resources/Locale/ru-RU/_CorvaxNext/api.ftl | 11 ++++++----- .../_CorvaxNext/Catalog/api_toolbox_sets.yml | 1 + .../Entities/Objects/Tools/api_toolbox.yml | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Resources/Locale/ru-RU/_CorvaxNext/api.ftl b/Resources/Locale/ru-RU/_CorvaxNext/api.ftl index cd5d37ef893..b72182fd1a0 100644 --- a/Resources/Locale/ru-RU/_CorvaxNext/api.ftl +++ b/Resources/Locale/ru-RU/_CorvaxNext/api.ftl @@ -1,15 +1,16 @@ admin-verb-text-make-api = Сделать АПИИ -admin-verb-make-api = Сделать цель агентом похищения искуственного интеллекта. +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 = Украдите станционный ИИ, действуя скрытно. @@ -18,6 +19,6 @@ objective-condition-api-description = То, зачем я сюда прилет steal-target-groups-ai = станционный ИИ, помещённый на интелкарту api-role-greeting = - Вы агент похищения искуственного интеллекта, также известный как АПИИ. + Вы агент похищения искусственного интеллекта, также известный как АПИИ. У вас здесь одна цель: украсть станционный ИИ с помощью интелкарты. Старайтесь действовать скрытно, вы это любите. diff --git a/Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml b/Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml index fd08001b4e3..800894d79d4 100644 --- a/Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml +++ b/Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml @@ -8,3 +8,4 @@ content: - StorageImplanter - EnergyDaggerBox + - Emag diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Objects/Tools/api_toolbox.yml b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Tools/api_toolbox.yml index 9848ab84792..52f3163d810 100644 --- a/Resources/Prototypes/_CorvaxNext/Entities/Objects/Tools/api_toolbox.yml +++ b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Tools/api_toolbox.yml @@ -10,8 +10,8 @@ - type: ThiefUndeterminedBackpack maxSelectedSets: 3 possibleSets: + - CommunicatorSet - ChameleonSet - - SyndieSet - UtilitiesSet - type: ActivatableUI key: enum.ThiefBackpackUIKey.Key From 7ff01fa2fc50011a773e7aa45afdd1b592322747 Mon Sep 17 00:00:00 2001 From: FN Date: Sun, 10 Nov 2024 09:03:44 +0700 Subject: [PATCH 6/9] 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; } From a5aba2b8f72f4a02e46f5387e43ba6160740119f Mon Sep 17 00:00:00 2001 From: FN Date: Sun, 10 Nov 2024 09:09:02 +0700 Subject: [PATCH 7/9] _corvaxnext --- .../en-US/_corvaxnext/chat/highlights.ftl | 57 +++++++++++++++++++ Resources/Locale/ru-RU/_corvaxnext/api.ftl | 24 ++++++++ .../ru-RU/_corvaxnext/chat/highlights.ftl | 57 +++++++++++++++++++ 3 files changed, 138 insertions(+) create mode 100644 Resources/Locale/en-US/_corvaxnext/chat/highlights.ftl create mode 100644 Resources/Locale/ru-RU/_corvaxnext/api.ftl create mode 100644 Resources/Locale/ru-RU/_corvaxnext/chat/highlights.ftl diff --git a/Resources/Locale/en-US/_corvaxnext/chat/highlights.ftl b/Resources/Locale/en-US/_corvaxnext/chat/highlights.ftl new file mode 100644 index 00000000000..f3fddfe7288 --- /dev/null +++ b/Resources/Locale/en-US/_corvaxnext/chat/highlights.ftl @@ -0,0 +1,57 @@ +# Command +highlights-captain = Captain, "Cap", Command +highlights-head-of-personnel = Head Of Personnel, "HoP", Service, Command +highlights-chief-engineer = Chief Engineer, "CE", Engineering, Engineer, "Engi", Command +highlights-chief-medical-officer = Chief Medical Officer, "CMO", MedBay, "Med", Command +highlights-head-of-security = Head of Security, "HoS", Security, "Sec", Command +highlights-quartermaster = Quartermaster, "QM", Cargo, Command +highlights-research-director = Research Director, "RD", Science, "Sci", Command + +# Security +highlights-detective = Detective, "Det", Security, "Sec" +highlights-security-cadet = Security Cadet, Cadet, Security, "Sec" +highlights-security-officer = Security Officer, Secoff, Officer, Security, "Sec" +highlights-warden = Warden, "Ward", Security, "Sec" + +# Cargo +highlights-cargo-technician = Cargo Technician, Cargo Tech, Cargo +highlights-salvage-specialist = Salvage Specialist, Salvager, Salvage, "Salv", Miner + +# Engineering +highlights-atmospheric-technician = Atmospheric Technician, Atmos tech, Atmospheric, Atmos +highlights-station-engineer = Station Engineer, Engineering, Engineer, "Engi" +highlights-technical-assistant = Technical Assistant, Tech Assistant, Engineering, Engineer, "Engi" + +# Medical +highlights-chemist = Chemist, Chemistry, MedBay +highlights-medical-doctor = Medical Doctor, Doctor, "Doc", MedBay, "Med" +highlights-medical-intern = Medical Intern, Intern, MedBay, "Med" +highlights-paramedic = Paramedic, "Para", MedBay, "Med" + +# Science +highlights-scientist = Scientist, Science, "Sci" +highlights-research-assistant = Research Assistant, Science, "Sci" + +# Civilian +highlights-bartender = Bartender, Barkeeper, Barkeep, "Bar" +highlights-botanist = Botanist, Botany, Hydroponics +highlights-chaplain = Chaplain, "Chap", Chapel +highlights-chef = Chef, "Cook", Kitchen +highlights-clown = Clown, Jester +highlights-janitor = Janitor, "Jani" +highlights-lawyer = Lawyer, Attorney +highlights-librarian = Librarian, Library +highlights-mime = Mime +highlights-passenger = Passenger +highlights-service-worker = Service Worker + +# Station-specific +highlights-boxer = Boxer +highlights-reporter = Reporter, Journalist +highlights-zookeeper = Zookeeper +highlights-psychologist = Psychologist, Psychology + +# Silicon +highlights-personal-ai = Personal AI, "pAI" +highlights-cyborg = Cyborg, Borg +highlights-station-ai = Station AI, "AI" \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_corvaxnext/api.ftl b/Resources/Locale/ru-RU/_corvaxnext/api.ftl new file mode 100644 index 00000000000..b72182fd1a0 --- /dev/null +++ b/Resources/Locale/ru-RU/_corvaxnext/api.ftl @@ -0,0 +1,24 @@ +admin-verb-text-make-api = Сделать АПИИ +admin-verb-make-api = Сделать цель агентом похищения искусственного интеллекта. + +api-backpack-category-utilities-name = Набор Утилит +api-backpack-category-utilities-description = + Набор полезных вещей, содержащий имплантер + хранилища, лазерный кинжал, а также + криптографический секвенсор. + +ent-ToolboxApi = ящик воровских инструментов неопределённости + .desc = Здесь лежат ваши излюбленные воровские штучки. Осталось вспомнить, какие именно. + +api-round-end-agent-name = агент похищения искусственного интеллекта + +roles-antag-api-objective = Украдите станционный ИИ, действуя скрытно. + +objective-condition-api-description = То, зачем я сюда прилетел. Осталось найти интелкарту и пробраться к нему. + +steal-target-groups-ai = станционный ИИ, помещённый на интелкарту + +api-role-greeting = + Вы агент похищения искусственного интеллекта, также известный как АПИИ. + У вас здесь одна цель: украсть станционный ИИ с помощью интелкарты. + Старайтесь действовать скрытно, вы это любите. diff --git a/Resources/Locale/ru-RU/_corvaxnext/chat/highlights.ftl b/Resources/Locale/ru-RU/_corvaxnext/chat/highlights.ftl new file mode 100644 index 00000000000..61119deccb8 --- /dev/null +++ b/Resources/Locale/ru-RU/_corvaxnext/chat/highlights.ftl @@ -0,0 +1,57 @@ +# Командование +highlights-captain = Капитан, "Кэп", Командование +highlights-head-of-personnel = Глава персонала, "ГП", Сервис, Командование +highlights-chief-engineer = Старший инженер, "СИ", Инженер, "Инж", Командование +highlights-chief-medical-officer = Главный врач, "ГВ", Медицинский, "Мед", Командование +highlights-head-of-security = Глава Службы Безопасности, "ГСБ", Безопасности, "СБ", Командование +highlights-quartermaster = Квартирмейстер, "КМ", Карго, Командование +highlights-research-director = Научный Руководитель, "НР", Наука, Учёный, "НИО", Командование + +# Безопасность +highlights-detective = Детектив, "Дек", Безопасности, "СБ" +highlights-security-cadet = Кадет Службы Безопасности, Кадет, "СБ" +highlights-security-officer = Офицер Службы Безопасности, Офицер, "СБ" +highlights-warden = Смотритель, Безопасности, "СБ" + +# Карго +highlights-cargo-technician = Грузчик, Снабжение, Карго +highlights-salvage-specialist = Утилизатор, Снабжение, "Утиль", Шахтер + +# Инженерия +highlights-atmospheric-technician = Атмосферный техник, Атмосферный, Атмос +highlights-station-engineer = Инженер, Инженерия, Инженер, "Инж" +highlights-technical-assistant = Технический ассистент, Инженерия, Инженер, "Инж" + +# Медицина +highlights-chemist = Химик, Химия, "Мед", Медик, Врач +highlights-medical-doctor = Врач, Доктор, "Мед", Медик, Врач +highlights-medical-intern = Интерн, "Мед", Медик, Врач +highlights-paramedic = Парамедик, "Парамед", "Мед", Медик, Врач + +# Наука +highlights-scientist = Ученый, Наука, "НИО" +highlights-research-assistant = Научный Ассистент, Наука, "НИО" + +# Гражданские +highlights-bartender = Бармен, "Бар", "Сервис" +highlights-botanist = Ботаник, Ботаника, Гидропоника +highlights-chaplain = Священник, "Церковь", Святой Отец +highlights-chef = Повар, Кухня +highlights-clown = Клоун, Шут +highlights-janitor = Уборщик, "Уборка" +highlights-lawyer = Юрист, Адвокат +highlights-librarian = Библиотекарь, Библиотека +highlights-mime = Мим +highlights-passenger = Пассажир +highlights-service-worker = Сервисный Работник + +# Станционные роли +highlights-boxer = Боксер +highlights-reporter = Репортер, Журналист +highlights-zookeeper = Смотритель зоопарка +highlights-psychologist = Психолог, Психология + +# ИИ +highlights-personal-ai = ПИИ, "ИИ" +highlights-cyborg = Киборг, Борг, Робот +highlights-station-ai = Станционный ИИ, "ИИ", Искусственный Интеллект From 82cb6d0e925e71cea146ccd28ad5ea09cee2da6d Mon Sep 17 00:00:00 2001 From: FN Date: Sun, 10 Nov 2024 09:17:14 +0700 Subject: [PATCH 8/9] Fix part 1 --- .../en-US/_corvaxnext/chat/highlights.ftl | 57 ------------------- .../chat/highlights.ftl | 0 Resources/Locale/ru-RU/_corvaxnext/api.ftl | 24 -------- .../ru-RU/_corvaxnext/chat/highlights.ftl | 57 ------------------- .../{_CorvaxNext => _corvaxnext_}/api.ftl | 0 .../chat/highlights.ftl | 0 6 files changed, 138 deletions(-) delete mode 100644 Resources/Locale/en-US/_corvaxnext/chat/highlights.ftl rename Resources/Locale/en-US/{_CorvaxNext => _corvaxnext_}/chat/highlights.ftl (100%) delete mode 100644 Resources/Locale/ru-RU/_corvaxnext/api.ftl delete mode 100644 Resources/Locale/ru-RU/_corvaxnext/chat/highlights.ftl rename Resources/Locale/ru-RU/{_CorvaxNext => _corvaxnext_}/api.ftl (100%) rename Resources/Locale/ru-RU/{_CorvaxNext => _corvaxnext_}/chat/highlights.ftl (100%) diff --git a/Resources/Locale/en-US/_corvaxnext/chat/highlights.ftl b/Resources/Locale/en-US/_corvaxnext/chat/highlights.ftl deleted file mode 100644 index f3fddfe7288..00000000000 --- a/Resources/Locale/en-US/_corvaxnext/chat/highlights.ftl +++ /dev/null @@ -1,57 +0,0 @@ -# Command -highlights-captain = Captain, "Cap", Command -highlights-head-of-personnel = Head Of Personnel, "HoP", Service, Command -highlights-chief-engineer = Chief Engineer, "CE", Engineering, Engineer, "Engi", Command -highlights-chief-medical-officer = Chief Medical Officer, "CMO", MedBay, "Med", Command -highlights-head-of-security = Head of Security, "HoS", Security, "Sec", Command -highlights-quartermaster = Quartermaster, "QM", Cargo, Command -highlights-research-director = Research Director, "RD", Science, "Sci", Command - -# Security -highlights-detective = Detective, "Det", Security, "Sec" -highlights-security-cadet = Security Cadet, Cadet, Security, "Sec" -highlights-security-officer = Security Officer, Secoff, Officer, Security, "Sec" -highlights-warden = Warden, "Ward", Security, "Sec" - -# Cargo -highlights-cargo-technician = Cargo Technician, Cargo Tech, Cargo -highlights-salvage-specialist = Salvage Specialist, Salvager, Salvage, "Salv", Miner - -# Engineering -highlights-atmospheric-technician = Atmospheric Technician, Atmos tech, Atmospheric, Atmos -highlights-station-engineer = Station Engineer, Engineering, Engineer, "Engi" -highlights-technical-assistant = Technical Assistant, Tech Assistant, Engineering, Engineer, "Engi" - -# Medical -highlights-chemist = Chemist, Chemistry, MedBay -highlights-medical-doctor = Medical Doctor, Doctor, "Doc", MedBay, "Med" -highlights-medical-intern = Medical Intern, Intern, MedBay, "Med" -highlights-paramedic = Paramedic, "Para", MedBay, "Med" - -# Science -highlights-scientist = Scientist, Science, "Sci" -highlights-research-assistant = Research Assistant, Science, "Sci" - -# Civilian -highlights-bartender = Bartender, Barkeeper, Barkeep, "Bar" -highlights-botanist = Botanist, Botany, Hydroponics -highlights-chaplain = Chaplain, "Chap", Chapel -highlights-chef = Chef, "Cook", Kitchen -highlights-clown = Clown, Jester -highlights-janitor = Janitor, "Jani" -highlights-lawyer = Lawyer, Attorney -highlights-librarian = Librarian, Library -highlights-mime = Mime -highlights-passenger = Passenger -highlights-service-worker = Service Worker - -# Station-specific -highlights-boxer = Boxer -highlights-reporter = Reporter, Journalist -highlights-zookeeper = Zookeeper -highlights-psychologist = Psychologist, Psychology - -# Silicon -highlights-personal-ai = Personal AI, "pAI" -highlights-cyborg = Cyborg, Borg -highlights-station-ai = Station AI, "AI" \ No newline at end of file diff --git a/Resources/Locale/en-US/_CorvaxNext/chat/highlights.ftl b/Resources/Locale/en-US/_corvaxnext_/chat/highlights.ftl similarity index 100% rename from Resources/Locale/en-US/_CorvaxNext/chat/highlights.ftl rename to Resources/Locale/en-US/_corvaxnext_/chat/highlights.ftl diff --git a/Resources/Locale/ru-RU/_corvaxnext/api.ftl b/Resources/Locale/ru-RU/_corvaxnext/api.ftl deleted file mode 100644 index b72182fd1a0..00000000000 --- a/Resources/Locale/ru-RU/_corvaxnext/api.ftl +++ /dev/null @@ -1,24 +0,0 @@ -admin-verb-text-make-api = Сделать АПИИ -admin-verb-make-api = Сделать цель агентом похищения искусственного интеллекта. - -api-backpack-category-utilities-name = Набор Утилит -api-backpack-category-utilities-description = - Набор полезных вещей, содержащий имплантер - хранилища, лазерный кинжал, а также - криптографический секвенсор. - -ent-ToolboxApi = ящик воровских инструментов неопределённости - .desc = Здесь лежат ваши излюбленные воровские штучки. Осталось вспомнить, какие именно. - -api-round-end-agent-name = агент похищения искусственного интеллекта - -roles-antag-api-objective = Украдите станционный ИИ, действуя скрытно. - -objective-condition-api-description = То, зачем я сюда прилетел. Осталось найти интелкарту и пробраться к нему. - -steal-target-groups-ai = станционный ИИ, помещённый на интелкарту - -api-role-greeting = - Вы агент похищения искусственного интеллекта, также известный как АПИИ. - У вас здесь одна цель: украсть станционный ИИ с помощью интелкарты. - Старайтесь действовать скрытно, вы это любите. diff --git a/Resources/Locale/ru-RU/_corvaxnext/chat/highlights.ftl b/Resources/Locale/ru-RU/_corvaxnext/chat/highlights.ftl deleted file mode 100644 index 61119deccb8..00000000000 --- a/Resources/Locale/ru-RU/_corvaxnext/chat/highlights.ftl +++ /dev/null @@ -1,57 +0,0 @@ -# Командование -highlights-captain = Капитан, "Кэп", Командование -highlights-head-of-personnel = Глава персонала, "ГП", Сервис, Командование -highlights-chief-engineer = Старший инженер, "СИ", Инженер, "Инж", Командование -highlights-chief-medical-officer = Главный врач, "ГВ", Медицинский, "Мед", Командование -highlights-head-of-security = Глава Службы Безопасности, "ГСБ", Безопасности, "СБ", Командование -highlights-quartermaster = Квартирмейстер, "КМ", Карго, Командование -highlights-research-director = Научный Руководитель, "НР", Наука, Учёный, "НИО", Командование - -# Безопасность -highlights-detective = Детектив, "Дек", Безопасности, "СБ" -highlights-security-cadet = Кадет Службы Безопасности, Кадет, "СБ" -highlights-security-officer = Офицер Службы Безопасности, Офицер, "СБ" -highlights-warden = Смотритель, Безопасности, "СБ" - -# Карго -highlights-cargo-technician = Грузчик, Снабжение, Карго -highlights-salvage-specialist = Утилизатор, Снабжение, "Утиль", Шахтер - -# Инженерия -highlights-atmospheric-technician = Атмосферный техник, Атмосферный, Атмос -highlights-station-engineer = Инженер, Инженерия, Инженер, "Инж" -highlights-technical-assistant = Технический ассистент, Инженерия, Инженер, "Инж" - -# Медицина -highlights-chemist = Химик, Химия, "Мед", Медик, Врач -highlights-medical-doctor = Врач, Доктор, "Мед", Медик, Врач -highlights-medical-intern = Интерн, "Мед", Медик, Врач -highlights-paramedic = Парамедик, "Парамед", "Мед", Медик, Врач - -# Наука -highlights-scientist = Ученый, Наука, "НИО" -highlights-research-assistant = Научный Ассистент, Наука, "НИО" - -# Гражданские -highlights-bartender = Бармен, "Бар", "Сервис" -highlights-botanist = Ботаник, Ботаника, Гидропоника -highlights-chaplain = Священник, "Церковь", Святой Отец -highlights-chef = Повар, Кухня -highlights-clown = Клоун, Шут -highlights-janitor = Уборщик, "Уборка" -highlights-lawyer = Юрист, Адвокат -highlights-librarian = Библиотекарь, Библиотека -highlights-mime = Мим -highlights-passenger = Пассажир -highlights-service-worker = Сервисный Работник - -# Станционные роли -highlights-boxer = Боксер -highlights-reporter = Репортер, Журналист -highlights-zookeeper = Смотритель зоопарка -highlights-psychologist = Психолог, Психология - -# ИИ -highlights-personal-ai = ПИИ, "ИИ" -highlights-cyborg = Киборг, Борг, Робот -highlights-station-ai = Станционный ИИ, "ИИ", Искусственный Интеллект diff --git a/Resources/Locale/ru-RU/_CorvaxNext/api.ftl b/Resources/Locale/ru-RU/_corvaxnext_/api.ftl similarity index 100% rename from Resources/Locale/ru-RU/_CorvaxNext/api.ftl rename to Resources/Locale/ru-RU/_corvaxnext_/api.ftl diff --git a/Resources/Locale/ru-RU/_CorvaxNext/chat/highlights.ftl b/Resources/Locale/ru-RU/_corvaxnext_/chat/highlights.ftl similarity index 100% rename from Resources/Locale/ru-RU/_CorvaxNext/chat/highlights.ftl rename to Resources/Locale/ru-RU/_corvaxnext_/chat/highlights.ftl From 3f6fddeba7a23be161cdbec947a274221c450d50 Mon Sep 17 00:00:00 2001 From: FN Date: Sun, 10 Nov 2024 09:17:37 +0700 Subject: [PATCH 9/9] Fix part 2 --- .../en-US/{_corvaxnext_ => _corvaxnext}/chat/highlights.ftl | 0 Resources/Locale/ru-RU/{_corvaxnext_ => _corvaxnext}/api.ftl | 0 .../ru-RU/{_corvaxnext_ => _corvaxnext}/chat/highlights.ftl | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename Resources/Locale/en-US/{_corvaxnext_ => _corvaxnext}/chat/highlights.ftl (100%) rename Resources/Locale/ru-RU/{_corvaxnext_ => _corvaxnext}/api.ftl (100%) rename Resources/Locale/ru-RU/{_corvaxnext_ => _corvaxnext}/chat/highlights.ftl (100%) diff --git a/Resources/Locale/en-US/_corvaxnext_/chat/highlights.ftl b/Resources/Locale/en-US/_corvaxnext/chat/highlights.ftl similarity index 100% rename from Resources/Locale/en-US/_corvaxnext_/chat/highlights.ftl rename to Resources/Locale/en-US/_corvaxnext/chat/highlights.ftl diff --git a/Resources/Locale/ru-RU/_corvaxnext_/api.ftl b/Resources/Locale/ru-RU/_corvaxnext/api.ftl similarity index 100% rename from Resources/Locale/ru-RU/_corvaxnext_/api.ftl rename to Resources/Locale/ru-RU/_corvaxnext/api.ftl diff --git a/Resources/Locale/ru-RU/_corvaxnext_/chat/highlights.ftl b/Resources/Locale/ru-RU/_corvaxnext/chat/highlights.ftl similarity index 100% rename from Resources/Locale/ru-RU/_corvaxnext_/chat/highlights.ftl rename to Resources/Locale/ru-RU/_corvaxnext/chat/highlights.ftl