# Author(s): Yard1, Killerrabbit, AngriestBird # Required at startup — on_add does not fire during history load. # At runtime, each law idea's on_add sets these variables via swap_ideas, # so do not add new set_law_vars calls after budget effects. set_law_vars = { if = { limit = { has_idea = bureau_01 } set_variable = { bureau_law = 1 } } else_if = { limit = { has_idea = bureau_02 } set_variable = { bureau_law = 2 } } else_if = { limit = { has_idea = bureau_03 } set_variable = { bureau_law = 3 } } else_if = { limit = { has_idea = bureau_04 } set_variable = { bureau_law = 4 } } else_if = { limit = { has_idea = bureau_05 } set_variable = { bureau_law = 5 } } else = { set_variable = { bureau_law = 1 } #Failsafe Measure } if = { limit = { has_idea = police_01 } set_variable = { police_law = 1 } } else_if = { limit = { has_idea = police_02 } set_variable = { police_law = 2 } } else_if = { limit = { has_idea = police_03 } set_variable = { police_law = 3 } } else_if = { limit = { has_idea = police_04 } set_variable = { police_law = 4 } } else_if = { limit = { has_idea = police_05 } set_variable = { police_law = 5 } } else = { set_variable = { police_law = 1 } #Failsafe Measure } if = { limit = { has_idea = edu_01 } set_variable = { education_law = 1 } } else_if = { limit = { has_idea = edu_02 } set_variable = { education_law = 2 } } else_if = { limit = { has_idea = edu_03 } set_variable = { education_law = 3 } } else_if = { limit = { has_idea = edu_04 } set_variable = { education_law = 4 } } else_if = { limit = { has_idea = edu_05 } set_variable = { education_law = 5 } } else = { set_variable = { education_law = 1 } #Failsafe Measure } if = { limit = { has_idea = health_01 } set_variable = { health_law = 1 } } else_if = { limit = { has_idea = health_02 } set_variable = { health_law = 2 } } else_if = { limit = { has_idea = health_03 } set_variable = { health_law = 3 } } else_if = { limit = { has_idea = health_04 } set_variable = { health_law = 4 } } else_if = { limit = { has_idea = health_05 } set_variable = { health_law = 5 } } else_if = { limit = { has_idea = health_06 } set_variable = { health_law = 6 } } else = { set_variable = { health_law = 1 } #Failsafe Measure } if = { limit = { has_idea = social_01 } set_variable = { social_law = 1 } } else_if = { limit = { has_idea = social_02 } set_variable = { social_law = 2 } } else_if = { limit = { has_idea = social_03 } set_variable = { social_law = 3 } } else_if = { limit = { has_idea = social_04 } set_variable = { social_law = 4 } } else_if = { limit = { has_idea = social_05 } set_variable = { social_law = 5 } } else_if = { limit = { has_idea = social_06 } set_variable = { social_law = 6 } } else = { set_variable = { social_law = 1 } #Failsafe Measure } #Military Spending Laws if = { limit = { has_idea = defence_00 } set_variable = { military_law = 1 } } else_if = { limit = { has_idea = defence_01 } set_variable = { military_law = 2 } } else_if = { limit = { has_idea = defence_02 } set_variable = { military_law = 3 } } else_if = { limit = { has_idea = defence_03 } set_variable = { military_law = 4 } } else_if = { limit = { has_idea = defence_04 } set_variable = { military_law = 5 } } else_if = { limit = { has_idea = defence_05 } set_variable = { military_law = 6 } } else_if = { limit = { has_idea = defence_06 } set_variable = { military_law = 7 } } else_if = { limit = { has_idea = defence_07 } set_variable = { military_law = 8 } } else_if = { limit = { has_idea = defence_08 } set_variable = { military_law = 9 } } else_if = { limit = { has_idea = defence_09 } set_variable = { military_law = 10 } } else = { set_variable = { military_law = 1 } #Failsafe Measure } if = { limit = { has_idea = open_borders } set_variable = { migration_law = 1 } } else_if = { limit = { has_idea = slightly_regulated_immigration } set_variable = { migration_law = 2 } } else_if = { limit = { has_idea = regulated_immigration } set_variable = { migration_law = 3 } } else_if = { limit = { has_idea = heavily_regulated_immigration } set_variable = { migration_law = 4 } } else_if = { limit = { has_idea = closed_borders } set_variable = { migration_law = 5 } } else = { set_variable = { migration_law = 1 } #Failsafe Measure } refresh_expected_spending_frames = yes update_protest_dirty_var = yes }