载入中...
搜索中...
未找到
TerrainBiomePresetCodec.cpp
浏览该文件的文档.
22 Diagnostic::error(DiagnosticCode::InvalidArgument, "terrain.biomePreset.snapshot: invalid entry ID"));
45 Diagnostic::error(DiagnosticCode::InvalidArgument, "terrain.biomePreset.restore: JSON exceeds size limit"));
70 DiagnosticCode::InvalidArgument, "terrain.biomePreset.restore: missing or unknown entry fields"));
Owning, renderer-independent dynamic values.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
static Result< Value > fromJson(std::string_view json)
Parse one strict JSON value into an owning Value.
Definition Value.cpp:57
Own an ordered Pcg-style biome preset made from independent spawner plans. Entries and plans are copi...
Definition TerrainBiomePreset.h:25
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 > restoreJson(const std::string &json)
Atomically restore version 1 or migrate version 0 (auto-assign defaults true).
Definition TerrainBiomePresetCodec.cpp:42
Result< std::string > snapshotJson() const
Serialize schema version 1 as deterministic strict JSON with owned nested spawn plans.
Definition TerrainBiomePresetCodec.cpp:13
Own an ordered mixed-domain Pcg-style spawn recipe. Rule IDs are stable and unique....
Definition TerrainSpawnPlan.h:87
Result< void > restoreJson(const std::string &json)
Atomically restore versions 0-3; version 0 migrates all rules to enabled.
Definition TerrainSpawnPlanCodec.cpp:360
Definition EvpackPointGraphLoader.h:12
@ InvalidArgument