Rewritten grid matching in more declarative way

This commit is contained in:
2024-12-09 00:52:04 +03:00
parent 5d4c653c9a
commit 54a9b6f9ad
2 changed files with 44 additions and 33 deletions

View File

@@ -5,6 +5,7 @@
#include "queries.h"
#include "building_layout_graph.h"
#include "growth_module.h"
// TODO: make sure Enterance is at outside wall, can do this on region level or on cell level
growth_module::growth_module(flecs::world &ecs)
{
@@ -15,6 +16,10 @@ growth_module::growth_module(flecs::world &ecs)
ecs.component<WorldEditor::components::internal_wall_west>();
ecs.component<WorldEditor::components::internal_wall_north>();
ecs.component<WorldEditor::components::internal_wall_south>();
ecs.component<WorldEditor::components::internal_door_east>();
ecs.component<WorldEditor::components::internal_door_west>();
ecs.component<WorldEditor::components::internal_door_north>();
ecs.component<WorldEditor::components::internal_door_south>();
ecs.component<WorldEditor::components::outside_wall_east>();
ecs.component<WorldEditor::components::outside_wall_west>();
ecs.component<WorldEditor::components::outside_wall_north>();
@@ -30,6 +35,7 @@ growth_module::growth_module(flecs::world &ecs)
flecs::entity GraphSolve = ecs.lookup("::graph_module::GraphSolve");
assert(GraphSolve.is_valid());
GraphFilter.disable();
assert(ecs.lookup("::growth_module::window_east").is_valid());
ecs.system("RunGrow")
.immediate()