Adapts VehicleEntity health and armor to the common attribute core. 更多...
#include <VehicleAttributes.h>
静态 Public 成员函数 | |
| static eve::Result< void > | ensure (VehicleEntity &vehicle) |
| Bind and seed selected combat attributes exactly once. | |
| static eve::Result< double > | read (VehicleEntity &vehicle, std::string_view attribute) |
| Read a selected final combat attribute and refresh health projection. | |
| static eve::Result< void > | setBase (VehicleEntity &vehicle, std::string_view attribute, double value) |
| Set a selected canonical base and refresh the compatibility health fields. | |
| static eve::Result< eve::attributes::ModifierId > | addModifier (VehicleEntity &vehicle, std::string id, std::string_view attribute, std::string source, eve::attributes::AttributeOperation operation, double value, eve::attributes::ModifierPriority priority=eve::attributes::priority::runtime) |
| Add a modifier using the shared operation/priority/sequence contract. | |
| static eve::Result< void > | project (VehicleEntity &vehicle) |
| Project canonical health values into VehicleEntity::Health. | |
| static eve::Result< eve::attributes::AttributeProjectionSnapshot > | snapshot (VehicleEntity &vehicle) |
| Capture health/max_health/armor with owner generation and revision. | |
| static eve::Result< void > | restore (VehicleEntity &vehicle, const eve::attributes::AttributeProjectionSnapshot &snapshot, eve::Revision expectedRevision) |
| Restore a vehicle attribute snapshot after owner/revision checks. | |
静态 Public 属性 | |
| static constexpr std::string_view | healthAttribute = "health" |
| static constexpr std::string_view | maxHealthAttribute = "max_health" |
| static constexpr std::string_view | armorAttribute = "armor" |
详细描述
Adapts VehicleEntity health and armor to the common attribute core.
VehicleEntity::Health remains a one-way compatibility projection for health/max_health. Armor-zone geometry and multipliers remain vehicle policy data; position, speed and physics bodies are deliberately excluded.
在文件 VehicleAttributes.h 第 26 行定义.
成员函数说明
◆ addModifier()
|
static |
Add a modifier using the shared operation/priority/sequence contract.
在文件 VehicleAttributes.cpp 第 96 行定义.
引用了 ensure(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::Status::failure(), eve::InvalidArgument, operation, priority, project(), projected, source , 以及 value.
◆ ensure()
|
static |
Bind and seed selected combat attributes exactly once.
在文件 VehicleAttributes.cpp 第 26 行定义.
引用了 armorAttribute, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::Status::failure(), healthAttribute, maxHealthAttribute, eve::NoOp, eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 addModifier(), project(), restore(), setBase() , 以及 snapshot().
◆ project()
|
static |
Project canonical health values into VehicleEntity::Health.
在文件 VehicleAttributes.cpp 第 45 行定义.
引用了 eve::Applied, ensure(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::Status::failure(), healthAttribute, eve::InvariantViolation, maxHealthAttribute, eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 addModifier(), read(), restore() , 以及 setBase().
◆ read()
|
static |
Read a selected final combat attribute and refresh health projection.
在文件 VehicleAttributes.cpp 第 65 行定义.
引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::Status::failure(), project(), projected, eve::Result< T >::success(), eve::Unsupported , 以及 value.
被这些函数引用 eve::vehicle::VehicleSettlementAdapter::armorShield(), eve::vehicle::VehicleSettlementAdapter::clamp(), eve::vehicle::VehicleSettlementAdapter::prepareApply() , 以及 eve::vehicle::VehicleSettlementAdapter::validate().
◆ restore()
|
static |
Restore a vehicle attribute snapshot after owner/revision checks.
在文件 VehicleAttributes.cpp 第 130 行定义.
引用了 ensure(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::Status::failure() , 以及 project().
被这些函数引用 eve::vehicle::VehicleSettlementAdapter::prepareApply().
◆ setBase()
|
static |
Set a selected canonical base and refresh the compatibility health fields.
在文件 VehicleAttributes.cpp 第 84 行定义.
引用了 ensure(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::Status::failure(), project(), eve::Unsupported , 以及 value.
被这些函数引用 eve::vehicle::VehicleSettlementAdapter::prepareApply().
◆ snapshot()
|
static |
Capture health/max_health/armor with owner generation and revision.
在文件 VehicleAttributes.cpp 第 120 行定义.
引用了 ensure(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure() , 以及 eve::Status::failure().
被这些函数引用 eve::vehicle::VehicleSettlementAdapter::prepareApply().
类成员变量说明
◆ armorAttribute
|
staticconstexpr |
在文件 VehicleAttributes.h 第 30 行定义.
被这些函数引用 eve::vehicle::VehicleSettlementAdapter::armorShield() , 以及 ensure().
◆ healthAttribute
|
staticconstexpr |
◆ maxHealthAttribute
|
staticconstexpr |
该类的文档由以下文件生成:
- src/modules/vehicle/VehicleAttributes.h
- src/modules/vehicle/VehicleAttributes.cpp