add_namespace = war_salvage country_event = { id = war_salvage.1 is_triggered_only = yes title = ws_menu_title desc = ws_menu_desc option = { name = ws_mode_keep set_variable = { ws_mode = 0 } clr_country_flag = ws_auto } option = { name = ws_mode_refurb set_variable = { ws_mode = 1 } } option = { name = ws_mode_parts set_variable = { ws_mode = 2 } } option = { name = ws_mode_smelt set_variable = { ws_mode = 3 } } } country_event = { id = war_salvage.2 is_triggered_only = yes title = ws_report_title desc = ws_report_desc option = { name = ws_close } } country_event = { id = war_salvage.100 is_triggered_only = yes hidden = yes immediate = { if = { limit = { has_country_flag = ws_busy_rifles } add_equipment_to_stockpile = { type = infantry_equipment_1 amount = ws_pending_rifles producer = ROOT } add_to_variable = { ws_total_refurbished = ws_pending_rifles } clamp_variable = { var = ws_total_refurbished min = 0 max = 1000000 } set_variable = { ws_pending_rifles = 0 } clr_country_flag = ws_busy_rifles } } } country_event = { id = war_salvage.101 is_triggered_only = yes hidden = yes immediate = { if = { limit = { has_country_flag = ws_busy_support } add_equipment_to_stockpile = { type = support_equipment_1 amount = ws_pending_support producer = ROOT } add_to_variable = { ws_total_refurbished = ws_pending_support } clamp_variable = { var = ws_total_refurbished min = 0 max = 1000000 } set_variable = { ws_pending_support = 0 } clr_country_flag = ws_busy_support } } } country_event = { id = war_salvage.102 is_triggered_only = yes hidden = yes immediate = { if = { limit = { has_country_flag = ws_busy_artillery } add_equipment_to_stockpile = { type = artillery_equipment_1 amount = ws_pending_artillery producer = ROOT } add_to_variable = { ws_total_refurbished = ws_pending_artillery } clamp_variable = { var = ws_total_refurbished min = 0 max = 1000000 } set_variable = { ws_pending_artillery = 0 } clr_country_flag = ws_busy_artillery } } } country_event = { id = war_salvage.103 is_triggered_only = yes hidden = yes immediate = { if = { limit = { has_country_flag = ws_busy_aa } add_equipment_to_stockpile = { type = anti_air_equipment_1 amount = ws_pending_aa producer = ROOT } add_to_variable = { ws_total_refurbished = ws_pending_aa } clamp_variable = { var = ws_total_refurbished min = 0 max = 1000000 } set_variable = { ws_pending_aa = 0 } clr_country_flag = ws_busy_aa } } } country_event = { id = war_salvage.104 is_triggered_only = yes hidden = yes immediate = { if = { limit = { has_country_flag = ws_busy_at } add_equipment_to_stockpile = { type = anti_tank_equipment_1 amount = ws_pending_at producer = ROOT } add_to_variable = { ws_total_refurbished = ws_pending_at } clamp_variable = { var = ws_total_refurbished min = 0 max = 1000000 } set_variable = { ws_pending_at = 0 } clr_country_flag = ws_busy_at } } } country_event = { id = war_salvage.105 is_triggered_only = yes hidden = yes immediate = { if = { limit = { has_country_flag = ws_busy_trucks } add_equipment_to_stockpile = { type = motorized_equipment_1 amount = ws_pending_trucks producer = ROOT } add_to_variable = { ws_total_refurbished = ws_pending_trucks } clamp_variable = { var = ws_total_refurbished min = 0 max = 1000000 } set_variable = { ws_pending_trucks = 0 } clr_country_flag = ws_busy_trucks } } } country_event = { id = war_salvage.106 is_triggered_only = yes hidden = yes immediate = { if = { limit = { has_country_flag = ws_busy_mech } add_equipment_to_stockpile = { type = mechanized_equipment_1 amount = ws_pending_mech producer = ROOT } add_to_variable = { ws_total_refurbished = ws_pending_mech } clamp_variable = { var = ws_total_refurbished min = 0 max = 1000000 } set_variable = { ws_pending_mech = 0 } clr_country_flag = ws_busy_mech } } } country_event = { id = war_salvage.107 is_triggered_only = yes hidden = yes immediate = { if = { limit = { has_country_flag = ws_busy_trains } add_equipment_to_stockpile = { type = train_equipment_1 amount = ws_pending_trains producer = ROOT } add_to_variable = { ws_total_refurbished = ws_pending_trains } clamp_variable = { var = ws_total_refurbished min = 0 max = 1000000 } set_variable = { ws_pending_trains = 0 } clr_country_flag = ws_busy_trains } } }