载入中...
搜索中...
未找到
TerrainBiomePreset.cpp
浏览该文件的文档.
13Result<int> TerrainBiomePreset::addSpawner(const std::string& entryId, const TerrainSpawnPlan& plan,
18 DiagnosticCode::InvalidArgument, "terrain.biomePreset: nonempty entry ID and spawn plan required"));
19 if (std::any_of(entries_.begin(), entries_.end(), [&](const auto& entry) { return entry.entryId == entryId; }))
21 Diagnostic::error(DiagnosticCode::InvalidArgument, "terrain.biomePreset: unique entry ID required"));
94int TerrainBiomePreset::getSpawnerCount() const noexcept { return static_cast<int>(entries_.size()); }
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
Result< void > setActiveInBiome(const std::string &entryId, bool active)
Change the biome-controller activation flag of one stable entry.
Definition TerrainBiomePreset.cpp:28
Result< TerrainSpawnPlan > compileForStamper() const
Compile active stamper-linked entries into one owned transactional plan.
Definition TerrainBiomePreset.cpp:93
Result< int > addSpawner(const std::string &entryId, const TerrainSpawnPlan &plan, bool activeInBiome, bool activeInStamper, bool autoAssignResources)
Append an owned nonempty spawner entry with a stable unique entry ID.
Definition TerrainBiomePreset.cpp:13
Result< void > setActiveInStamper(const std::string &entryId, bool active)
Change the stamper-linked activation flag of one stable entry.
Definition TerrainBiomePreset.cpp:41
int getSpawnerCount() const noexcept
Return the number of retained spawner entries.
Definition TerrainBiomePreset.cpp:94
Result< TerrainSpawnPlan > compileForBiome() const
Compile active biome-controller entries into one owned transactional plan.
Definition TerrainBiomePreset.cpp:92
Result< bool > getAutoAssignResources(const std::string &entryId) const
Return whether an entry requests prototype/resource assignment.
Definition TerrainBiomePreset.cpp:96
Own an ordered mixed-domain Pcg-style spawn recipe. Rule IDs are stable and unique....
Definition TerrainSpawnPlan.h:87
Definition EvpackPointGraphLoader.h:12
@ InvalidArgument