diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs index 2470b40c29f..f4978cd65c8 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs @@ -1,4 +1,4 @@ -using Content.Server._CorvaxNext.Api; +using Content.Server._CorvaxNext.Api.Components; using Content.Server.Administration.Commands; using Content.Server.Antag; using Content.Server.GameTicking.Rules.Components; diff --git a/Content.Server/Thief/Components/ThiefBeaconAccessComponent.cs b/Content.Server/Thief/Components/ThiefBeaconAccessComponent.cs new file mode 100644 index 00000000000..b9cc52ac2cb --- /dev/null +++ b/Content.Server/Thief/Components/ThiefBeaconAccessComponent.cs @@ -0,0 +1,4 @@ +namespace Content.Server.Thief.Components; + +[RegisterComponent] +public sealed partial class ThiefBeaconAccessComponent : Component; // Corvax-Next-Api diff --git a/Content.Server/Thief/Systems/ThiefBeaconSystem.cs b/Content.Server/Thief/Systems/ThiefBeaconSystem.cs index 4c65ba5c449..593fe0ab1c2 100644 --- a/Content.Server/Thief/Systems/ThiefBeaconSystem.cs +++ b/Content.Server/Thief/Systems/ThiefBeaconSystem.cs @@ -8,6 +8,7 @@ using Content.Shared.Verbs; using Content.Shared.Roles; using Robust.Shared.Audio.Systems; +using Content.Server._CorvaxNext.Api.Components; namespace Content.Server.Thief.Systems; @@ -38,7 +39,7 @@ private void OnGetInteractionVerbs(Entity beacon, ref GetV return; var mind = _mind.GetMind(args.User); - if (mind == null || !_roles.MindHasRole(mind.Value)) + if (mind == null || !_roles.MindHasRole(mind.Value)) // Corvax-Next-Api return; var user = args.User; diff --git a/Content.Server/Thief/Systems/ThiefUndeterminedBackpackSystem.cs b/Content.Server/Thief/Systems/ThiefUndeterminedBackpackSystem.cs index 3248a6b9c80..dfc32e090bf 100644 --- a/Content.Server/Thief/Systems/ThiefUndeterminedBackpackSystem.cs +++ b/Content.Server/Thief/Systems/ThiefUndeterminedBackpackSystem.cs @@ -4,6 +4,7 @@ using Robust.Server.GameObjects; using Robust.Server.Audio; using Robust.Shared.Prototypes; +using Content.Shared.Implants.Components; namespace Content.Server.Thief.Systems; @@ -34,6 +35,13 @@ private void OnUIOpened(Entity backpack, ref private void OnApprove(Entity backpack, ref ThiefBackpackApproveMessage args) { + // Corvax-Next-Api-Start + var entity = backpack.Owner; + + if (TryComp(Transform(entity).ParentUid, out var implant) && implant.ImplantedEntity is not null) + entity = implant.ImplantedEntity.Value; + // Corvax-Next-Api-End + if (backpack.Comp.SelectedSets.Count != backpack.Comp.MaxSelectedSets) return; @@ -42,12 +50,12 @@ private void OnApprove(Entity backpack, ref var set = _proto.Index(backpack.Comp.PossibleSets[i]); foreach (var item in set.Content) { - var ent = Spawn(item, _transform.GetMapCoordinates(backpack.Owner)); + var ent = Spawn(item, _transform.GetMapCoordinates(entity)); // Corvax-Next-Api if (TryComp(ent, out var itemComponent)) - _transform.DropNextTo(ent, backpack.Owner); + _transform.DropNextTo(ent, entity); // Corvax-Next-Api } } - _audio.PlayPvs(backpack.Comp.ApproveSound, backpack.Owner); + _audio.PlayPvs(backpack.Comp.ApproveSound, entity); // Corvax-Next-Api QueueDel(backpack); } private void OnChangeSet(Entity backpack, ref ThiefBackpackChangeSetMessage args) diff --git a/Content.Server/_CorvaxNext/Api/ApiRuleSystem.cs b/Content.Server/_CorvaxNext/Api/ApiRuleSystem.cs index ebb4892e0dd..e8ee63605d9 100644 --- a/Content.Server/_CorvaxNext/Api/ApiRuleSystem.cs +++ b/Content.Server/_CorvaxNext/Api/ApiRuleSystem.cs @@ -1,3 +1,4 @@ +using Content.Server._CorvaxNext.Api.Components; using Content.Server.Antag; using Content.Server.GameTicking.Rules; using Content.Server.Roles; @@ -13,7 +14,7 @@ public override void Initialize() base.Initialize(); SubscribeLocalEvent(OnAfterAntagEntitySelected); - SubscribeLocalEvent(OnGetBriefing); + SubscribeLocalEvent(OnGetBriefing); } private void OnAfterAntagEntitySelected(EntityUid entity, ApiRuleComponent apiRule, AfterAntagEntitySelectedEvent e) @@ -21,7 +22,7 @@ private void OnAfterAntagEntitySelected(EntityUid entity, ApiRuleComponent apiRu _antag.SendBriefing(e.EntityUid, Loc.GetString("api-role-greeting"), null, null); } - private void OnGetBriefing(EntityUid entity, ApiRuleComponent apiRule, GetBriefingEvent e) + private void OnGetBriefing(EntityUid entity, ApiRoleComponent apiRole, GetBriefingEvent e) { e.Append(Loc.GetString("api-role-greeting")); } diff --git a/Content.Server/_CorvaxNext/Api/Components/ApiRoleComponent.cs b/Content.Server/_CorvaxNext/Api/Components/ApiRoleComponent.cs new file mode 100644 index 00000000000..8a4de1a9e2a --- /dev/null +++ b/Content.Server/_CorvaxNext/Api/Components/ApiRoleComponent.cs @@ -0,0 +1,4 @@ +namespace Content.Server._CorvaxNext.Api.Components; + +[RegisterComponent] +public sealed partial class ApiRoleComponent : Component; diff --git a/Content.Server/_CorvaxNext/Api/ApiRuleComponent.cs b/Content.Server/_CorvaxNext/Api/Components/ApiRuleComponent.cs similarity index 59% rename from Content.Server/_CorvaxNext/Api/ApiRuleComponent.cs rename to Content.Server/_CorvaxNext/Api/Components/ApiRuleComponent.cs index 901370f570b..af972655ced 100644 --- a/Content.Server/_CorvaxNext/Api/ApiRuleComponent.cs +++ b/Content.Server/_CorvaxNext/Api/Components/ApiRuleComponent.cs @@ -1,4 +1,4 @@ -namespace Content.Server._CorvaxNext.Api; +namespace Content.Server._CorvaxNext.Api.Components; [RegisterComponent] public sealed partial class ApiRuleComponent : Component; diff --git a/Resources/Locale/ru-RU/_corvaxnext/api.ftl b/Resources/Locale/ru-RU/_corvaxnext/api.ftl index 896967b5489..bf88abd1648 100644 --- a/Resources/Locale/ru-RU/_corvaxnext/api.ftl +++ b/Resources/Locale/ru-RU/_corvaxnext/api.ftl @@ -3,12 +3,12 @@ admin-verb-make-api = Сделать цель агентом похищения api-backpack-category-utilities-name = Набор Утилит api-backpack-category-utilities-description = - Набор полезных вещей, содержащий имплантер - хранилища, энергокинжал, а также - криптографический секвенсор. + Набор полезных вещей, содержащий энергокинжал, + глушитель связи, а также криптографический секвенсор. api-round-end-agent-name = АПИИ +roles-antag-api-name = АПИИ roles-antag-api-objective = Украдите станционный ИИ, действуя скрытно. objective-issuer-api = [color=#2ed2fd]Агенство[/color] @@ -18,6 +18,7 @@ objective-condition-api-description = То, зачем вы сюда приле steal-target-groups-ai = станционный ИИ, помещённый на интелкарту api-role-greeting = - Вы агент похищения искусственного интеллекта, также известный как АПИИ. + Вы - агент похищения искусственного интеллекта, также известный как АПИИ. + В вас был помещён имплант хранилища со всеми нужными вещами. У вас здесь одна цель: украсть станционный ИИ с помощью интелкарты. Старайтесь действовать скрытно, вы это любите. 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 index b3775495838..d6b9e6fab4d 100644 --- 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 @@ -1,2 +1,3 @@ ent-ToolboxApi = ящик воровских инструментов неопределённости .desc = Здесь лежат ваши излюбленные воровские штучки. Осталось вспомнить, какие именно. + .suffix = АПИИ diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/objects/tools/jammer_microreactor.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/objects/tools/jammer_microreactor.ftl new file mode 100644 index 00000000000..fcb6b77be23 --- /dev/null +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/objects/tools/jammer_microreactor.ftl @@ -0,0 +1,3 @@ +ent-RadioJammerMicroreactor = { ent-RadioJammer } + .desc = { ent-RadioJammer.desc } + .suffix = глушитель связи Синдиката, микрореактор diff --git a/Resources/Prototypes/Roles/MindRoles/mind_roles.yml b/Resources/Prototypes/Roles/MindRoles/mind_roles.yml index 926ce512b41..7f931639a0e 100644 --- a/Resources/Prototypes/Roles/MindRoles/mind_roles.yml +++ b/Resources/Prototypes/Roles/MindRoles/mind_roles.yml @@ -136,6 +136,7 @@ - type: MindRole antagPrototype: Thief - type: ThiefRole + - type: ThiefBeaconAccess # Corvax-Next-Api # Traitors - type: entity diff --git a/Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml b/Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml index 800894d79d4..b51e7f6cd93 100644 --- a/Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml +++ b/Resources/Prototypes/_CorvaxNext/Catalog/api_toolbox_sets.yml @@ -6,6 +6,6 @@ sprite: /Textures/Objects/Tools/Toolboxes/toolbox_syn.rsi state: icon content: - - StorageImplanter + - RadioJammerMicroreactor - EnergyDaggerBox - Emag diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Objects/Misc/api_storage_implant.yml b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Misc/api_storage_implant.yml new file mode 100644 index 00000000000..a6ff8ad9c42 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Misc/api_storage_implant.yml @@ -0,0 +1,10 @@ +- type: entity + parent: StorageImplant + id: ApiStorageImplant + categories: [ HideSpawnMenu ] + components: + - type: StorageFill + contents: + - id: ToolboxApi + - id: ThiefBeacon + - id: ClothingHandsChameleonThief diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Objects/Tools/api_toolbox.yml b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Tools/api_toolbox.yml index 52f3163d810..081f6384107 100644 --- a/Resources/Prototypes/_CorvaxNext/Entities/Objects/Tools/api_toolbox.yml +++ b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Tools/api_toolbox.yml @@ -2,6 +2,7 @@ id: ToolboxApi name: api undetermined toolbox description: This is where your favorite api's supplies lie. Try to remember which ones. + suffix: API parent: [ BaseItem, BaseMinorContraband ] components: - type: Sprite diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Objects/Tools/jammer_microreactor.yml b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Tools/jammer_microreactor.yml new file mode 100644 index 00000000000..982e240a757 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Entities/Objects/Tools/jammer_microreactor.yml @@ -0,0 +1,10 @@ +- type: entity + parent: RadioJammer + id: RadioJammerMicroreactor + suffix: Microreactor + components: + - type: ItemSlots + slots: + cell_slot: + name: power-cell-slot-component-slot-name-default + startingItem: PowerCellMicroreactor diff --git a/Resources/Prototypes/_CorvaxNext/GameRules/api.yml b/Resources/Prototypes/_CorvaxNext/GameRules/api.yml index dd134d67e90..59289b0238f 100644 --- a/Resources/Prototypes/_CorvaxNext/GameRules/api.yml +++ b/Resources/Prototypes/_CorvaxNext/GameRules/api.yml @@ -16,7 +16,9 @@ lateJoinAdditional: true allowNonHumans: true multiAntagSetting: NotExclusive - startingGear: ApiGear + components: + - type: AutoImplant + implants: [ ApiStorageImplant ] mindRoles: - MindRoleApi briefing: diff --git a/Resources/Prototypes/_CorvaxNext/Objectives/api.yml b/Resources/Prototypes/_CorvaxNext/Objectives/api.yml index c521191acd2..4ce597487e8 100644 --- a/Resources/Prototypes/_CorvaxNext/Objectives/api.yml +++ b/Resources/Prototypes/_CorvaxNext/Objectives/api.yml @@ -8,7 +8,7 @@ - type: RoleRequirement roles: mindRoles: - - ThiefRole + - ApiRole - type: entity abstract: true diff --git a/Resources/Prototypes/_CorvaxNext/Roles/Antags/api.yml b/Resources/Prototypes/_CorvaxNext/Roles/Antags/api.yml index 7846ba83edb..ba1a8fac44f 100644 --- a/Resources/Prototypes/_CorvaxNext/Roles/Antags/api.yml +++ b/Resources/Prototypes/_CorvaxNext/Roles/Antags/api.yml @@ -1,6 +1,6 @@ - type: antag id: Api - name: roles-antag-thief-name + name: roles-antag-api-name antagonist: true setPreference: false objective: roles-antag-api-objective @@ -8,11 +8,3 @@ 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 index 9ee673e979f..78c1f1ee707 100644 --- a/Resources/Prototypes/_CorvaxNext/Roles/MindRoles/api_mind_role.yml +++ b/Resources/Prototypes/_CorvaxNext/Roles/MindRoles/api_mind_role.yml @@ -1,4 +1,3 @@ -# Thief - type: entity parent: BaseMindRoleAntag id: MindRoleApi @@ -7,4 +6,5 @@ components: - type: MindRole antagPrototype: Api - - type: ThiefRole + - type: ApiRole + - type: ThiefBeaconAccess