载入中...
搜索中...
未找到
PcgBuildConfig.cpp
浏览该文件的文档.
16 DiagnosticCode::InvalidArgument, "publication type must be 0 or 1", {}, {}, "scene.pcgBuildConfig"));
20Result<void> PcgBuildConfig::addHistory(int category, const std::string& sceneName, int64_t timestamp) {
31 DiagnosticCode::InvalidArgument, "build history index is out of range", {}, {}, "scene.pcgBuildConfig"));
37 DiagnosticCode::InvalidArgument, "build history index is out of range", {}, {}, "scene.pcgBuildConfig"));
43 DiagnosticCode::InvalidArgument, "build history index is out of range", {}, {}, "scene.pcgBuildConfig"));
50 [vm](PcgBuildConfig* s, int v) { return eve::script::projectResult(vm, s->setPublicationType(v)); });
51 c.addFunc("getPublicationType", [](const PcgBuildConfig* s) { return s->getPublicationType(); });
52 c.addFunc("addHistory", [vm](PcgBuildConfig* s, int category, const std::string& n, int64_t ts) {
61 return eve::script::projectResult(vm, s->getHistorySceneName(i), [](const std::string& v) { return v; });
96 Diagnostic::error(DiagnosticCode::InvalidArgument, "start time must be finite", "scene.pcgGrowth.start"));
108 Diagnostic::error(DiagnosticCode::InvalidArgument, "growth has not started", "scene.pcgGrowth.advance"));
111 DiagnosticCode::InvalidArgument, "time must be finite and monotonic", "scene.pcgGrowth.advance"));
120 Diagnostic::error(DiagnosticCode::InvalidArgument, "death time must be finite", "scene.pcgGrowth.die"));
128 Diagnostic::error(DiagnosticCode::InvalidArgument, "time must be finite", "scene.pcgGrowth.destroy"));
147 Diagnostic::error(DiagnosticCode::InvalidArgument, "growth node cannot be scaled", "scene.pcgGrowth.node"));
The single Squirrel projection for common Result, Status and Value.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
Caller-owned Pcg publication configuration and ordered build history.
Definition PcgBuildConfig.h:17
Result< void > addHistory(int category, const std::string &sceneName, int64_t timestamp)
Append one ordered build history entry.
Definition PcgBuildConfig.cpp:20
Result< int > getHistoryCategory(uint64_t index) const
Return category at index.
Definition PcgBuildConfig.cpp:28
Result< std::string > getHistorySceneName(uint64_t index) const
Return scene name at index.
Definition PcgBuildConfig.cpp:34
Result< void > setPublicationType(int type)
Set publication type, where 0 is Addressables and 1 is RegularBuild.
Definition PcgBuildConfig.cpp:13
Result< int64_t > getHistoryTimestamp(uint64_t index) const
Return Unix timestamp at index.
Definition PcgBuildConfig.cpp:40
Caller-owned one-shot Pcg Growth state with explicit time and random seed.
Definition PcgGrowth.h:8
Result< void > configure(float startScale, float endScale, float variance, float duration)
Configure scale interval, variance, and duration atomically.
Definition PcgBuildConfig.cpp:81
Result< void > die(float now)
Schedule destruction five seconds from absolute real time.
Definition PcgBuildConfig.cpp:117
Result< float > advance(float now)
Evaluate the linear scale at absolute real time.
Definition PcgBuildConfig.cpp:105
Result< void > start(float now, std::uint32_t seed)
Choose the final scale from seed and begin at absolute real time.
Definition PcgBuildConfig.cpp:93
Result< bool > shouldDestroy(float now) const
Return whether delayed destruction is due.
Definition PcgBuildConfig.cpp:125
Script handle to a scene node (hostName + nodeId). Deliberately holds strings rather than arena point...
Definition SceneNodeRef.h:20
Definition AvatarInstance.h:34
void exposePcgBuildConfigBindings(ssq::Table &t)
Register Pcg build-config bindings.
Definition PcgBuildConfig.cpp:46
Result< bool > applyPcgGrowth(PcgGrowth &g, SceneNodeRef &node, float now)
Advance growth on a real scene leaf; returns true after removal, and rejects nodes with children.
Definition PcgBuildConfig.cpp:131
void exposePcgGrowthBindings(ssq::Table &t)
Register Pcg Growth bindings.
Definition PcgBuildConfig.cpp:150
ssq::Table projectResult(HSQUIRRELVM vm, Result< void > &&result)
Consume and project a void native Result using the common schema.
Definition SquirrelBinding.cpp:540
@ InvalidArgument