Compile selectable colony rules into real bed construction recipes

This commit is contained in:
faumaray committed 2026-12-02 22:28:05 +03:00
1 parent 60154bd5f0
commit 275956395d
11 files changed
+544 -9

No files matched your search

+4 -3
View File
@@ -611,13 +611,14 @@ void World::queue_cabin(GridPosition position, GridPosition sawmill, GridPositio
queue_production(position, RecipeId::BuildCabin);
}
void World::start_scenario(GridPosition sawmill) {
if (scenario_active_ || !can_place_cabin(sawmill)) {
void World::start_scenario(GridPosition sawmill, BedConstructionMode beds) {
if (scenario_active_ || !can_place_cabin(sawmill) ||
(beds != BedConstructionMode::Staged && beds != BedConstructionMode::Plank)) {
throw std::invalid_argument("scenario needs a free sawmill cell");
}
enable_hunger();
scenario_active_ = true;
staged_beds_ = true;
staged_beds_ = beds == BedConstructionMode::Staged;
scenario_sawmill_ = sawmill;
for (auto& node : resource_nodes_) {
if (node.type == ItemType::Berries) node.foraging_enabled = false;