From 49128218d46de5aeedc267a0bfbb9a48551a81ae Mon Sep 17 00:00:00 2001 From: RevengenRat <138193222+Ratyyy@users.noreply.github.com> Date: Sat, 30 Nov 2024 12:14:06 +0200 Subject: [PATCH 01/17] =?UTF-8?q?=D1=83=D0=B6=D0=B0=D1=81=D1=8B=20=D0=98?= =?UTF-8?q?=D0=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content.Server/NPC/HTN/HTNSystem.cs | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Content.Server/NPC/HTN/HTNSystem.cs b/Content.Server/NPC/HTN/HTNSystem.cs index cfa670e1445..aa496b92375 100644 --- a/Content.Server/NPC/HTN/HTNSystem.cs +++ b/Content.Server/NPC/HTN/HTNSystem.cs @@ -13,6 +13,10 @@ using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Utility; +using Content.Server.Worldgen; // Frontier +using Content.Server.Worldgen.Components; // Frontier +using Content.Server.Worldgen.Systems; // Frontier +using Robust.Server.GameObjects; // Frontier namespace Content.Server.NPC.HTN; @@ -22,7 +26,12 @@ public sealed class HTNSystem : EntitySystem [Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly NPCSystem _npc = default!; [Dependency] private readonly NPCUtilitySystem _utility = default!; - + // Frontier + [Dependency] private readonly WorldControllerSystem _world = default!; + [Dependency] private readonly TransformSystem _transform = default!; + private EntityQuery _mapQuery; + private EntityQuery _loadedQuery; + // Frontier private readonly JobQueue _planQueue = new(0.004); private readonly HashSet _subscribers = new(); @@ -31,6 +40,8 @@ public sealed class HTNSystem : EntitySystem public override void Initialize() { base.Initialize(); + _mapQuery = GetEntityQuery(); // Frontier + _loadedQuery = GetEntityQuery(); // Frontier SubscribeLocalEvent(_npc.OnMobStateChange); SubscribeLocalEvent(_npc.OnNPCMapInit); SubscribeLocalEvent(_npc.OnPlayerNPCAttach); @@ -153,6 +164,9 @@ public void UpdateNPC(ref int count, int maxUpdates, float frameTime) if (count >= maxUpdates) break; + if (!IsNPCActive(uid)) // Frontier + continue; + if (comp.PlanningJob != null) { if (comp.PlanningJob.Exception != null) @@ -241,6 +255,18 @@ public void UpdateNPC(ref int count, int maxUpdates, float frameTime) } } + private bool IsNPCActive(EntityUid entity) // Frontier + { + var transform = Transform(entity); + + if (!_mapQuery.TryGetComponent(transform.MapUid, out var worldComponent)) + return true; + + var chunk = _world.GetOrCreateChunk(WorldGen.WorldToChunkCoords(_transform.GetWorldPosition(transform)).Floored(), transform.MapUid.Value, worldComponent); + + return _loadedQuery.TryGetComponent(chunk, out var loaded) && loaded.Loaders is not null; + } + private void AppendDebugText(HTNTask task, StringBuilder text, List planBtr, List btr, ref int level) { // If it's the selected BTR then highlight. From 7ba82b43fc319f98db5ca16135e385023015ad1b Mon Sep 17 00:00:00 2001 From: RevengenRat <138193222+Ratyyy@users.noreply.github.com> Date: Mon, 23 Dec 2024 21:33:55 +0200 Subject: [PATCH 02/17] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D1=8F=D0=B5=D0=BC=20=D0=BB=D0=B0=D0=B2=D0=B0=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D0=B4!!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ADT/Animations/FlipOnHitSystem.cs | 76 + .../ADT/Animations/FlippingComponent.cs | 7 + .../ADT/MiningShop/MiningShopBui.cs | 221 + .../ADT/MiningShop/MiningShopButton.xaml | 7 + .../ADT/MiningShop/MiningShopButton.xaml.cs | 22 + .../ADT/MiningShop/MiningShopEntry.xaml | 13 + .../ADT/MiningShop/MiningShopEntry.xaml.cs | 15 + .../ADT/MiningShop/MiningShopPanel.xaml | 14 + .../ADT/MiningShop/MiningShopPanel.xaml.cs | 45 + .../ADT/MiningShop/MiningShopSection.xaml | 11 + .../ADT/MiningShop/MiningShopSection.xaml.cs | 14 + .../ADT/MiningShop/MiningShopSystem.cs | 25 + .../ADT/MiningShop/MiningShopVendorEntry.xaml | 13 + .../ADT/MiningShop/MiningShopWindow.xaml | 27 + .../ADT/MiningShop/MiningShopWindow.xaml.cs | 15 + .../Shuttles/Systems/DockingConsoleSystem.cs | 5 + .../UI/DockingConsoleBoundUserInterface.cs | 38 + .../ADT/Shuttles/UI/DockingConsoleWindow.xaml | 17 + .../Shuttles/UI/DockingConsoleWindow.xaml.cs | 115 + .../Lathe/UI/LatheBoundUserInterface.cs | 3 + Content.Client/Lathe/UI/LatheMenu.xaml | 6 + Content.Client/Lathe/UI/LatheMenu.xaml.cs | 43 + .../ADT/Animations/FlipOnHitSystem.cs | 17 + .../ADT/MiningShop/MiningShopSystem.cs | 42 + Content.Server/ADT/Planet/PlanetSystem.cs | 76 + .../Shuttles/Systems/DockingConsoleSystem.cs | 176 + .../Shuttles/Systems/DockingShuttleSystem.cs | 72 + .../StationPlanetSpawnerComponent.cs | 32 + .../Systems/StationPlanetSpawnerSystem.cs | 30 + .../ADT/Weather/WeatherEffectsSystem.cs | 82 + .../ADT/Weather/WeatherSchedulerComponent.cs | 58 + .../ADT/Weather/WeatherSchedulerSystem.cs | 75 + .../Body/Components/LungComponent.cs | 7 + .../Body/Systems/RespiratorSystem.cs | 10 +- .../Procedural/DungeonSystem.Rooms.cs | 4 +- .../ADT/Animations/FlipOnHitComponent.cs | 10 + .../ADT/Animations/SharedFlipOnHitSystem.cs | 53 + .../Droppods/Components/DroppodComponent.cs | 16 + .../Droppods/EntitySystems/DroppodSystem.cs | 40 + .../ADT/Fauna/Components/FaunaComponent.cs | 9 + .../Materials/AutoMaterialInsertComponent.cs | 12 + .../SharedAutoMaterialInsertSystem.cs | 4 + .../ADT/MiningShop/MiningShopComponent.cs | 23 + .../ADT/MiningShop/MiningShopSection.cs | 37 + .../ADT/MiningShop/MiningShopVendorUI.cs | 25 + .../ADT/MiningShop/MiningShopedUserEvent.cs | 4 + .../ADT/MiningShop/SharedMiningShopSystem.cs | 71 + Content.Shared/ADT/Planet/PlanetPrototype.cs | 49 + .../Components/DockingConsoleComponent.cs | 49 + .../Components/DockingShuttleComponent.cs | 46 + .../Components/MiningShuttleComponent.cs | 10 + .../ADT/Shuttles/DockingConsoleUI.cs | 27 + .../Systems/SharedDockingConsoleSystem.cs | 3 + .../Systems/SharedDockingShuttleSystem.cs | 3 + .../BackstabDamageMultipilierComponent.cs | 14 + .../Melee/BackstabDamageMultipilierSystem.cs | 25 + .../Components/GunComponentUpdateComponent.cs | 12 + .../Components/GunUpgradeComponent.cs | 15 + .../GunUpgradeComponentsComponent.cs | 14 + .../Components/GunUpgradeDamageComponent.cs | 14 + .../Components/GunUpgradeFireRateComponent.cs | 13 + .../Components/GunUpgradeSpeedComponent.cs | 13 + .../Components/UpgradeableGunComponent.cs | 21 + .../Ranged/Upgrades/GunUpgradeSystem.cs | 144 + .../Components/AshStormImmuneComponent.cs | 9 + .../Components/MiningPointsComponent.cs | 26 + .../Components/MiningPointsLatheComponent.cs | 9 + .../DeltaV/Salvage/MiningPointsUI.cs | 9 + .../Salvage/Systems/MiningPointsSystem.cs | 121 + .../Prototypes/LatheRecipePrototype.cs | 7 + Content.Shared/Weather/SharedWeatherSystem.cs | 1 + Content.Shared/Weather/WeatherComponent.cs | 12 + Content.Shared/Weather/WeatherPrototype.cs | 15 + .../ADT/Lavaland/the-lava-bubble-gurgled.ogg | Bin 0 -> 16047 bytes Resources/Audio/ADT/Misc/droppod_landing.ogg | Bin 0 -> 98370 bytes .../en-US/deltav/lathe/ui/lathe-menu.ftl | 2 + .../Catalog/Fills/lockers/cargo.ftl | 4 + .../Entities/Clothing/Head/hoods.ftl | 3 + .../Entities/Clothing/OuterClothing/armor.ftl | 8 + .../Entities/Objects/Specific/lavaland.ftl | 5 + .../Entities/Objects/Tools/pka_upgrade.ftl | 11 + .../Objects/Weapons/Melee/crushers.ftl | 11 + .../Entities/Objects/Weapons/Melee/swords.ftl | 6 + .../Machines/Computers/computers.ftl | 3 + .../Structures/Machines/miningshop.ftl | 2 + .../ru-RU/ADT/research/technologies.ftl | 3 +- .../ru-RU/ADT/shuttles/docking-console.ftl | 6 + .../ru-RU/ADT/weapons/ranged/upgrades.ftl | 6 + .../Locale/ru-RU/ADT/weather/ashstorm.ftl | 3 + .../catalog/fills/lockers/cargo.ftl | 5 +- .../catalog/fills/lockers/suit_storage.ftl | 3 + .../ADTMaps/Nonstation/lavaland_outpost.yml | 15464 ++++++++ Resources/Maps/ADTMaps/Ruins/lavadunges.yml | 29676 ++++++++++++++++ Resources/Maps/ADTMaps/Shuttles/pioneer.yml | 815 +- .../Prototypes/ADT/Body/Organs/ashwalker.yml | 9 + .../ADT/Body/Prototypes/ashwalker.yml | 50 + .../ADT/Catalog/Fills/Lockers/cargo.yml | 22 + .../ADT/Catalog/Fills/Lockers/fill.txt | 1 - .../Catalog/Fills/Lockers/suit_storage.yml | 13 + .../ADT/Entities/Clothing/Head/helmets.yml | 22 + .../Entities/Clothing/OuterClothing/armor.yml | 71 +- .../ADT/Entities/Markers/Spawners/mobs.yml | 19 + .../ADT/Entities/Mobs/NPCs/lavaland.yml | 127 + .../ADT/Entities/Mobs/Species/ashwalker.yml | 11 + .../Objects/Specific/Salvage/droppod.yml | 23 + .../Objects/Specific/Salvage/fill.txt | 1 - .../Entities/Objects/Tools/pka_upgrade.yml | 105 + .../Objects/Weapons/Melee/crushers.yml | 191 + .../Entities/Objects/Weapons/Melee/swords.yml | 39 + .../Prototypes/ADT/Entities/Stations/base.yml | 7 + .../Structures/Doors/Airlocks/access.yml | 19 + .../Structures/Machines/computers.yml | 45 + .../Structures/Machines/miningshop.yml | 78 + .../ADT/Procedural/Themes/lavadunges.yml | 186 + .../ADT/Procedural/biome_templates.yml | 136 + .../Prototypes/ADT/Recipes/Lathes/salvage.yml | 29 + Resources/Prototypes/ADT/Research/arsenal.yml | 16 +- Resources/Prototypes/ADT/planets.yml | 73 + Resources/Prototypes/ADT/tags.yml | 15 + .../Clothing/OuterClothing/hardsuits.yml | 4 +- .../Entities/Mobs/NPCs/asteroid.yml | 1 + .../Entities/Mobs/NPCs/lavaland.yml | 1 + .../Objects/Misc/identification_cards.yml | 1 + .../Objects/Specific/Lavaland/MobLoot.yml | 36 + .../Objects/Specific/Salvage/ore_bag.yml | 3 +- .../Objects/Weapons/Guns/Basic/base_pka.yml | 16 +- .../Objects/Weapons/Guns/Basic/pka.yml | 9 + .../Objects/Weapons/Guns/Basic/staves.yml | 4 +- .../Weapons/Guns/Projectiles/projectiles.yml | 6 +- .../Entities/Objects/Weapons/Melee/mining.yml | 28 +- .../Entities/Stations/nanotrasen.yml | 1 + .../Entities/Structures/Machines/lathe.yml | 6 +- .../Recipes/Construction/structures.yml | 15 +- Resources/Prototypes/Recipes/Lathes/sheet.yml | 14 + .../Roles/Jobs/Cargo/salvage_specialist.yml | 9 +- Resources/Prototypes/weather.yml | 6 + .../Helmets/mining.rsi/equipped-HELMET.png | Bin 0 -> 675 bytes .../Clothing/Head/Helmets/mining.rsi/icon.png | Bin 0 -> 316 bytes .../Head/Helmets/mining.rsi/inhand-left.png | Bin 0 -> 640 bytes .../Head/Helmets/mining.rsi/inhand-right.png | Bin 0 -> 655 bytes .../Head/Helmets/mining.rsi/meta.json | 26 + .../equipped-OUTERCLOTHING-unshaded.png | Bin 0 -> 470 bytes .../equipped-OUTERCLOTHING-xeno.png | Bin 0 -> 1055 bytes .../mining.rsi/equipped-OUTERCLOTHING.png | Bin 0 -> 1348 bytes .../Armor/mining.rsi/icon-unshaded-layer.png | Bin 0 -> 269 bytes .../Armor/mining.rsi/icon-unshaded.png | Bin 0 -> 601 bytes .../Armor/mining.rsi/icon-xeno.png | Bin 0 -> 557 bytes .../OuterClothing/Armor/mining.rsi/icon.png | Bin 0 -> 520 bytes .../Armor/mining.rsi/inhand-left.png | Bin 0 -> 593 bytes .../Armor/mining.rsi/inhand-right.png | Bin 0 -> 597 bytes .../OuterClothing/Armor/mining.rsi/meta.json | 43 + .../Aliens/Lavaland/legion.rsi/legion.png | Bin 0 -> 3300 bytes .../Lavaland/legion.rsi/legion_skull.png | Bin 0 -> 908 bytes .../Mobs/Aliens/Lavaland/legion.rsi/meta.json | 19 + .../Lavaland/loot.rsi/asclepius_active.png | Bin 0 -> 1613 bytes .../Specific/Lavaland/loot.rsi/blue_cube.png | Bin 0 -> 735 bytes .../Lavaland/loot.rsi/demon_claws.png | Bin 0 -> 465 bytes .../Lavaland/loot.rsi/legion_core.png | Bin 0 -> 1073 bytes .../Lavaland/loot.rsi/legion_core_decayed.png | Bin 0 -> 509 bytes .../Lavaland/loot.rsi/legion_core_stable.png | Bin 0 -> 1073 bytes .../Lavaland/loot.rsi/legion_skull.png | Bin 0 -> 524 bytes .../Specific/Lavaland/loot.rsi/meta.json | 70 + .../Specific/Lavaland/loot.rsi/red_cube.png | Bin 0 -> 721 bytes .../Lavaland/loot.rsi/rune_scimmy.png | Bin 0 -> 646 bytes .../Objects/Specific/droppod.rsi/dropping.png | Bin 0 -> 28244 bytes .../Objects/Specific/droppod.rsi/meta.json | 20 + .../droppod_open.rsi/droppod_opened.png | Bin 0 -> 3308 bytes .../Specific/droppod_open.rsi/meta.json | 19 + .../ADT/Objects/Tools/upgrade.rsi/base.png | Bin 0 -> 255 bytes .../ADT/Objects/Tools/upgrade.rsi/display.png | Bin 0 -> 318 bytes .../ADT/Objects/Tools/upgrade.rsi/meta.json | 28 + .../Objects/Tools/upgrade.rsi/overlay-1.png | Bin 0 -> 122 bytes .../Objects/Tools/upgrade.rsi/overlay-2.png | Bin 0 -> 121 bytes .../Objects/Tools/upgrade.rsi/overlay-3.png | Bin 0 -> 111 bytes .../crusher_claws-inhands.rsi/inhand-left.png | Bin 0 -> 438 bytes .../inhand-right.png | Bin 0 -> 561 bytes .../crusher_claws-inhands.rsi/meta.json | 27 + .../wielded-inhand-left.png | Bin 0 -> 540 bytes .../wielded-inhand-right.png | Bin 0 -> 540 bytes .../Crushers/crusher_claws.rsi/icon-lit.png | Bin 0 -> 145 bytes .../crusher_claws.rsi/icon-uncharged.png | Bin 0 -> 163 bytes .../Melee/Crushers/crusher_claws.rsi/icon.png | Bin 0 -> 510 bytes .../Crushers/crusher_claws.rsi/meta.json | 26 + .../inhand-left.png | Bin 0 -> 1363 bytes .../inhand-right.png | Bin 0 -> 1638 bytes .../crusher_hammer-inhands.rsi/meta.json | 27 + .../wielded-inhand-left.png | Bin 0 -> 1007 bytes .../wielded-inhand-right.png | Bin 0 -> 1049 bytes .../Crushers/crusher_hammer.rsi/icon-lit.png | Bin 0 -> 145 bytes .../crusher_hammer.rsi/icon-uncharged.png | Bin 0 -> 175 bytes .../Crushers/crusher_hammer.rsi/icon.png | Bin 0 -> 690 bytes .../Crushers/crusher_hammer.rsi/meta.json | 26 + .../inhand-left.png | Bin 0 -> 760 bytes .../inhand-right.png | Bin 0 -> 892 bytes .../crusher_machete-inhands.rsi/meta.json | 19 + .../Crushers/crusher_machete.rsi/icon-lit.png | Bin 0 -> 144 bytes .../crusher_machete.rsi/icon-uncharged.png | Bin 0 -> 180 bytes .../Crushers/crusher_machete.rsi/icon.png | Bin 0 -> 652 bytes .../Crushers/crusher_machete.rsi/meta.json | 26 + .../crusher_spear-inhands.rsi/inhand-left.png | Bin 0 -> 1060 bytes .../inhand-right.png | Bin 0 -> 1145 bytes .../crusher_spear-inhands.rsi/meta.json | 27 + .../wielded-inhand-left.png | Bin 0 -> 781 bytes .../wielded-inhand-right.png | Bin 0 -> 914 bytes .../Crushers/crusher_spear.rsi/icon-lit.png | Bin 0 -> 145 bytes .../crusher_spear.rsi/icon-uncharged.png | Bin 0 -> 182 bytes .../Melee/Crushers/crusher_spear.rsi/icon.png | Bin 0 -> 625 bytes .../Crushers/crusher_spear.rsi/meta.json | 26 + .../Weapons/Melee/katana_cursed.rsi/icon.png | Bin 0 -> 1100 bytes .../Melee/katana_cursed.rsi/inhand-left.png | Bin 0 -> 1880 bytes .../Melee/katana_cursed.rsi/inhand-right.png | Bin 0 -> 1727 bytes .../Melee/katana_cursed.rsi/katana-shard.png | Bin 0 -> 485 bytes .../Weapons/Melee/katana_cursed.rsi/meta.json | 93 + .../Crates/necropolechest.rsi/crate.png | Bin 0 -> 1173 bytes .../Crates/necropolechest.rsi/crate_door.png | Bin 0 -> 1173 bytes .../Crates/necropolechest.rsi/crate_icon.png | Bin 0 -> 1173 bytes .../Crates/necropolechest.rsi/crate_open.png | Bin 0 -> 1096 bytes .../Crates/necropolechest.rsi/meta.json | 26 + .../Crates/necropolechest.rsi/welded.png | Bin 0 -> 395 bytes .../Aliens/Asteroid/goliath.rsi/goliath.png | Bin 2975 -> 3890 bytes .../Asteroid/goliath.rsi/goliath_dead.png | Bin 968 -> 1083 bytes Resources/migration.yml | 3 + 222 files changed, 49997 insertions(+), 476 deletions(-) create mode 100644 Content.Client/ADT/Animations/FlipOnHitSystem.cs create mode 100644 Content.Client/ADT/Animations/FlippingComponent.cs create mode 100644 Content.Client/ADT/MiningShop/MiningShopBui.cs create mode 100644 Content.Client/ADT/MiningShop/MiningShopButton.xaml create mode 100644 Content.Client/ADT/MiningShop/MiningShopButton.xaml.cs create mode 100644 Content.Client/ADT/MiningShop/MiningShopEntry.xaml create mode 100644 Content.Client/ADT/MiningShop/MiningShopEntry.xaml.cs create mode 100644 Content.Client/ADT/MiningShop/MiningShopPanel.xaml create mode 100644 Content.Client/ADT/MiningShop/MiningShopPanel.xaml.cs create mode 100644 Content.Client/ADT/MiningShop/MiningShopSection.xaml create mode 100644 Content.Client/ADT/MiningShop/MiningShopSection.xaml.cs create mode 100644 Content.Client/ADT/MiningShop/MiningShopSystem.cs create mode 100644 Content.Client/ADT/MiningShop/MiningShopVendorEntry.xaml create mode 100644 Content.Client/ADT/MiningShop/MiningShopWindow.xaml create mode 100644 Content.Client/ADT/MiningShop/MiningShopWindow.xaml.cs create mode 100644 Content.Client/ADT/Shuttles/Systems/DockingConsoleSystem.cs create mode 100644 Content.Client/ADT/Shuttles/UI/DockingConsoleBoundUserInterface.cs create mode 100644 Content.Client/ADT/Shuttles/UI/DockingConsoleWindow.xaml create mode 100644 Content.Client/ADT/Shuttles/UI/DockingConsoleWindow.xaml.cs create mode 100644 Content.Server/ADT/Animations/FlipOnHitSystem.cs create mode 100644 Content.Server/ADT/MiningShop/MiningShopSystem.cs create mode 100644 Content.Server/ADT/Planet/PlanetSystem.cs create mode 100644 Content.Server/ADT/Shuttles/Systems/DockingConsoleSystem.cs create mode 100644 Content.Server/ADT/Shuttles/Systems/DockingShuttleSystem.cs create mode 100644 Content.Server/ADT/Station/Components/StationPlanetSpawnerComponent.cs create mode 100644 Content.Server/ADT/Station/Systems/StationPlanetSpawnerSystem.cs create mode 100644 Content.Server/ADT/Weather/WeatherEffectsSystem.cs create mode 100644 Content.Server/ADT/Weather/WeatherSchedulerComponent.cs create mode 100644 Content.Server/ADT/Weather/WeatherSchedulerSystem.cs create mode 100644 Content.Shared/ADT/Animations/FlipOnHitComponent.cs create mode 100644 Content.Shared/ADT/Animations/SharedFlipOnHitSystem.cs create mode 100644 Content.Shared/ADT/Droppods/Components/DroppodComponent.cs create mode 100644 Content.Shared/ADT/Droppods/EntitySystems/DroppodSystem.cs create mode 100644 Content.Shared/ADT/Fauna/Components/FaunaComponent.cs create mode 100644 Content.Shared/ADT/MiningShop/MiningShopComponent.cs create mode 100644 Content.Shared/ADT/MiningShop/MiningShopSection.cs create mode 100644 Content.Shared/ADT/MiningShop/MiningShopVendorUI.cs create mode 100644 Content.Shared/ADT/MiningShop/MiningShopedUserEvent.cs create mode 100644 Content.Shared/ADT/MiningShop/SharedMiningShopSystem.cs create mode 100644 Content.Shared/ADT/Planet/PlanetPrototype.cs create mode 100644 Content.Shared/ADT/Shuttles/Components/DockingConsoleComponent.cs create mode 100644 Content.Shared/ADT/Shuttles/Components/DockingShuttleComponent.cs create mode 100644 Content.Shared/ADT/Shuttles/Components/MiningShuttleComponent.cs create mode 100644 Content.Shared/ADT/Shuttles/DockingConsoleUI.cs create mode 100644 Content.Shared/ADT/Shuttles/Systems/SharedDockingConsoleSystem.cs create mode 100644 Content.Shared/ADT/Shuttles/Systems/SharedDockingShuttleSystem.cs create mode 100644 Content.Shared/ADT/Weapons/Melee/BackstabDamageMultipilierComponent.cs create mode 100644 Content.Shared/ADT/Weapons/Melee/BackstabDamageMultipilierSystem.cs create mode 100644 Content.Shared/ADT/Weapons/Ranged/Upgrades/Components/GunComponentUpdateComponent.cs create mode 100644 Content.Shared/ADT/Weapons/Ranged/Upgrades/Components/GunUpgradeComponent.cs create mode 100644 Content.Shared/ADT/Weapons/Ranged/Upgrades/Components/GunUpgradeComponentsComponent.cs create mode 100644 Content.Shared/ADT/Weapons/Ranged/Upgrades/Components/GunUpgradeDamageComponent.cs create mode 100644 Content.Shared/ADT/Weapons/Ranged/Upgrades/Components/GunUpgradeFireRateComponent.cs create mode 100644 Content.Shared/ADT/Weapons/Ranged/Upgrades/Components/GunUpgradeSpeedComponent.cs create mode 100644 Content.Shared/ADT/Weapons/Ranged/Upgrades/Components/UpgradeableGunComponent.cs create mode 100644 Content.Shared/ADT/Weapons/Ranged/Upgrades/GunUpgradeSystem.cs create mode 100644 Content.Shared/ADT/Weather/Components/AshStormImmuneComponent.cs create mode 100644 Content.Shared/DeltaV/Salvage/Components/MiningPointsComponent.cs create mode 100644 Content.Shared/DeltaV/Salvage/Components/MiningPointsLatheComponent.cs create mode 100644 Content.Shared/DeltaV/Salvage/MiningPointsUI.cs create mode 100644 Content.Shared/DeltaV/Salvage/Systems/MiningPointsSystem.cs create mode 100644 Resources/Audio/ADT/Lavaland/the-lava-bubble-gurgled.ogg create mode 100644 Resources/Audio/ADT/Misc/droppod_landing.ogg create mode 100644 Resources/Locale/en-US/deltav/lathe/ui/lathe-menu.ftl create mode 100644 Resources/Locale/ru-RU/ADT/prototypes/Catalog/Fills/lockers/cargo.ftl create mode 100644 Resources/Locale/ru-RU/ADT/prototypes/Entities/Objects/Specific/lavaland.ftl create mode 100644 Resources/Locale/ru-RU/ADT/prototypes/Entities/Objects/Tools/pka_upgrade.ftl create mode 100644 Resources/Locale/ru-RU/ADT/prototypes/Entities/Objects/Weapons/Melee/crushers.ftl create mode 100644 Resources/Locale/ru-RU/ADT/prototypes/Entities/Structures/Machines/miningshop.ftl create mode 100644 Resources/Locale/ru-RU/ADT/shuttles/docking-console.ftl create mode 100644 Resources/Locale/ru-RU/ADT/weapons/ranged/upgrades.ftl create mode 100644 Resources/Locale/ru-RU/ADT/weather/ashstorm.ftl create mode 100644 Resources/Maps/ADTMaps/Nonstation/lavaland_outpost.yml create mode 100644 Resources/Maps/ADTMaps/Ruins/lavadunges.yml create mode 100644 Resources/Prototypes/ADT/Body/Organs/ashwalker.yml create mode 100644 Resources/Prototypes/ADT/Body/Prototypes/ashwalker.yml create mode 100644 Resources/Prototypes/ADT/Catalog/Fills/Lockers/cargo.yml delete mode 100644 Resources/Prototypes/ADT/Catalog/Fills/Lockers/fill.txt create mode 100644 Resources/Prototypes/ADT/Entities/Mobs/NPCs/lavaland.yml create mode 100644 Resources/Prototypes/ADT/Entities/Mobs/Species/ashwalker.yml create mode 100644 Resources/Prototypes/ADT/Entities/Objects/Specific/Salvage/droppod.yml delete mode 100644 Resources/Prototypes/ADT/Entities/Objects/Specific/Salvage/fill.txt create mode 100644 Resources/Prototypes/ADT/Entities/Objects/Tools/pka_upgrade.yml create mode 100644 Resources/Prototypes/ADT/Entities/Objects/Weapons/Melee/crushers.yml create mode 100644 Resources/Prototypes/ADT/Entities/Stations/base.yml create mode 100644 Resources/Prototypes/ADT/Entities/Structures/Doors/Airlocks/access.yml create mode 100644 Resources/Prototypes/ADT/Entities/Structures/Machines/computers.yml create mode 100644 Resources/Prototypes/ADT/Entities/Structures/Machines/miningshop.yml create mode 100644 Resources/Prototypes/ADT/Procedural/Themes/lavadunges.yml create mode 100644 Resources/Prototypes/ADT/Procedural/biome_templates.yml create mode 100644 Resources/Prototypes/ADT/Recipes/Lathes/salvage.yml create mode 100644 Resources/Prototypes/ADT/planets.yml create mode 100644 Resources/Prototypes/Entities/Objects/Specific/Lavaland/MobLoot.yml create mode 100644 Resources/Textures/ADT/Clothing/Head/Helmets/mining.rsi/equipped-HELMET.png create mode 100644 Resources/Textures/ADT/Clothing/Head/Helmets/mining.rsi/icon.png create mode 100644 Resources/Textures/ADT/Clothing/Head/Helmets/mining.rsi/inhand-left.png create mode 100644 Resources/Textures/ADT/Clothing/Head/Helmets/mining.rsi/inhand-right.png create mode 100644 Resources/Textures/ADT/Clothing/Head/Helmets/mining.rsi/meta.json create mode 100644 Resources/Textures/ADT/Clothing/OuterClothing/Armor/mining.rsi/equipped-OUTERCLOTHING-unshaded.png create mode 100644 Resources/Textures/ADT/Clothing/OuterClothing/Armor/mining.rsi/equipped-OUTERCLOTHING-xeno.png create mode 100644 Resources/Textures/ADT/Clothing/OuterClothing/Armor/mining.rsi/equipped-OUTERCLOTHING.png create mode 100644 Resources/Textures/ADT/Clothing/OuterClothing/Armor/mining.rsi/icon-unshaded-layer.png create mode 100644 Resources/Textures/ADT/Clothing/OuterClothing/Armor/mining.rsi/icon-unshaded.png create mode 100644 Resources/Textures/ADT/Clothing/OuterClothing/Armor/mining.rsi/icon-xeno.png create mode 100644 Resources/Textures/ADT/Clothing/OuterClothing/Armor/mining.rsi/icon.png create mode 100644 Resources/Textures/ADT/Clothing/OuterClothing/Armor/mining.rsi/inhand-left.png create mode 100644 Resources/Textures/ADT/Clothing/OuterClothing/Armor/mining.rsi/inhand-right.png create mode 100644 Resources/Textures/ADT/Clothing/OuterClothing/Armor/mining.rsi/meta.json create mode 100644 Resources/Textures/ADT/Mobs/Aliens/Lavaland/legion.rsi/legion.png create mode 100644 Resources/Textures/ADT/Mobs/Aliens/Lavaland/legion.rsi/legion_skull.png create mode 100644 Resources/Textures/ADT/Mobs/Aliens/Lavaland/legion.rsi/meta.json create mode 100644 Resources/Textures/ADT/Objects/Specific/Lavaland/loot.rsi/asclepius_active.png create mode 100644 Resources/Textures/ADT/Objects/Specific/Lavaland/loot.rsi/blue_cube.png create mode 100644 Resources/Textures/ADT/Objects/Specific/Lavaland/loot.rsi/demon_claws.png create mode 100644 Resources/Textures/ADT/Objects/Specific/Lavaland/loot.rsi/legion_core.png create mode 100644 Resources/Textures/ADT/Objects/Specific/Lavaland/loot.rsi/legion_core_decayed.png create mode 100644 Resources/Textures/ADT/Objects/Specific/Lavaland/loot.rsi/legion_core_stable.png create mode 100644 Resources/Textures/ADT/Objects/Specific/Lavaland/loot.rsi/legion_skull.png create mode 100644 Resources/Textures/ADT/Objects/Specific/Lavaland/loot.rsi/meta.json create mode 100644 Resources/Textures/ADT/Objects/Specific/Lavaland/loot.rsi/red_cube.png create mode 100644 Resources/Textures/ADT/Objects/Specific/Lavaland/loot.rsi/rune_scimmy.png create mode 100644 Resources/Textures/ADT/Objects/Specific/droppod.rsi/dropping.png create mode 100644 Resources/Textures/ADT/Objects/Specific/droppod.rsi/meta.json create mode 100644 Resources/Textures/ADT/Objects/Specific/droppod_open.rsi/droppod_opened.png create mode 100644 Resources/Textures/ADT/Objects/Specific/droppod_open.rsi/meta.json create mode 100644 Resources/Textures/ADT/Objects/Tools/upgrade.rsi/base.png create mode 100644 Resources/Textures/ADT/Objects/Tools/upgrade.rsi/display.png create mode 100644 Resources/Textures/ADT/Objects/Tools/upgrade.rsi/meta.json create mode 100644 Resources/Textures/ADT/Objects/Tools/upgrade.rsi/overlay-1.png create mode 100644 Resources/Textures/ADT/Objects/Tools/upgrade.rsi/overlay-2.png create mode 100644 Resources/Textures/ADT/Objects/Tools/upgrade.rsi/overlay-3.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_claws-inhands.rsi/inhand-left.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_claws-inhands.rsi/inhand-right.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_claws-inhands.rsi/meta.json create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_claws-inhands.rsi/wielded-inhand-left.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_claws-inhands.rsi/wielded-inhand-right.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_claws.rsi/icon-lit.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_claws.rsi/icon-uncharged.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_claws.rsi/icon.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_claws.rsi/meta.json create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_hammer-inhands.rsi/inhand-left.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_hammer-inhands.rsi/inhand-right.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_hammer-inhands.rsi/meta.json create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_hammer-inhands.rsi/wielded-inhand-left.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_hammer-inhands.rsi/wielded-inhand-right.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_hammer.rsi/icon-lit.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_hammer.rsi/icon-uncharged.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_hammer.rsi/icon.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_hammer.rsi/meta.json create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_machete-inhands.rsi/inhand-left.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_machete-inhands.rsi/inhand-right.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_machete-inhands.rsi/meta.json create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_machete.rsi/icon-lit.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_machete.rsi/icon-uncharged.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_machete.rsi/icon.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_machete.rsi/meta.json create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_spear-inhands.rsi/inhand-left.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_spear-inhands.rsi/inhand-right.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_spear-inhands.rsi/meta.json create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_spear-inhands.rsi/wielded-inhand-left.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_spear-inhands.rsi/wielded-inhand-right.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_spear.rsi/icon-lit.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_spear.rsi/icon-uncharged.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_spear.rsi/icon.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/Crushers/crusher_spear.rsi/meta.json create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/katana_cursed.rsi/icon.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/katana_cursed.rsi/inhand-left.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/katana_cursed.rsi/inhand-right.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/katana_cursed.rsi/katana-shard.png create mode 100644 Resources/Textures/ADT/Objects/Weapons/Melee/katana_cursed.rsi/meta.json create mode 100644 Resources/Textures/ADT/Structures/Storage/Crates/necropolechest.rsi/crate.png create mode 100644 Resources/Textures/ADT/Structures/Storage/Crates/necropolechest.rsi/crate_door.png create mode 100644 Resources/Textures/ADT/Structures/Storage/Crates/necropolechest.rsi/crate_icon.png create mode 100644 Resources/Textures/ADT/Structures/Storage/Crates/necropolechest.rsi/crate_open.png create mode 100644 Resources/Textures/ADT/Structures/Storage/Crates/necropolechest.rsi/meta.json create mode 100644 Resources/Textures/ADT/Structures/Storage/Crates/necropolechest.rsi/welded.png diff --git a/Content.Client/ADT/Animations/FlipOnHitSystem.cs b/Content.Client/ADT/Animations/FlipOnHitSystem.cs new file mode 100644 index 00000000000..4bf491ad406 --- /dev/null +++ b/Content.Client/ADT/Animations/FlipOnHitSystem.cs @@ -0,0 +1,76 @@ +using Robust.Client.Animations; +using Robust.Client.GameObjects; +using Robust.Shared.Animations; +using Robust.Shared.Timing; +using Content.Shared.Animations; + +namespace Content.Client.Animations; + +public sealed class FlipOnHitSystem : SharedFlipOnHitSystem +{ + [Dependency] private readonly AnimationPlayerSystem _animationSystem = default!; + [Dependency] private readonly IGameTiming _timing = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnAnimationComplete); + SubscribeAllEvent(ev => PlayAnimation(GetEntity(ev.User))); + } + + private void OnAnimationComplete(Entity ent, ref AnimationCompletedEvent args) + { + if (args.Key != FlippingComponent.AnimationKey) + return; + + PlayAnimation(ent); + } + + protected override void PlayAnimation(EntityUid user) + { + if (!_timing.IsFirstTimePredicted) + return; + + if (TerminatingOrDeleted(user)) + return; + + if (_animationSystem.HasRunningAnimation(user, FlippingComponent.AnimationKey)) + { + EnsureComp(user); + return; + } + + RemComp(user); + + var baseAngle = Angle.Zero; + if (EntityManager.TryGetComponent(user, out SpriteComponent? sprite)) + baseAngle = sprite.Rotation; + + var degrees = baseAngle.Degrees; + + var animation = new Animation + { + Length = TimeSpan.FromMilliseconds(500), + AnimationTracks = + { + new AnimationTrackComponentProperty + { + ComponentType = typeof(SpriteComponent), + Property = nameof(SpriteComponent.Rotation), + InterpolationMode = AnimationInterpolationMode.Linear, + KeyFrames = + { + new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(baseAngle.Degrees), 0f), + new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(baseAngle.Degrees + 180), 0.25f), + new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(baseAngle.Degrees + 360), 0.25f), + new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(baseAngle.Degrees), 0f), + } + } + } + }; + + + _animationSystem.Play(user, animation, FlippingComponent.AnimationKey); + } +} diff --git a/Content.Client/ADT/Animations/FlippingComponent.cs b/Content.Client/ADT/Animations/FlippingComponent.cs new file mode 100644 index 00000000000..0d0f6ade090 --- /dev/null +++ b/Content.Client/ADT/Animations/FlippingComponent.cs @@ -0,0 +1,7 @@ +namespace Content.Client.Animations; + +[RegisterComponent] +public sealed partial class FlippingComponent : Component +{ + public const string AnimationKey = "flip"; +} diff --git a/Content.Client/ADT/MiningShop/MiningShopBui.cs b/Content.Client/ADT/MiningShop/MiningShopBui.cs new file mode 100644 index 00000000000..b548192106b --- /dev/null +++ b/Content.Client/ADT/MiningShop/MiningShopBui.cs @@ -0,0 +1,221 @@ +using System.Linq; +using Content.Shared.ADT.MiningShop; +using Content.Shared.Mind; +using Content.Shared.ADT.Salvage.Systems; +using Content.Shared.Roles.Jobs; +using JetBrains.Annotations; +using Robust.Client.GameObjects; +using Robust.Client.Player; +using Robust.Client.ResourceManagement; +using Robust.Client.UserInterface.CustomControls; +using Robust.Shared.Prototypes; +using Robust.Shared.Utility; +using static System.StringComparison; +using static Robust.Client.UserInterface.Controls.LineEdit; + +namespace Content.Client.ADT.MiningShop; + +[UsedImplicitly] +public sealed class MiningShopBui : BoundUserInterface +{ + [Dependency] private readonly IPlayerManager _player = default!; + [Dependency] private readonly IPrototypeManager _prototype = default!; + [Dependency] private readonly IResourceCache _resource = default!; + private readonly MiningPointsSystem _miningPoints; + private MiningShopWindow? _window; + public MiningShopBui(EntityUid owner, Enum uiKey) : base(owner, uiKey) + { + _miningPoints = EntMan.System(); + } + + protected override void Open() + { + _window = new MiningShopWindow(); + _window.OnClose += Close; + _window.Title = EntMan.GetComponentOrNull(Owner)?.EntityName ?? "MiningShop"; + + if (EntMan.TryGetComponent(Owner, out MiningShopComponent? vendor)) + { + for (var sectionIndex = 0; sectionIndex < vendor.Sections.Count; sectionIndex++) + { + var section = vendor.Sections[sectionIndex]; + + var uiSection = new MiningShopSection(); + uiSection.Label.SetMessage(GetSectionName(section)); + + + for (var entryIndex = 0; entryIndex < section.Entries.Count; entryIndex++) + { + var entry = section.Entries[entryIndex]; + var uiEntry = new MiningShopEntry(); + + if (_prototype.TryIndex(entry.Id, out var entity)) + { + uiEntry.Texture.Textures = SpriteComponent.GetPrototypeTextures(entity, _resource) + .Select(o => o.Default) + .ToList(); + uiEntry.Panel.Button.Label.Text = entry.Name?.Replace("\\n", "\n") ?? entity.Name; + + var name = entity.Name; + var color = MiningShopPanel.DefaultColor; + var borderColor = MiningShopPanel.DefaultBorderColor; + var hoverColor = MiningShopPanel.DefaultBorderColor; + + uiEntry.Panel.Color = color; + uiEntry.Panel.BorderColor = borderColor; + uiEntry.Panel.HoveredColor = hoverColor; + + var msg = new FormattedMessage(); + msg.AddText(name); + msg.PushNewline(); + + if (!string.IsNullOrWhiteSpace(entity.Description)) + msg.AddText(entity.Description); + + var tooltip = new Tooltip(); + tooltip.SetMessage(msg); + + uiEntry.TooltipLabel.ToolTip = entity.Description; + uiEntry.TooltipLabel.TooltipDelay = 0; + uiEntry.TooltipLabel.TooltipSupplier = _ => tooltip; + + var sectionI = sectionIndex; + var entryI = entryIndex; + uiEntry.Panel.Button.OnPressed += _ => OnButtonPressed(sectionI, entryI); + } + + uiSection.Entries.AddChild(uiEntry); + } + + _window.Sections.AddChild(uiSection); + } + } + _window.Express.OnPressed += _ => OnExpressDeliveryButtonPressed(); + _window.Search.OnTextChanged += OnSearchChanged; + + Refresh(); + + _window.OpenCentered(); + } + + private void OnButtonPressed(int sectionIndex, int entryIndex) + { + var msg = new MiningShopBuiMsg(sectionIndex, entryIndex); + SendMessage(msg); + Refresh(); + } + + private void OnExpressDeliveryButtonPressed() + { + var msg = new MiningShopExpressDeliveryBuiMsg(); + SendMessage(msg); + Refresh(); + } + + private void OnSearchChanged(LineEditEventArgs args) + { + if (_window == null) + return; + + foreach (var sectionControl in _window.Sections.Children) + { + if (sectionControl is not MiningShopSection section) + continue; + + var any = false; + foreach (var entriesControl in section.Entries.Children) + { + if (entriesControl is not MiningShopEntry entry) + continue; + + if (string.IsNullOrWhiteSpace(args.Text)) + entry.Visible = true; + else + entry.Visible = entry.Panel.Button.Label.Text?.Contains(args.Text, OrdinalIgnoreCase) ?? false; + + if (entry.Visible) + any = true; + } + + section.Visible = any; + } + } + + public void Refresh() + { + if (_window == null || _player.LocalEntity == null) + return; + + if (!EntMan.TryGetComponent(Owner, out MiningShopComponent? vendor)) + return; + + List names = new List(); + + foreach (var order in vendor.OrderList) + { + var name = _prototype.TryIndex(order.Id, out var entity) ? entity.Name : order.Name; + if (name != null) + names.Add(name); + } + var orders = string.Join(", ", names); + + var userpoints = _miningPoints.TryFindIdCard(_player.LocalEntity.Value)?.Comp?.Points ?? 0; + + _window.YourPurchases.Text = $"Orders: {orders}"; + + _window.Express.Text = $"Express dilevery"; + + _window.PointsLabel.Text = $"Points Remaining: {userpoints}"; + + for (var sectionIndex = 0; sectionIndex < vendor.Sections.Count; sectionIndex++) + { + var section = vendor.Sections[sectionIndex]; + var uiSection = (MiningShopSection) _window.Sections.GetChild(sectionIndex); + uiSection.Label.SetMessage(GetSectionName(section)); + + var sectionDisabled = false; + + for (var entryIndex = 0; entryIndex < section.Entries.Count; entryIndex++) + { + var entry = section.Entries[entryIndex]; + var uiEntry = (MiningShopEntry) uiSection.Entries.GetChild(entryIndex); + var disabled = sectionDisabled; + + if (userpoints < entry.Price) + { + disabled = true; + } + + uiEntry.Price.Text = $"{entry.Price}P"; + + uiEntry.Panel.Button.Disabled = disabled; + } + } + } + + protected override void Dispose(bool disposing) + { + if (disposing) + _window?.Dispose(); + } + + protected override void ReceiveMessage(BoundUserInterfaceMessage message) + { + switch (message) + { + case MiningShopRefreshBuiMsg: + Refresh(); + break; + } + } + + private FormattedMessage GetSectionName(SharedMiningShopSection section) + { + var name = new FormattedMessage(); + name.PushTag(new MarkupNode("bold", new MarkupParameter(section.Name.ToUpperInvariant()), null)); + name.AddText(section.Name.ToUpperInvariant()); + + name.Pop(); + return name; + } +} diff --git a/Content.Client/ADT/MiningShop/MiningShopButton.xaml b/Content.Client/ADT/MiningShop/MiningShopButton.xaml new file mode 100644 index 00000000000..0b4faeac7c2 --- /dev/null +++ b/Content.Client/ADT/MiningShop/MiningShopButton.xaml @@ -0,0 +1,7 @@ + + + + diff --git a/Content.Client/ADT/MiningShop/MiningShopButton.xaml.cs b/Content.Client/ADT/MiningShop/MiningShopButton.xaml.cs new file mode 100644 index 00000000000..28c60b97223 --- /dev/null +++ b/Content.Client/ADT/MiningShop/MiningShopButton.xaml.cs @@ -0,0 +1,22 @@ +using Robust.Client.AutoGenerated; +using Robust.Client.UserInterface.Controls; +using Robust.Client.UserInterface.XAML; + +namespace Content.Client.ADT.MiningShop; + +[GenerateTypedNameReferences] +public sealed partial class MiningShopButton : Button +{ + public event Action? OnDrawModeChanged; + + public MiningShopButton() + { + RobustXamlLoader.Load(this); + } + + protected override void DrawModeChanged() + { + OnDrawModeChanged?.Invoke(); + } +} + diff --git a/Content.Client/ADT/MiningShop/MiningShopEntry.xaml b/Content.Client/ADT/MiningShop/MiningShopEntry.xaml new file mode 100644 index 00000000000..664c30a73eb --- /dev/null +++ b/Content.Client/ADT/MiningShop/MiningShopEntry.xaml @@ -0,0 +1,13 @@ + + + +