@tool extends DialogicEvent class_name DialogicQuestCompleteEvent # Define properties of the event here var quest_resource: String func _execute() -> void: var resource = ResourceLoader.load(quest_resource) QuestManager.ChangeQuestStatus(resource,QuestEventUtils.QuestStatus.DONE) QuestManager.SetActiveQuest(null) finish() # called to continue with the next event #region INITIALIZE ################################################################################ # Set fixed settings of this event func _init() -> void: event_name = "Complete Quest" event_category = "Quest" #endregion #region SAVING/LOADING ################################################################################ func get_shortcode() -> String: return "quest_complete" func get_shortcode_parameters() -> Dictionary: return { #param_name : property_info "quest_resource" : {"property": "quest_resource", "default": ""}, } # You can alternatively overwrite these 3 functions: to_text(), from_text(), is_valid_event() #endregion #region EDITOR REPRESENTATION ################################################################################ func build_event_editor() -> void: add_header_label("Complete Quest") add_header_edit( "quest_resource", ValueType.DYNAMIC_OPTIONS, { "mode":2, "suggestions_func":QuestEventUtils.quest_resource_suggestrions }) #endregion