Validates legacy-compatible RTS content packs and publishes their records to Definitions. 更多...
#include <RTSContent.h>
静态 Public 成员函数 | |
| static Result< ContentImportReceipt > | load (definitions::DefinitionRegistry ®istry, std::string_view json) |
| Parse, cross-validate, normalize weapons, and atomically import one JSON pack. | |
详细描述
Validates legacy-compatible RTS content packs and publishes their records to Definitions.
The loader owns no definition map. Unit, building, weapon, upgrade, effect, ability, and damage-table records remain authoritative in the caller's DefinitionRegistry. Failed imports restore the registry snapshot captured before the first mutation.
在文件 RTSContent.h 第 32 行定义.
成员函数说明
◆ load()
|
static |
Parse, cross-validate, normalize weapons, and atomically import one JSON pack.
在文件 RTSContent.cpp 第 97 行定义.
引用了 eve::Applied, entries, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Value::fromJson(), eve::Value::getIf(), eve::definitions::DefinitionRegistry::handle(), index, eve::definitions::DefinitionRegistry::insert(), eve::rts::ContentImportReceipt::inserted, eve::InvalidArgument, member, eve::NoOp, eve::definitions::DefinitionRegistry::replace(), eve::rts::ContentImportReceipt::replaced, eve::definitions::DefinitionRegistry::restoreJson(), root, eve::definitions::DefinitionRegistry::snapshotJson(), eve::Status::success(), eve::Result< T >::success(), target, text, type , 以及 value.
该类的文档由以下文件生成:
- src/modules/rts/RTSContent.h
- src/modules/rts/RTSContent.cpp