载入中...
搜索中...
未找到
eve::rts::MissionScriptSystem类 参考

Campaign orchestration boundary attached to one Match. 更多...

#include <RTSMission.h>

静态 Public 成员函数

static Result< void > addTrigger (Match &match, MissionTrigger trigger)
 Register one trigger definition (Setup or Running). @cost Linear in existing trigger count for duplicate-id checks.
 
static Result< void > addMonitor (Match &match, MissionRegionMonitor monitor)
 Register one axis-aligned region monitor. @cost Linear in existing monitor count for duplicate-id checks.
 
static Result< void > addTimer (Match &match, MissionTimer timer)
 Register one countdown timer; optionally start it immediately. @cost Linear in existing timer count for duplicate-id checks.
 
static Result< void > setVariable (Match &match, std::string id, double value)
 Create or overwrite one named campaign variable.
 
static Result< double > variable (Match &match, std::string_view id) noexcept
 Read one named campaign variable; missing ids return 0.
 
static Result< void > setTriggerEnabled (Match &match, std::string_view id, bool enabled)
 Enable or disable one registered trigger by id.
 
static Result< void > setMonitorEnabled (Match &match, std::string_view id, bool enabled)
 Enable or disable one registered region monitor by id.
 
static Result< void > controlTimer (Match &match, std::string_view id, bool running, bool reset)
 Start, stop, or reset one timer by id.
 
static Result< void > pushEvent (Match &match, MissionPendingEvent event)
 Push one custom (or domain) event onto the campaign pending queue. @cost Amortized constant; triggers evaluate during step.
 
static Result< std::size_t > step (Match &match, const SimulationStep &step)
 Advance timers/monitors, bridge Match::Events, wake triggers, execute built-in actions.
 
static Result< void > clearActionLog (Match &match) noexcept
 Clear retained Script action log entries after the game layer has consumed them.
 
static Result< MissionTrigger > parseTriggerJson (std::string_view json)
 Parse one trigger definition from an eve.rts.mission.trigger JSON object.
 
static Result< MissionRegionMonitor > parseMonitorJson (std::string_view json)
 Parse one region monitor from an eve.rts.mission.monitor JSON object.
 

详细描述

Campaign orchestration boundary attached to one Match.

备注
Complements Match::Objectives (win/fail). Does not invent a parallel match root.

在文件 RTSMission.h 第 20 行定义.

成员函数说明

◆ addMonitor()

◆ addTimer()

Result< void > eve::rts::MissionScriptSystem::addTimer ( Match &  match,
MissionTimer  timer 
)
static

◆ addTrigger()

Result< void > eve::rts::MissionScriptSystem::addTrigger ( Match &  match,
MissionTrigger  trigger 
)
static

Register one trigger definition (Setup or Running). @cost Linear in existing trigger count for duplicate-id checks.

在文件 RTSMission.cpp 第 464 行定义.

引用了 eve::Applied, eve::Conflict, eve::Diagnostic::error(), eve::rts::MissionTrigger::events, eve::Result< T >::failure(), id, eve::rts::MissionTrigger::id, eve::InvalidArgument, eve::Status::success() , 以及 eve::Result< T >::success().

被这些函数引用 eve::rts::RTS::addMatchTrigger().

◆ clearActionLog()

Result< void > eve::rts::MissionScriptSystem::clearActionLog ( Match &  match)
staticnoexcept

Clear retained Script action log entries after the game layer has consumed them.

在文件 RTSMission.cpp 第 594 行定义.

引用了 eve::Applied, eve::Status::success() , 以及 eve::Result< T >::success().

被这些函数引用 eve::rts::RTS::clearMatchCampaignActions().

◆ controlTimer()

Result< void > eve::rts::MissionScriptSystem::controlTimer ( Match &  match,
std::string_view  id,
bool  running,
bool  reset 
)
static

◆ parseMonitorJson()

◆ parseTriggerJson()

◆ pushEvent()

Result< void > eve::rts::MissionScriptSystem::pushEvent ( Match &  match,
MissionPendingEvent  event 
)
static

Push one custom (or domain) event onto the campaign pending queue. @cost Amortized constant; triggers evaluate during step.

在文件 RTSMission.cpp 第 568 行定义.

被这些函数引用 eve::rts::RTS::pushMatchCampaignEvent().

◆ setMonitorEnabled()

Result< void > eve::rts::MissionScriptSystem::setMonitorEnabled ( Match &  match,
std::string_view  id,
bool  enabled 
)
static

Enable or disable one registered region monitor by id.

在文件 RTSMission.cpp 第 546 行定义.

引用了 eve::Applied, enabled, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NotFound, eve::Status::success() , 以及 eve::Result< T >::success().

◆ setTriggerEnabled()

Result< void > eve::rts::MissionScriptSystem::setTriggerEnabled ( Match &  match,
std::string_view  id,
bool  enabled 
)
static

Enable or disable one registered trigger by id.

在文件 RTSMission.cpp 第 535 行定义.

引用了 eve::Applied, enabled, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NotFound, eve::Status::success() , 以及 eve::Result< T >::success().

◆ setVariable()

Result< void > eve::rts::MissionScriptSystem::setVariable ( Match &  match,
std::string  id,
double  value 
)
static

Create or overwrite one named campaign variable.

在文件 RTSMission.cpp 第 515 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Status::success(), eve::Result< T >::success(), valid , 以及 value.

被这些函数引用 eve::rts::RTS::setMatchVariable().

◆ step()

Result< std::size_t > eve::rts::MissionScriptSystem::step ( Match &  match,
const SimulationStep &  step 
)
static

Advance timers/monitors, bridge Match::Events, wake triggers, execute built-in actions.

参数
tickInjected simulation tick stamped onto Script action log entries. @cost Linear in timers, monitors × live subjects, pending events × triggers, and actions.

在文件 RTSMission.cpp 第 572 行定义.

引用了 eve::Applied, changed, eve::Result< T >::failure(), eve::NoOp, eve::rts::Setup, step, eve::Status::success() , 以及 eve::Result< T >::success().

◆ variable()

Result< double > eve::rts::MissionScriptSystem::variable ( Match &  match,
std::string_view  id 
)
staticnoexcept

Read one named campaign variable; missing ids return 0.

在文件 RTSMission.cpp 第 530 行定义.

引用了 eve::Applied, eve::Status::success() , 以及 eve::Result< T >::success().

被这些函数引用 parseTriggerJson().


该类的文档由以下文件生成: