载入中...
搜索中...
未找到
eve::procgen::TerrainBiomePreset类 参考

Own an ordered Pcg-style biome preset made from independent spawner plans. Entries and plans are copied at insertion. Compilation namespaces each rule by its stable entry ID, preserving order while allowing different spawners to use the same local rule ID. No scene pointer or asset object is held. 更多...

#include <TerrainBiomePreset.h>

Public 成员函数

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.
 
Result< void > setActiveInBiome (const std::string &entryId, bool active)
 Change the biome-controller activation flag of one stable entry.
 
Result< void > setActiveInStamper (const std::string &entryId, bool active)
 Change the stamper-linked activation flag of one stable entry.
 
Result< TerrainSpawnPlan > compileForBiome () const
 Compile active biome-controller entries into one owned transactional plan.
 
Result< TerrainSpawnPlan > compileForStamper () const
 Compile active stamper-linked entries into one owned transactional plan.
 
int getSpawnerCount () const noexcept
 Return the number of retained spawner entries.
 
Result< bool > getAutoAssignResources (const std::string &entryId) const
 Return whether an entry requests prototype/resource assignment.
 
Result< std::string > snapshotJson () const
 Serialize schema version 1 as deterministic strict JSON with owned nested spawn plans.
 
Result< void > restoreJson (const std::string &json)
 Atomically restore version 1 or migrate version 0 (auto-assign defaults true).
 

详细描述

Own an ordered Pcg-style biome preset made from independent spawner plans. Entries and plans are copied at insertion. Compilation namespaces each rule by its stable entry ID, preserving order while allowing different spawners to use the same local rule ID. No scene pointer or asset object is held.

在文件 TerrainBiomePreset.h 第 25 行定义.

成员函数说明

◆ addSpawner()

Result< int > eve::procgen::TerrainBiomePreset::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.

在文件 TerrainBiomePreset.cpp 第 13 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::procgen::TerrainSpawnPlan::rules() , 以及 eve::Result< T >::success().

被这些函数引用 restoreJson().

◆ compileForBiome()

Result< TerrainSpawnPlan > eve::procgen::TerrainBiomePreset::compileForBiome ( ) const

Compile active biome-controller entries into one owned transactional plan.

在文件 TerrainBiomePreset.cpp 第 92 行定义.

被这些函数引用 eve::procgen::TerrainWorldWorkspace::beginSpawnBiome() , 以及 eve::procgen::TerrainWorldWorkspace::spawnBiome().

◆ compileForStamper()

Result< TerrainSpawnPlan > eve::procgen::TerrainBiomePreset::compileForStamper ( ) const

Compile active stamper-linked entries into one owned transactional plan.

在文件 TerrainBiomePreset.cpp 第 93 行定义.

被这些函数引用 eve::procgen::TerrainWorldWorkspace::beginSpawnStamper() , 以及 eve::procgen::TerrainWorldWorkspace::spawnStamper().

◆ getAutoAssignResources()

Result< bool > eve::procgen::TerrainBiomePreset::getAutoAssignResources ( const std::string &  entryId) const

Return whether an entry requests prototype/resource assignment.

在文件 TerrainBiomePreset.cpp 第 96 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::InvalidArgument , 以及 eve::Result< T >::success().

◆ getSpawnerCount()

int eve::procgen::TerrainBiomePreset::getSpawnerCount ( ) const
noexcept

Return the number of retained spawner entries.

在文件 TerrainBiomePreset.cpp 第 94 行定义.

◆ restoreJson()

Result< void > eve::procgen::TerrainBiomePreset::restoreJson ( const std::string &  json)

◆ setActiveInBiome()

Result< void > eve::procgen::TerrainBiomePreset::setActiveInBiome ( const std::string &  entryId,
bool  active 
)

Change the biome-controller activation flag of one stable entry.

在文件 TerrainBiomePreset.cpp 第 28 行定义.

引用了 active, eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::InvalidArgument , 以及 eve::Result< T >::success().

◆ setActiveInStamper()

Result< void > eve::procgen::TerrainBiomePreset::setActiveInStamper ( const std::string &  entryId,
bool  active 
)

Change the stamper-linked activation flag of one stable entry.

在文件 TerrainBiomePreset.cpp 第 41 行定义.

引用了 active, eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::InvalidArgument , 以及 eve::Result< T >::success().

◆ snapshotJson()

Result< std::string > eve::procgen::TerrainBiomePreset::snapshotJson ( ) const

Serialize schema version 1 as deterministic strict JSON with owned nested spawn plans.

在文件 TerrainBiomePresetCodec.cpp 第 13 行定义.

引用了 entries, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 eve::procgen::Value.


该类的文档由以下文件生成: