10#include <unordered_map>
33 void release()
override { ecs::DestroyEntity(
this); }
41 double stageProgressDays = 0.0;
44 bool harvested =
false;
49 std::unordered_map<std::string, double>
meters;
55 double diseaseDaysLeft = 0.0;
56 double diseaseGrowthMul = 1.0;
61 bool pregnant =
false;
62 double gestationProgressDays = 0.0;
63 double daysSinceReproduce = 0.0;
64 std::uint64_t partnerStableId = 0;
69 double daysSinceProduce = 0.0;
83 [[nodiscard]]
static Result<Organism*> createOrganism(
const std::string& speciesId);
86 [[nodiscard]]
static const std::vector<Organism*>& liveOrganisms();
88 [[nodiscard]]
const std::string& speciesId();
89 [[nodiscard]]
const std::string& kindId();
91 [[nodiscard]]
int stageIndex();
92 [[nodiscard]] std::string stageId();
93 [[nodiscard]]
double stageProgressDays();
94 [[nodiscard]]
bool isMature();
95 [[nodiscard]]
bool isDead();
96 [[nodiscard]]
bool isHarvested();
97 [[nodiscard]]
bool isDiseased();
98 [[nodiscard]]
bool isPregnant();
99 [[nodiscard]] std::string diseaseId();
102 [[nodiscard]]
double waterPermille();
103 [[nodiscard]]
double foodPermille();
104 [[nodiscard]]
double fertilityPermille();
106 [[nodiscard]]
double needPermille(
const std::string& needId);
112 [[nodiscard]]
Result<void> refillNeed(
const std::string& needId,
double permille);
136 [[nodiscard]] std::uint64_t stableId() const noexcept;
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
Move-only, checked operation results for the common layer.
Move-only operation result carrying either a value or Status.
Growth short-root entity for any configured lifeform.
OrganismKind
Optional Earth-biology label; custom lifeforms use Custom + free-form kindId.
Species binding and stage progress.
Disease state; empty diseaseId means healthy.
std::string activeDiseaseId
Periodic produce timer (milk, crystals, spores as yield — not offspring).
Reproduction progress for any authored mode.
Named need meters in permille [0, 1000], keyed by species need id.
std::unordered_map< std::string, double > meters
One harvested or produced item line (no inventory dependency).