﻿namespace = eotm_configuration_events

eotm_configuration_events.0001 = {
	type = character_event
	orphan = yes
	title = eotm_configuration_window_title
	desc = eotm_configuration_window_advanced_desc
	theme = family
	left_portrait = root

	option = {
		name = eotm_configuration_auto_spend_enable
		trigger = {
			is_ai = no
			NOT = { has_variable = eotm_lifestyle_auto_spend_test_enabled }
		}
		custom_tooltip = eotm_configuration_auto_spend_enable_tt
		hidden_effect = {
			debug_log = "EOTM_LIFESTYLE_AUTO_SPEND_ENABLE_FROM_CONFIG"
			set_variable = { name = eotm_lifestyle_auto_spend_test_enabled value = 1 }
			add_character_flag = eotm_lifestyle_auto_spend_alerts_hidden
			remove_variable = eotm_test_perk_point_notice_active
			eotm_lifestyle_auto_spend_clear_result_effect = yes
			trigger_event = { id = eotm_report_events.0200 }
		}
	}

	option = {
		name = eotm_configuration_auto_spend_disable
		trigger = {
			is_ai = no
			has_variable = eotm_lifestyle_auto_spend_test_enabled
		}
		custom_tooltip = eotm_configuration_auto_spend_disable_tt
		hidden_effect = {
			debug_log = "EOTM_LIFESTYLE_AUTO_SPEND_DISABLE_FROM_CONFIG"
			remove_variable = eotm_lifestyle_auto_spend_test_enabled
			remove_character_flag = eotm_lifestyle_auto_spend_alerts_hidden
			eotm_lifestyle_auto_spend_clear_result_effect = yes
		}
	}

	option = {
		name = eotm_configuration_auto_spend_check_now
		trigger = {
			is_ai = no
		}
		custom_tooltip = eotm_configuration_auto_spend_check_now_tt
		hidden_effect = {
			debug_log = "EOTM_LIFESTYLE_AUTO_SPEND_CONFIG_CHECK_NOW"
			trigger_event = { id = eotm_report_events.0204 }
		}
	}

	option = {
		name = eotm_configuration_close
	}
}
