on_actions = {

    #ROOT - country that just went to peace
    on_peaceconference_ended = {
        effect = {
            if = { # Trigger new era system if everyone is at peace
                limit = {
                    ET_in_new_era = no

                    all_country = { has_war = no }
                    date > 1945.01.01
                }
                every_country = {
                    limit = { always = yes }
                    THIS = {
                        if = {
                            limit = { is_major = yes }
                            add_named_threat = {
                                threat = -100
                                name = ET_winner_of_worldwar2
                            }
                        }
                    }
                }

                if = { limit = { is_debug = yes } log = "[GetDateText]: NewEra inizialized." }
                ET_set_new_era = yes
                ET_set_scenario = yes
            }
        }
    }

    # New era exist add tree to new nations
    #ROOT = nation being released, FROM = overlord
    on_release_as_puppet = {
        effect = {
            if = {
                limit = { has_global_flag = ET_flag_global_newera }
                ROOT = { ET_set_new_focus_tree_effect = yes }
            }
        }
    }

    #ROOT is free nation FROM is releaser
    on_release_as_free = {
        effect = {
            if = {
                limit = { has_global_flag = ET_flag_global_newera }
                ROOT = { ET_set_new_focus_tree_effect = yes }
            }
        }
    }
}
