class

PointClickEngine::Core::QuestManager

Inherits YAML::Serializable < JSON::Serializable < Reference < Object

Quest manager handles all quests and their interactions

Constructors

new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
Source
new(pull : JSON::PullParser)
Source
new(event_bus : Events::EventBus)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Source

Instance methods

abandon_quest(id : String, state_manager : GameStateManager) : Bool
Source
active_notifications
Source
active_notifications=(active_notifications : Array(String))
Source
add_notification(message : String)

Notification system

Source
add_quest(quest : Quest)
Source
check_objectives_for_flag(flag_name : String, value : Bool)
Source
check_objectives_for_variable(var_name : String, value : GameValue)
Source
clear_notifications
Source
create_quest(id : String, name : String, description : String) : Quest
Source
debug_dump

Debug utilities

Source
event_bus
Source
event_bus=(event_bus : Events::EventBus | Nil)
Source
get_active_quests
Source
get_available_quests(state_manager : GameStateManager) : Array(Quest)
Source
get_completed_quests
Source
get_failed_quests
Source
get_notifications
Source
get_quest(id : String) : Quest | Nil
Source
get_quests_by_category(category : String) : Array(Quest)
Source
load_from_file(path : String) : Bool
Source
load_quests_from_yaml(path : String) : Bool

Load quest definitions from YAML

Source
on_quest_advanced(quest_id : String, step : String)
Source
on_quest_completed(quest_id : String)
Source
on_quest_started(quest_id : String)

Event handlers for state manager integration

Source
quests
Source
quests=(quests : Hash(String, Quest))
Source
reset_all_quests
Source
reset_quest(id : String) : Bool
Source
save_to_file(path : String) : Bool

Save/Load

Source
start_quest(id : String, state_manager : GameStateManager) : Bool
Source
state_manager
Source
state_manager=(state_manager : GameStateManager | Nil)
Source
update_all_quests(state_manager : GameStateManager, dt : Float32)
Source