Horizon Official Technical Documentation
|
|
#include <ScriptManager.hpp>
Protected Types | |
using | PrimaryResource = SharedPriorityResourceMedium< s_segment_storage< uint64_t, std::shared_ptr< Units::NPC > > > |
using | ResourceManager = SharedPriorityResourceManager< PrimaryResource > |
Protected Attributes | |
std::atomic< bool > | _is_initialized {false} |
std::atomic< bool > | _is_finalized {false} |
ResourceManager | _resource_manager |
TaskScheduler | _scheduler |
Private Member Functions | |
void | load_constants () |
void | load_scripts () |
void | load_scripts_internal () |
Private Attributes | |
std::vector< std::string > | _script_files |
std::shared_ptr< sol::state > | _lua_state |
std::shared_ptr< PlayerComponent > | _player_component |
std::shared_ptr< NPCComponent > | _npc_component |
std::shared_ptr< MonsterComponent > | _monster_component |
std::shared_ptr< MapComponent > | _map_component |
std::shared_ptr< ItemComponent > | _item_component |
std::shared_ptr< UnitComponent > | _unit_component |
std::shared_ptr< SkillComponent > | _skill_component |
std::shared_ptr< StatusEffectComponent > | _status_effect_component |
std::shared_ptr< CombatComponent > | _combat_component |
std::thread | _thread |
|
protected |
|
protected |
ScriptManager::ScriptManager | ( | ) |
ScriptManager::~ScriptManager | ( | ) |
References _lua_state.
|
inline |
References _combat_component.
|
overridevirtual |
Reimplemented from KernelComponent.
References _is_finalized, _lua_state, _script_files, _thread, and HLog.
|
inline |
References _resource_manager.
|
inline |
References _scheduler.
Referenced by initialize_basic_state(), and update().
|
overridevirtual |
Reimplemented from KernelComponent.
References _is_initialized, _lua_state, _thread, initialize_basic_state(), initialize_monster_state(), initialize_npc_state(), initialize_player_state(), Horizon::Zone::GameLogicProcess::is_initialized(), load_constants(), load_scripts(), Horizon::System::RUNTIME_GAMELOGIC, KernelComponent::set_segment_number(), start(), and sZone.
void ScriptManager::initialize_basic_state | ( | std::shared_ptr< sol::state > | state | ) |
References _combat_component, _item_component, _map_component, _skill_component, _status_effect_component, _unit_component, get_sys_time(), getScheduler(), HLog, MAX_CART_STACK_LIMIT, MAX_CHARACTER_SLOTS, MAX_GSTORAGE_STACK_LIMIT, MAX_INVENTORY_SIZE, MAX_INVENTORY_STACK_LIMIT, MAX_LEVEL, MAX_STATUS_POINTS, MAX_STORAGE_SIZE, MAX_STORAGE_STACK_LIMIT, MAX_VIEW_RANGE, MIN_INVENTORY_SIZE, MIN_STORAGE_SIZE, TaskScheduler::Schedule(), and sZone.
Referenced by initialize(), initialize_monster_state(), initialize_npc_state(), and initialize_player_state().
void ScriptManager::initialize_monster_state | ( | std::shared_ptr< sol::state > | state | ) |
References _monster_component, and initialize_basic_state().
Referenced by initialize().
void ScriptManager::initialize_npc_state | ( | std::shared_ptr< sol::state > | state | ) |
References _npc_component, and initialize_basic_state().
Referenced by initialize().
void ScriptManager::initialize_player_state | ( | std::shared_ptr< sol::state > | state | ) |
References _player_component, and initialize_basic_state().
Referenced by initialize().
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inline |
References _item_component.
|
private |
References _constants_loader, _lua_state, HLog, and sZone.
Referenced by initialize().
|
private |
References _lua_state, _script_loader, GridTypeListIterator::count(), HLog, and sZone.
Referenced by initialize().
|
private |
|
inline |
References _lua_state.
|
inline |
References _map_component.
|
inline |
References _monster_component.
|
inline |
References _npc_component.
|
inline |
References _player_component.
void Horizon::Zone::ScriptManager::prepare_lua_state | ( | std::shared_ptr< sol::state > & | lua | ) |
|
inline |
References _skill_component.
void ScriptManager::start | ( | ) |
References get_shutdown_stage(), MAX_CORE_UPDATE_INTERVAL, SHUTDOWN_NOT_STARTED, sZone, and update().
Referenced by initialize(), and update().
|
inline |
References _status_effect_component.
|
inline |
References _unit_component.
void ScriptManager::update | ( | uint64_t | diff | ) |
References KernelComponent::calculate_and_set_cpu_load(), KernelComponent::get_system_routine_manager(), KernelComponent::get_thread_cpu_id(), getScheduler(), Horizon::System::SystemRoutineManager::process_queue(), KernelComponent::set_thread_cpu_id(), KernelComponent::set_total_execution_time(), start(), and TaskScheduler::Update().
Referenced by start().
|
private |
Referenced by combat(), and initialize_basic_state().
|
protected |
Referenced by finalize(), and is_finalized().
|
protected |
Referenced by initialize(), and is_initialized().
|
private |
Referenced by initialize_basic_state(), and item().
|
private |
Referenced by finalize(), initialize(), load_constants(), load_scripts(), lua_state(), and ~ScriptManager().
|
private |
Referenced by initialize_basic_state(), and map().
|
private |
Referenced by initialize_monster_state(), and monster().
|
private |
Referenced by initialize_npc_state(), and npc().
|
private |
Referenced by initialize_player_state(), and player().
|
protected |
Referenced by get_resource_manager().
|
protected |
Referenced by getScheduler().
|
private |
Referenced by finalize().
|
private |
Referenced by initialize_basic_state(), and skill().
|
private |
Referenced by initialize_basic_state(), and status_effect().
|
private |
Referenced by finalize(), and initialize().
|
private |
Referenced by initialize_basic_state(), and unit().