scripted_gui = { open_storage_window = { window_name = "open_storage_gui" context_type = player_context parent_window_token = trade_tab dirty = global.storage_scripted_gui_var visible = { has_game_rule = { rule = rule_enable_resource_storage_system option = yes } } effects = { open_storage_window_click = { if = { limit = { NOT = { has_country_flag = open_storage_screen } } set_country_flag = open_storage_screen } else = { clr_country_flag = open_storage_screen } update_dirty_resource_storage_var = yes } } } storage_scripted_gui = { window_name = "storage_scripted_gui" context_type = player_context parent_window_token = trade_tab dirty = global.storage_scripted_gui_var visible = { has_game_rule = { rule = rule_enable_resource_storage_system option = yes } has_country_flag = open_storage_screen } effects = { close_storage_screen_button_click = { clr_country_flag = open_storage_screen update_dirty_resource_storage_var = yes } steel_toggle_button_click = { if = { limit = { has_country_flag = steel_storage_draw } clr_country_flag = steel_storage_draw } else = { set_country_flag = steel_storage_draw } update_dirty_resource_storage_var = yes } light_toggle_button_click = { if = { limit = { has_country_flag = light_storage_draw } clr_country_flag = light_storage_draw } else = { set_country_flag = light_storage_draw } update_dirty_resource_storage_var = yes } rubber_toggle_button_click = { if = { limit = { has_country_flag = rubber_storage_draw } clr_country_flag = rubber_storage_draw } else = { set_country_flag = rubber_storage_draw } update_dirty_resource_storage_var = yes } tech_toggle_button_click = { if = { limit = { has_country_flag = tech_storage_draw } clr_country_flag = tech_storage_draw } else = { set_country_flag = tech_storage_draw } update_dirty_resource_storage_var = yes } precious_toggle_button_click = { if = { limit = { has_country_flag = precious_storage_draw } clr_country_flag = precious_storage_draw } else = { set_country_flag = precious_storage_draw } update_dirty_resource_storage_var = yes } } } }