From aeedff5caace71c03381634e9658616e863c2298 Mon Sep 17 00:00:00 2001 From: Ed <96445749+TheShuEd@users.noreply.github.com> Date: Mon, 5 May 2025 15:19:44 +0300 Subject: [PATCH] Demiplane exploration map (#1251) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * dehardcode nodeTreeControl part 1 * finish * demiplane map system setup * link map entity with station data! * random demiplane map generation * redesign demiplane map node tree * center * map generate v2 * location generation * modifier generation * missing location icons * ui polish * data refactor * fix line color * ejectabling * split demiplane component into two * blocker attempt * revoking * fix frontier calculation * dimensit * demiplane core room spawning * demiplane cool destruction * Update round_end.yml * progression works now! * Update CP14NodeTree.cs * Update CP14NodeTree.cs * documentation pass * fix abusing, some balance pass * demiplane naming fix * см * location names * delete old keys * Update buy.yml * Update migration.yml * fix guidebook * Update misc.yml * Update misc.yml --- .../CP14ClientStationDemiplaneMapSystem.cs | 7 + .../CP14DemiplaneMapBoundUserInterface.cs | 34 + .../CP14DemiplaneMapWindow.xaml | 72 ++ .../CP14DemiplaneMapWindow.xaml.cs | 246 +++++++ .../Skill/Ui/CP14SkillTreeGraphControl.xaml | 7 - .../Ui/CP14SkillTreeGraphControl.xaml.cs | 227 ------ .../Systems/NodeTree/CP14NodeTree.cs | 38 + .../NodeTree/CP14NodeTreeGraphControl.xaml | 6 + .../NodeTree/CP14NodeTreeGraphControl.xaml.cs | 179 +++++ .../Systems/Skill/CP14SkillUIController.cs | 164 ++++- .../Systems/Skill/Window/CP14SkillWindow.xaml | 9 +- .../CP14DemiplaneSystem.Connections.cs | 8 +- .../CP14DemiplaneSystem.Destruction.cs | 27 + .../CP14DemiplaneSystem.Generation.cs | 267 ++++---- .../CP14DemiplaneSystem.Stabilization.cs | 2 +- .../_CP14/Demiplane/CP14DemiplaneSystem.cs | 2 +- .../CP14DemiplaneAutoOpenComponent.cs | 9 - .../Components/CP14DemiplaneCoreComponent.cs | 19 + ...onent.cs => CP14DemiplaneDataComponent.cs} | 16 +- .../CP14DemiplaneMapNodeBlokerComponent.cs | 19 + .../CP14DemiplaneRandomGeneratorComponent.cs | 23 + .../CP14DemiplaneTravelingSystem.cs | 2 +- .../CP14StationDemiplaneMapSystem.cs | 350 ++++++++++ .../CP14WeatherControllerSystem.cs | 8 +- .../CP14DemiplaneTimedDestructionComponent.cs | 2 +- .../CP14DemiplaneLocationPrototype.cs | 4 + .../CP14SpecialDemiplanePrototype.cs | 33 + .../DemiplaneTraveling/CP14DemiplaneMapUI.cs | 36 + .../CP14DemiplaneNavigationMapComponent.cs | 20 + .../CP14SharedStationDemiplaneMapSystem.cs | 47 ++ .../CP14StationDemiplaneMapComponent.cs | 22 + .../Prototypes/CP14SkillTreePrototype.cs | 10 +- .../en-US/_CP14/demiplane/demiplane.ftl | 5 +- .../en-US/_CP14/demiplane/locations.ftl | 2 +- .../Locale/en-US/_CP14/demiplane/map_ui.ftl | 15 + .../en-US/_CP14/demiplane/modifiers.ftl | 6 +- .../ru-RU/_CP14/demiplane/demiplane.ftl | 5 +- .../ru-RU/_CP14/demiplane/locations.ftl | 4 +- .../Locale/ru-RU/_CP14/demiplane/map_ui.ftl | 15 + .../ru-RU/_CP14/demiplane/modifiers.ftl | 58 +- .../Maps/_CP14/Dungeon/demiplane_core.yml | 648 ++++++++++++++++++ ...demiplan_enter.yml => demiplane_enter.yml} | 0 .../Catalog/Cargo/Store/SpiceStream/buy.yml | 21 - .../Actions/Spells/Meta/mana_splitting.yml | 8 + .../_CP14/Entities/Effects/sky_lightning.yml | 40 +- .../Entities/Objects/Tools/demiplane_keys.yml | 75 +- .../_CP14/Entities/Stations/base.yml | 9 +- .../{Thaumaturgy => Demiplanes}/round_end.yml | 92 ++- .../Entities/Structures/Walls/natural.yml | 44 +- .../Prototypes/_CP14/Parallax/astral.yml | 18 + .../_CP14/Parallax/stars_purple.toml | 56 ++ .../_CP14/Parallax/stars_purple_2.toml | 56 ++ .../Locations/{t1_caves.yml => cave.yml} | 5 +- .../{t1_ice_caves.yml => cave_ice.yml} | 7 +- .../{t2_magma_caves.yml => cave_magma.yml} | 5 +- .../{t2_grass_geode.yml => cave_swamp.yml} | 9 +- ...ssland_island.yml => island_grassland.yml} | 5 +- ...and_ring.yml => island_grassland_ring.yml} | 5 +- .../{t1_snow_island.yml => island_snow.yml} | 7 +- .../{t2_leaf_maze.yml => leaf_maze.yml} | 7 +- .../{t1_wastelands.yml => wastelands.yml} | 7 +- .../Demiplane/Modifiers/Danger/misc.yml | 4 +- .../Demiplane/Modifiers/Danger/mobs.yml | 52 +- .../Demiplane/Modifiers/Reward/misc.yml | 22 +- .../Demiplane/Modifiers/Reward/ores.yml | 16 +- .../Demiplane/Modifiers/special.yml | 35 +- .../Procedural/Demiplane/Special/misc.yml | 55 ++ .../_CP14/Procedural/Demiplane/core_room.yml | 50 ++ .../_CP14/Procedural/Demiplane/enter_room.yml | 12 +- Resources/Prototypes/_CP14/weather.yml | 19 +- .../JobsTabs/AdventurersTabs/Demiplanes.xml | 11 +- .../JobsTabs/AdventurersTabs/Demiplanes.xml | 11 +- .../Misc/demiplane_locations.rsi/caves.png | Bin 0 -> 364 bytes .../grassland_island.png | Bin 0 -> 305 bytes .../demiplane_locations.rsi/ice_caves.png | Bin 0 -> 429 bytes .../demiplane_locations.rsi/leaf_maze.png | Bin 0 -> 463 bytes .../demiplane_locations.rsi/magma_caves.png | Bin 0 -> 430 bytes .../Misc/demiplane_locations.rsi/meta.json | 35 + .../demiplane_locations.rsi/snow_island.png | Bin 0 -> 308 bytes .../demiplane_locations.rsi/swamp_caves.png | Bin 0 -> 505 bytes .../demiplane_locations.rsi/wastelands.png | Bin 0 -> 265 bytes .../Interface/{Skills => Misc}/skillpoint.png | Bin .../default.rsi/frame.png | Bin .../default.rsi/hovered.png | Bin .../default.rsi/learned.png | Bin .../Interface/NodeTree/default.rsi/meta.json | 23 + .../default.rsi/selected.png | Bin .../NodeTree/demiplane_map.rsi/center.png | Bin 0 -> 997 bytes .../NodeTree/demiplane_map.rsi/frame.png | Bin 0 -> 307 bytes .../NodeTree/demiplane_map.rsi/hovered.png | Bin 0 -> 385 bytes .../NodeTree/demiplane_map.rsi/learned.png | Bin 0 -> 485 bytes .../demiplane_map.rsi}/meta.json | 2 +- .../NodeTree/demiplane_map.rsi/selected.png | Bin 0 -> 330 bytes .../Skills/default.rsi/available.png | Bin 373 -> 0 bytes .../dimension_core.png | Bin 0 -> 1829 bytes .../energy_monolith_big.rsi/meta.json | 3 + .../Walls/Natural/cave_dimensit.rsi/full.png | Bin 0 -> 4255 bytes .../Walls/Natural/cave_dimensit.rsi/meta.json | 46 ++ .../Walls/Natural/cave_dimensit.rsi/wall0.png | Bin 0 -> 4545 bytes .../Walls/Natural/cave_dimensit.rsi/wall1.png | Bin 0 -> 4144 bytes .../Walls/Natural/cave_dimensit.rsi/wall2.png | Bin 0 -> 4578 bytes .../Walls/Natural/cave_dimensit.rsi/wall3.png | Bin 0 -> 4136 bytes .../Walls/Natural/cave_dimensit.rsi/wall4.png | Bin 0 -> 4209 bytes .../Walls/Natural/cave_dimensit.rsi/wall5.png | Bin 0 -> 3628 bytes .../Walls/Natural/cave_dimensit.rsi/wall6.png | Bin 0 -> 4154 bytes .../Walls/Natural/cave_dimensit.rsi/wall7.png | Bin 0 -> 2895 bytes .../Natural/cave_stone_silver.rsi/meta.json | 2 +- Resources/migration.yml | 6 +- 108 files changed, 2936 insertions(+), 617 deletions(-) create mode 100644 Content.Client/_CP14/DemiplaneTraveling/CP14ClientStationDemiplaneMapSystem.cs create mode 100644 Content.Client/_CP14/DemiplaneTraveling/CP14DemiplaneMapBoundUserInterface.cs create mode 100644 Content.Client/_CP14/DemiplaneTraveling/CP14DemiplaneMapWindow.xaml create mode 100644 Content.Client/_CP14/DemiplaneTraveling/CP14DemiplaneMapWindow.xaml.cs delete mode 100644 Content.Client/_CP14/Skill/Ui/CP14SkillTreeGraphControl.xaml delete mode 100644 Content.Client/_CP14/Skill/Ui/CP14SkillTreeGraphControl.xaml.cs create mode 100644 Content.Client/_CP14/UserInterface/Systems/NodeTree/CP14NodeTree.cs create mode 100644 Content.Client/_CP14/UserInterface/Systems/NodeTree/CP14NodeTreeGraphControl.xaml create mode 100644 Content.Client/_CP14/UserInterface/Systems/NodeTree/CP14NodeTreeGraphControl.xaml.cs delete mode 100644 Content.Server/_CP14/Demiplane/Components/CP14DemiplaneAutoOpenComponent.cs create mode 100644 Content.Server/_CP14/Demiplane/Components/CP14DemiplaneCoreComponent.cs rename Content.Server/_CP14/Demiplane/Components/{CP14DemiplaneGeneratorDataComponent.cs => CP14DemiplaneDataComponent.cs} (53%) create mode 100644 Content.Server/_CP14/Demiplane/Components/CP14DemiplaneMapNodeBlokerComponent.cs create mode 100644 Content.Server/_CP14/Demiplane/Components/CP14DemiplaneRandomGeneratorComponent.cs create mode 100644 Content.Server/_CP14/DemiplaneTraveling/CP14StationDemiplaneMapSystem.cs create mode 100644 Content.Shared/_CP14/Demiplane/Prototypes/CP14SpecialDemiplanePrototype.cs create mode 100644 Content.Shared/_CP14/DemiplaneTraveling/CP14DemiplaneMapUI.cs create mode 100644 Content.Shared/_CP14/DemiplaneTraveling/CP14DemiplaneNavigationMapComponent.cs create mode 100644 Content.Shared/_CP14/DemiplaneTraveling/CP14SharedStationDemiplaneMapSystem.cs create mode 100644 Content.Shared/_CP14/DemiplaneTraveling/CP14StationDemiplaneMapComponent.cs create mode 100644 Resources/Locale/en-US/_CP14/demiplane/map_ui.ftl create mode 100644 Resources/Locale/ru-RU/_CP14/demiplane/map_ui.ftl create mode 100644 Resources/Maps/_CP14/Dungeon/demiplane_core.yml rename Resources/Maps/_CP14/Dungeon/{demiplan_enter.yml => demiplane_enter.yml} (100%) rename Resources/Prototypes/_CP14/Entities/Structures/Specific/{Thaumaturgy => Demiplanes}/round_end.yml (51%) create mode 100644 Resources/Prototypes/_CP14/Parallax/astral.yml create mode 100644 Resources/Prototypes/_CP14/Parallax/stars_purple.toml create mode 100644 Resources/Prototypes/_CP14/Parallax/stars_purple_2.toml rename Resources/Prototypes/_CP14/Procedural/Demiplane/Locations/{t1_caves.yml => cave.yml} (94%) rename Resources/Prototypes/_CP14/Procedural/Demiplane/Locations/{t1_ice_caves.yml => cave_ice.yml} (86%) rename Resources/Prototypes/_CP14/Procedural/Demiplane/Locations/{t2_magma_caves.yml => cave_magma.yml} (96%) rename Resources/Prototypes/_CP14/Procedural/Demiplane/Locations/{t2_grass_geode.yml => cave_swamp.yml} (94%) rename Resources/Prototypes/_CP14/Procedural/Demiplane/Locations/{t1_grassland_island.yml => island_grassland.yml} (95%) rename Resources/Prototypes/_CP14/Procedural/Demiplane/Locations/{t2_grassland_island_ring.yml => island_grassland_ring.yml} (96%) rename Resources/Prototypes/_CP14/Procedural/Demiplane/Locations/{t1_snow_island.yml => island_snow.yml} (93%) rename Resources/Prototypes/_CP14/Procedural/Demiplane/Locations/{t2_leaf_maze.yml => leaf_maze.yml} (89%) rename Resources/Prototypes/_CP14/Procedural/Demiplane/Locations/{t1_wastelands.yml => wastelands.yml} (90%) create mode 100644 Resources/Prototypes/_CP14/Procedural/Demiplane/Special/misc.yml create mode 100644 Resources/Prototypes/_CP14/Procedural/Demiplane/core_room.yml create mode 100644 Resources/Textures/_CP14/Interface/Misc/demiplane_locations.rsi/caves.png create mode 100644 Resources/Textures/_CP14/Interface/Misc/demiplane_locations.rsi/grassland_island.png create mode 100644 Resources/Textures/_CP14/Interface/Misc/demiplane_locations.rsi/ice_caves.png create mode 100644 Resources/Textures/_CP14/Interface/Misc/demiplane_locations.rsi/leaf_maze.png create mode 100644 Resources/Textures/_CP14/Interface/Misc/demiplane_locations.rsi/magma_caves.png create mode 100644 Resources/Textures/_CP14/Interface/Misc/demiplane_locations.rsi/meta.json create mode 100644 Resources/Textures/_CP14/Interface/Misc/demiplane_locations.rsi/snow_island.png create mode 100644 Resources/Textures/_CP14/Interface/Misc/demiplane_locations.rsi/swamp_caves.png create mode 100644 Resources/Textures/_CP14/Interface/Misc/demiplane_locations.rsi/wastelands.png rename Resources/Textures/_CP14/Interface/{Skills => Misc}/skillpoint.png (100%) rename Resources/Textures/_CP14/Interface/{Skills => NodeTree}/default.rsi/frame.png (100%) rename Resources/Textures/_CP14/Interface/{Skills => NodeTree}/default.rsi/hovered.png (100%) rename Resources/Textures/_CP14/Interface/{Skills => NodeTree}/default.rsi/learned.png (100%) create mode 100644 Resources/Textures/_CP14/Interface/NodeTree/default.rsi/meta.json rename Resources/Textures/_CP14/Interface/{Skills => NodeTree}/default.rsi/selected.png (100%) create mode 100644 Resources/Textures/_CP14/Interface/NodeTree/demiplane_map.rsi/center.png create mode 100644 Resources/Textures/_CP14/Interface/NodeTree/demiplane_map.rsi/frame.png create mode 100644 Resources/Textures/_CP14/Interface/NodeTree/demiplane_map.rsi/hovered.png create mode 100644 Resources/Textures/_CP14/Interface/NodeTree/demiplane_map.rsi/learned.png rename Resources/Textures/_CP14/Interface/{Skills/default.rsi => NodeTree/demiplane_map.rsi}/meta.json (92%) create mode 100644 Resources/Textures/_CP14/Interface/NodeTree/demiplane_map.rsi/selected.png delete mode 100644 Resources/Textures/_CP14/Interface/Skills/default.rsi/available.png create mode 100644 Resources/Textures/_CP14/Structures/Specific/Thaumaturgy/energy_monolith_big.rsi/dimension_core.png create mode 100644 Resources/Textures/_CP14/Structures/Walls/Natural/cave_dimensit.rsi/full.png create mode 100644 Resources/Textures/_CP14/Structures/Walls/Natural/cave_dimensit.rsi/meta.json create mode 100644 Resources/Textures/_CP14/Structures/Walls/Natural/cave_dimensit.rsi/wall0.png create mode 100644 Resources/Textures/_CP14/Structures/Walls/Natural/cave_dimensit.rsi/wall1.png create mode 100644 Resources/Textures/_CP14/Structures/Walls/Natural/cave_dimensit.rsi/wall2.png create mode 100644 Resources/Textures/_CP14/Structures/Walls/Natural/cave_dimensit.rsi/wall3.png create mode 100644 Resources/Textures/_CP14/Structures/Walls/Natural/cave_dimensit.rsi/wall4.png create mode 100644 Resources/Textures/_CP14/Structures/Walls/Natural/cave_dimensit.rsi/wall5.png create mode 100644 Resources/Textures/_CP14/Structures/Walls/Natural/cave_dimensit.rsi/wall6.png create mode 100644 Resources/Textures/_CP14/Structures/Walls/Natural/cave_dimensit.rsi/wall7.png diff --git a/Content.Client/_CP14/DemiplaneTraveling/CP14ClientStationDemiplaneMapSystem.cs b/Content.Client/_CP14/DemiplaneTraveling/CP14ClientStationDemiplaneMapSystem.cs new file mode 100644 index 0000000000..c4cedc14c0 --- /dev/null +++ b/Content.Client/_CP14/DemiplaneTraveling/CP14ClientStationDemiplaneMapSystem.cs @@ -0,0 +1,7 @@ +using Content.Shared._CP14.DemiplaneTraveling; + +namespace Content.Client._CP14.DemiplaneTraveling; + +public sealed partial class CP14ClientStationDemiplaneMapSystem : CP14SharedStationDemiplaneMapSystem +{ +} diff --git a/Content.Client/_CP14/DemiplaneTraveling/CP14DemiplaneMapBoundUserInterface.cs b/Content.Client/_CP14/DemiplaneTraveling/CP14DemiplaneMapBoundUserInterface.cs new file mode 100644 index 0000000000..1ff5e85484 --- /dev/null +++ b/Content.Client/_CP14/DemiplaneTraveling/CP14DemiplaneMapBoundUserInterface.cs @@ -0,0 +1,34 @@ +using Content.Shared._CP14.DemiplaneTraveling; +using Robust.Client.UserInterface; + +namespace Content.Client._CP14.DemiplaneTraveling; + +public sealed class CP14DemiplaneMapBoundUserInterface : BoundUserInterface +{ + private CP14DemiplaneMapWindow? _window; + + public CP14DemiplaneMapBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) + { + IoCManager.InjectDependencies(this); + } + + protected override void Open() + { + base.Open(); + + _window = this.CreateWindow(); + + _window.OnEject += pos => SendMessage(new CP14DemiplaneMapEjectMessage(pos)); + _window.OnRevoke += pos => SendMessage(new CP14DemiplaneMapRevokeMessage(pos)); + } + + protected override void UpdateState(BoundUserInterfaceState state) + { + base.UpdateState(state); + + if (_window == null || state is not CP14DemiplaneMapUiState mapState) + return; + + _window?.UpdateState(mapState); + } +} diff --git a/Content.Client/_CP14/DemiplaneTraveling/CP14DemiplaneMapWindow.xaml b/Content.Client/_CP14/DemiplaneTraveling/CP14DemiplaneMapWindow.xaml new file mode 100644 index 0000000000..59dac30aa9 --- /dev/null +++ b/Content.Client/_CP14/DemiplaneTraveling/CP14DemiplaneMapWindow.xaml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +