载入中...
搜索中...
未找到
TerrainBiomePreset.h
浏览该文件的文档.
1#pragma once
2
3#include <string>
4#include <vector>
5
6#include "common/Result.h"
8
9namespace eve::procgen {
10
19
26public:
28 [[nodiscard]] Result<int> addSpawner(const std::string& entryId, const TerrainSpawnPlan& plan,
29 bool activeInBiome, bool activeInStamper, bool autoAssignResources);
31 [[nodiscard]] Result<void> setActiveInBiome(const std::string& entryId, bool active);
33 [[nodiscard]] Result<void> setActiveInStamper(const std::string& entryId, bool active);
35 [[nodiscard]] Result<TerrainSpawnPlan> compileForBiome() const;
37 [[nodiscard]] Result<TerrainSpawnPlan> compileForStamper() const;
39 [[nodiscard]] int getSpawnerCount() const noexcept;
41 [[nodiscard]] Result<bool> getAutoAssignResources(const std::string& entryId) const;
43 [[nodiscard]] Result<std::string> snapshotJson() const;
45 [[nodiscard]] Result<void> restoreJson(const std::string& json);
46
47private:
48 [[nodiscard]] Result<TerrainSpawnPlan> compile(bool biomeScope) const;
49 std::vector<TerrainBiomeSpawnerEntry> entries_;
50};
51
52} // namespace eve::procgen
bool & active
#define EVENGINE_API_DOMAINS
Definition Export.h:110
Move-only, checked operation results for the common layer.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Own an ordered Pcg-style biome preset made from independent spawner plans. Entries and plans are copi...
Own an ordered mixed-domain Pcg-style spawn recipe. Rule IDs are stable and unique....
One owned Pcg BiomePreset spawner entry with its two activation scopes.