diff --git a/assets/alice.csv b/assets/alice.csv index 703e346f2..1c25e192c 100644 --- a/assets/alice.csv +++ b/assets/alice.csv @@ -1683,6 +1683,7 @@ alice_rgo_trade_prod_3;RGO Minting Production: $x$ ($y$) alice_artisan_trade_prod;Artisan Production: $x$ ($y$) alice_factory_trade_prod;Factory Production: $x$ ($y$) alice_all_trade_prod;Total Production: $x$ +alice_interested_in_alliance;(Only applies to AI nations) Mark that we're interested in an alliance with this country, and will immediately accept alliance offers alice_merge_rally_point_why;Merge rally points are deprecated, rally points will now automatically merge alice_mvcap_1;Moves the capital to this province alice_mvcap_2;No ongoing crisis diff --git a/src/ai/ai.cpp b/src/ai/ai.cpp index 8a3f126a2..d495f86c5 100644 --- a/src/ai/ai.cpp +++ b/src/ai/ai.cpp @@ -120,7 +120,7 @@ static void internal_get_alliance_targets_by_adjacency(sys::state& state, dcon:: auto other = nb.get_connected_nations(0) != adj ? nb.get_connected_nations(0) : nb.get_connected_nations(1); bool b = other.get_is_player_controlled() - ? !state.world.unilateral_relationship_get_interested_in_alliance(state.world.get_unilateral_relationship_by_unilateral_pair(n, other)) + ? state.world.unilateral_relationship_get_interested_in_alliance(state.world.get_unilateral_relationship_by_unilateral_pair(n, other)) : ai_will_accept_alliance(state, other, n); if(other != n && !(other.get_overlord_as_subject().get_ruler()) && !nations::are_allied(state, n, other) && !military::are_at_war(state, other, n) && b) { alliance_targets.push_back(other.id); diff --git a/src/gui/topbar_subwindows/gui_diplomacy_window.hpp b/src/gui/topbar_subwindows/gui_diplomacy_window.hpp index d0b72a470..3a99b2dbb 100644 --- a/src/gui/topbar_subwindows/gui_diplomacy_window.hpp +++ b/src/gui/topbar_subwindows/gui_diplomacy_window.hpp @@ -569,12 +569,18 @@ class diplomacy_country_interested_in_alliance : public checkbox_button { bool is_active(sys::state& state) noexcept override { auto const n = retrieve(state, parent); auto const rel = state.world.get_unilateral_relationship_by_unilateral_pair(n, state.local_player_nation); - return !state.world.unilateral_relationship_get_interested_in_alliance(rel); + return state.world.unilateral_relationship_get_interested_in_alliance(rel); } void button_action(sys::state& state) noexcept override { auto const n = retrieve(state, parent); command::toggle_interested_in_alliance(state, state.local_player_nation, n); } + tooltip_behavior has_tooltip(sys::state& state) noexcept override { + return tooltip_behavior::variable_tooltip; + } + void update_tooltip(sys::state& state, int32_t x, int32_t y, text::columnar_layout& contents) noexcept override { + text::add_line(state, contents, "alice_interested_in_alliance"); + } }; class diplomacy_country_info : public listbox_row_element_base {