From 2a80c509ace8fc65c78f2e67f7ecc0169f167acb Mon Sep 17 00:00:00 2001 From: ineveraskedforthis Date: Tue, 19 May 2026 00:40:46 +0300 Subject: [PATCH] add overlord to wars of the puppeted nation if possible --- src/military/military.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/military/military.cpp b/src/military/military.cpp index 777a7bfa1..b993b307b 100644 --- a/src/military/military.cpp +++ b/src/military/military.cpp @@ -2749,6 +2749,17 @@ void add_to_war(sys::state& state, dcon::war_id w, dcon::nation_id n, bool as_at if(state.world.nation_get_owned_province_count(n) == 0) return; + auto already_at_war = false; + + state.world.nation_for_each_war_participant(n, [&](auto participant){ + if (state.world.war_participant_get_war(participant) == w) { + already_at_war = true; + } + }); + + if (already_at_war) + return; + state.trade_route_cached_values_out_of_date = true; auto participant = state.world.force_create_war_participant(w, n); @@ -3435,6 +3446,10 @@ void implement_war_goal(sys::state& state, dcon::war_id war, dcon::cb_type_id wa nations::make_vassal(state, target, from); take_from_sphere(state, target, from); } + + for(auto war_participant : state.world.nation_get_war_participant(target)) { + military::add_to_war(state, war_participant.get_war(), from, war_participant.get_is_attacker()); + } } // po_make_substate: the target nation releases all of its vassals and then becomes a vassal of the acting nation.