From 144af233c4f4135cccacfa5d50281fce44a1595e Mon Sep 17 00:00:00 2001 From: Ed <96445749+TheShuEd@users.noreply.github.com> Date: Sun, 24 Dec 2023 12:58:28 +0300 Subject: [PATCH] New Thief minor antagonist (#21520) * start working * add right-click thief antagins some architecture restruct * add meh thief greeting audio * add thief subgamemode to Traitors gamemode * add late join thief (not tested yet) add briefing * add pacifism * add Steal tasks to thief * fix crash thief+traitor on person * add new condition: collection steal * add tracking of succes collection objective * add stamp collection target remove some boring steal target add check pulling entity to collection target * finalize first 2 group objective * start merging stealing objective systems * merging * finish merging. Now traitor steal objective work better * we don't check the items of pullable sentient entity * clear naming, enable thief signle item objective start * objective pack add * finish with steal item objectives * convert string to ProtoId<> * some clean up * add thieves to revolution game mode * Update Resources/Locale/en-US/game-ticking/game-presets/preset-thief.ftl Co-authored-by: Flareguy <78941145+Flareguy@users.noreply.github.com> * Update Resources/Locale/en-US/game-ticking/game-presets/preset-thief.ftl Co-authored-by: Flareguy <78941145+Flareguy@users.noreply.github.com> * update pacifism: fix crashing, monkey-thief without pacified * adaptive animal briefing, cleaning locales * add structure steal objectives * remove RCD target * add thiefs to manifest, but bug with traitor duplications * add escape objective * add chat briefing * setup animal objective group system * add animal steal objectives * add animal objectives notroleconditions * add morty * now thief mode has a chance of not launching Now there are a random number of thieves per round from 1 to 3 * 6 hours of trying to fix duplicate tasks. Failure * added thief pinpointer (buggy) * start thief backpack UI work * revert pinpointer for scope reason * UI continue work * add thief starter kits content * remove ERP kit :trollface: * finally! giving starting items to thief. Now it playable, but still need more work * clean up * fix * fox * add merged items into thief new Starting Kit (buggy) * fix YES antag menu * objection tweaks * remove hearts objective, working on spawning things from toolbox * smug * fixes * add race specifier objective condition LAMPS * meh * fix fix fix * the alive * Adding stamps * Update backpack.ftl * Revert1 * Revert ftl * add voice mask to communicator kit * Update Resources/Locale/en-US/administration/antag.ftl Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com> * Update Resources/Locale/en-US/game-ticking/game-presets/preset-thief.ftl Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com> * Update Resources/Locale/en-US/thief/backpack.ftl Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com> * Update Resources/Locale/en-US/objectives/conditions/steal.ftl Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com> * Update Resources/Locale/en-US/thief/backpack.ftl Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com> * Update Resources/Locale/en-US/thief/backpack.ftl Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com> * Update Resources/Locale/en-US/thief/backpack.ftl Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com> * Update Resources/Locale/en-US/thief/backpack.ftl Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com> * Update Resources/Locale/en-US/prototypes/roles/antags.ftl Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com> * Update Resources/Locale/en-US/thief/backpack.ftl Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com> * update * fix * more reusable function, add documentation * fix doc * faint fixes --------- Co-authored-by: Flareguy <78941145+Flareguy@users.noreply.github.com> Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com> --- .../Thief/ThiefBackpackBoundUserInterface.cs | 52 ++ Content.Client/Thief/ThiefBackpackMenu.xaml | 39 ++ .../Thief/ThiefBackpackMenu.xaml.cs | 56 ++ Content.Client/Thief/ThiefBackpackSet.xaml | 23 + Content.Client/Thief/ThiefBackpackSet.xaml.cs | 22 + .../Systems/AdminVerbSystem.Antags.cs | 19 + Content.Server/Antag/AntagSelectionSystem.cs | 67 ++ .../Rules/Components/ThiefRuleComponent.cs | 54 ++ .../GameTicking/Rules/ThiefRuleSystem.cs | 194 ++++++ .../GameTicking/Rules/TraitorRuleSystem.cs | 61 +- .../Components/SpeciesRequirmentComponent.cs | 15 + .../Components/StealConditionComponent.cs | 54 +- .../Components/StealTargetComponent.cs | 18 + Content.Server/Objectives/ObjectivesSystem.cs | 3 + .../Systems/SpeciesRequirementSystem.cs | 34 + .../Systems/StealConditionSystem.cs | 154 ++++- Content.Server/Roles/RoleSystem.cs | 3 +- Content.Server/Roles/ThiefRoleComponent.cs | 8 + .../ThiefUndeterminedBackpackComponent.cs | 25 + .../ThiefUndeterminedBackpackSystem.cs | 79 +++ .../Prototypes/StealTargetGroupPrototype.cs | 15 + .../Thief/Components/ThiefBackpackUI.cs | 63 ++ .../Prototypes/ThiefBackpackSetPrototype.cs | 18 + Resources/Audio/Misc/attributions.yml | 5 + Resources/Audio/Misc/thief_greeting.ogg | Bin 0 -> 173356 bytes .../Locale/en-US/administration/antag.ftl | 2 + .../game-presets/preset-thief.ftl | 20 + .../en-US/objectives/conditions/steal.ftl | 5 + .../Locale/en-US/prototypes/roles/antags.ftl | 3 + Resources/Locale/en-US/thief/backpack.ftl | 62 ++ .../Prototypes/Catalog/thief_toolbox_sets.yml | 107 +++ .../Entities/Clothing/Ears/headsets_alt.yml | 2 + .../Prototypes/Entities/Clothing/Eyes/hud.yml | 2 + .../Entities/Clothing/Head/hats.yml | 2 + .../Entities/Clothing/Neck/cloaks.yml | 18 + .../Entities/Clothing/Neck/medals.yml | 4 + .../Clothing/OuterClothing/hardsuits.yml | 2 + .../Clothing/OuterClothing/softsuits.yml | 2 + .../Entities/Clothing/Shoes/magboots.yml | 2 + .../Prototypes/Entities/Mobs/NPCs/pets.yml | 20 + .../Entities/Objects/Consumable/Food/meat.yml | 2 + .../Objects/Decoration/jackolantern.yml | 2 + .../Circuitboards/Machine/production.yml | 4 + .../Devices/Circuitboards/computer.yml | 6 + .../Entities/Objects/Devices/door_remote.yml | 2 + .../Objects/Devices/encryption_keys.yml | 2 + .../Objects/Devices/forensic_scanner.yml | 2 + .../Objects/Devices/hand_teleporter.yml | 2 + .../Entities/Objects/Devices/nuke.yml | 2 + .../Entities/Objects/Devices/pinpointer.yml | 2 +- .../Entities/Objects/Fun/figurines.yml | 2 + .../Entities/Objects/Misc/bedsheets.yml | 16 + .../Entities/Objects/Misc/dat_fukken_disk.yml | 2 + .../Entities/Objects/Misc/fluff_lights.yml | 2 + .../Objects/Misc/identification_cards.yml | 4 + .../Entities/Objects/Misc/paper.yml | 4 + .../Objects/Misc/secret_documents.yml | 2 + .../Objects/Power/antimatter_part.yml | 2 + .../Objects/Specific/Chapel/bibles.yml | 2 + .../Objects/Specific/Hydroponics/leaves.yml | 6 + .../Medical/handheld_crew_monitor.yml | 4 +- .../Objects/Specific/Medical/hypospray.yml | 2 + .../Objects/Specific/Research/disk.yml | 2 + .../Xenoarchaeology/structure_artifacts.yml | 2 + .../Entities/Objects/Tools/flashlights.yml | 2 + .../Entities/Objects/Tools/jetpacks.yml | 2 + .../Entities/Objects/Tools/lantern.yml | 2 + .../Entities/Objects/Tools/toolbox.yml | 27 + .../Entities/Objects/Vehicles/buckleable.yml | 2 + .../Weapons/Guns/Battery/battery_guns.yml | 2 + .../Objects/Weapons/Melee/fireaxe.yml | 2 + .../Entities/Structures/Dispensers/booze.yml | 2 + .../Entities/Structures/Dispensers/chem.yml | 2 + .../Entities/Structures/Furniture/altar.yml | 2 + .../Structures/Furniture/potted_plants.yml | 2 + .../Structures/Machines/fax_machine.yml | 2 + .../Structures/Piping/Atmospherics/unary.yml | 4 + .../Structures/Power/Generation/teg.yml | 4 + Resources/Prototypes/GameRules/midround.yml | 8 + Resources/Prototypes/GameRules/roundstart.yml | 4 + .../Prototypes/Objectives/base_objectives.yml | 4 + .../Prototypes/Objectives/objectiveGroups.yml | 85 +++ .../Objectives/stealTargetGroups.yml | 408 ++++++++++++ Resources/Prototypes/Objectives/thief.yml | 620 ++++++++++++++++++ Resources/Prototypes/Objectives/traitor.yml | 40 +- Resources/Prototypes/Roles/Antags/Thief.yml | 6 + .../Objects/Devices/pinpointer.rsi/meta.json | 3 + .../pinpointer.rsi/pinpointer_thief.png | Bin 0 -> 435 bytes .../Toolboxes/toolbox_thief.rsi/icon.png | Bin 0 -> 731 bytes .../toolbox_thief.rsi/inhand-left.png | Bin 0 -> 592 bytes .../toolbox_thief.rsi/inhand-right.png | Bin 0 -> 632 bytes .../Toolboxes/toolbox_thief.rsi/meta.json | 22 + .../Objects/Vehicles/secway.rsi/icon.png | Bin 0 -> 541 bytes .../Objects/Vehicles/secway.rsi/meta.json | 3 + 94 files changed, 2544 insertions(+), 128 deletions(-) create mode 100644 Content.Client/Thief/ThiefBackpackBoundUserInterface.cs create mode 100644 Content.Client/Thief/ThiefBackpackMenu.xaml create mode 100644 Content.Client/Thief/ThiefBackpackMenu.xaml.cs create mode 100644 Content.Client/Thief/ThiefBackpackSet.xaml create mode 100644 Content.Client/Thief/ThiefBackpackSet.xaml.cs create mode 100644 Content.Server/GameTicking/Rules/Components/ThiefRuleComponent.cs create mode 100644 Content.Server/GameTicking/Rules/ThiefRuleSystem.cs create mode 100644 Content.Server/Objectives/Components/SpeciesRequirmentComponent.cs create mode 100644 Content.Server/Objectives/Components/StealTargetComponent.cs create mode 100644 Content.Server/Objectives/Systems/SpeciesRequirementSystem.cs create mode 100644 Content.Server/Roles/ThiefRoleComponent.cs create mode 100644 Content.Server/Thief/Components/ThiefUndeterminedBackpackComponent.cs create mode 100644 Content.Server/Thief/Systems/ThiefUndeterminedBackpackSystem.cs create mode 100644 Content.Shared/Objectives/Prototypes/StealTargetGroupPrototype.cs create mode 100644 Content.Shared/Thief/Components/ThiefBackpackUI.cs create mode 100644 Content.Shared/Thief/Prototypes/ThiefBackpackSetPrototype.cs create mode 100644 Resources/Audio/Misc/thief_greeting.ogg create mode 100644 Resources/Locale/en-US/game-ticking/game-presets/preset-thief.ftl create mode 100644 Resources/Locale/en-US/thief/backpack.ftl create mode 100644 Resources/Prototypes/Catalog/thief_toolbox_sets.yml create mode 100644 Resources/Prototypes/Objectives/stealTargetGroups.yml create mode 100644 Resources/Prototypes/Objectives/thief.yml create mode 100644 Resources/Prototypes/Roles/Antags/Thief.yml create mode 100644 Resources/Textures/Objects/Devices/pinpointer.rsi/pinpointer_thief.png create mode 100644 Resources/Textures/Objects/Tools/Toolboxes/toolbox_thief.rsi/icon.png create mode 100644 Resources/Textures/Objects/Tools/Toolboxes/toolbox_thief.rsi/inhand-left.png create mode 100644 Resources/Textures/Objects/Tools/Toolboxes/toolbox_thief.rsi/inhand-right.png create mode 100644 Resources/Textures/Objects/Tools/Toolboxes/toolbox_thief.rsi/meta.json create mode 100644 Resources/Textures/Objects/Vehicles/secway.rsi/icon.png diff --git a/Content.Client/Thief/ThiefBackpackBoundUserInterface.cs b/Content.Client/Thief/ThiefBackpackBoundUserInterface.cs new file mode 100644 index 0000000000..2d492c5e1b --- /dev/null +++ b/Content.Client/Thief/ThiefBackpackBoundUserInterface.cs @@ -0,0 +1,52 @@ +using Content.Shared.Thief; +using JetBrains.Annotations; +using Robust.Client.GameObjects; + +namespace Content.Client.Thief; + +[UsedImplicitly] +public sealed class ThiefBackpackBoundUserInterface : BoundUserInterface +{ + private ThiefBackpackMenu? _window; + + public ThiefBackpackBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) { } + + protected override void Open() + { + base.Open(); + + _window = new ThiefBackpackMenu(this); + _window.OnClose += Close; + _window.OpenCentered(); + } + + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + if (!disposing) + return; + + _window?.Dispose(); + _window = null; + } + + protected override void UpdateState(BoundUserInterfaceState state) + { + base.UpdateState(state); + + if (state is not ThiefBackpackBoundUserInterfaceState current) + return; + + _window?.UpdateState(current); + } + + public void SendChangeSelected(int setNumber) + { + SendMessage(new ThiefBackpackChangeSetMessage(setNumber)); + } + + public void SendApprove() + { + SendMessage(new ThiefBackpackApproveMessage()); + } +} diff --git a/Content.Client/Thief/ThiefBackpackMenu.xaml b/Content.Client/Thief/ThiefBackpackMenu.xaml new file mode 100644 index 0000000000..c1739eb321 --- /dev/null +++ b/Content.Client/Thief/ThiefBackpackMenu.xaml @@ -0,0 +1,39 @@ + + + +