载入中...
搜索中...
未找到
BuildingAssemblyInternal.h
浏览该文件的文档.
1#pragma once
2
5
6namespace eve::building {
7// Private owner state; no renderer or editor identity is authoritative here.
9 uint64_t epoch = 0;
10 uint32_t nextSlot = 0;
11 std::map<AssemblyId, BuildingAssembly> records;
12 std::map<AssemblyId, eve::RuntimeHandle<AssemblyHandleTag>> handles;
13};
16 uint64_t epoch = 0;
19 std::unique_ptr<PlacementWorld> candidate;
21 std::vector<PlacedBuilding> preview;
22};
23namespace assembly_detail {
24uint64_t nextEpoch();
34template <class T>
36 return Result<T>::failure(Diagnostic::error(code, std::move(message), {}, {}, "building.assembly"));
37}
38} // namespace assembly_detail
39} // namespace eve::building
eve::EntitySpatialPose pose
std::string message
DiagnosticCode code
std::map< unsigned, Colour > definitions
std::string to
std::string from
Object::Ptr value
float(ui::Theme::* member)[4]
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Move-only operation result carrying either a value or Status.
Definition Result.h:176
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
格子型建筑放置世界(脚本可直接操作)。
EVENGINE_API_FOUNDATION public API.
Definition Json.h:39
Value definitionsFor(const PlacementWorld &w)
Value definitionValue(const BuildingDefinition &d)
void removeMembership(AssemblyState &state, int member)
Result< AssemblyPose > parsePose(const Value &v)
Result< void > checkDefinitions(const Value &value)
Result< T > fail(std::string message, DiagnosticCode code=DiagnosticCode::InvalidArgument)
Result< void > checkGrid(const PlacementWorld &world)
Result< PlacedBuilding > transformPart(const PlacedBuilding &part, const PlacementWorld &world, AssemblyPose from, AssemblyPose to)
建筑放置模块入口:定义 / 放置世界 / 鬼影 / 变更事件的脚本绑定点。 设计文档:docs/dev/建筑放置系统设计.md
Definition Building.cpp:10
DiagnosticCode
Stable machine-readable diagnostic codes.
Definition Diagnostic.h:47
Integer grid-vertex origin, floor offset and quarter turns: (x,y) maps to (y,-x) for one turn.
std::map< AssemblyId, eve::RuntimeHandle< AssemblyHandleTag > > handles
std::map< AssemblyId, BuildingAssembly > records
建筑模板(进程级注册表中的定义)。
已放置的建筑实例。
std::unique_ptr< PlacementWorld > candidate