Skip to content

Commit

Permalink
there
Browse files Browse the repository at this point in the history
  • Loading branch information
Lizzie841 committed Apr 7, 2024
1 parent 474cfa9 commit 2ffa978
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions assets/alice.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,8 @@ msg_crisis_defender_1;$x$ has become involved in the current crisis, backing the
msg_crisis_vol_join_title;Nation Takes a Side
msg_crisis_vol_join_1;$x$ has decided to join the current crisis on the side of the attackers.
msg_crisis_vol_join_2;$x$ has decided to join the current crisis on the side of the defenders.
msg_entered_automatic_alliance_title;Entered alliance automatically
msg_entered_automatic_alliance_1;$x$ has entered in an alliance with us automatically, because we marked that we're interested in allying them if possible
msg_n_event_title;National Event
msg_p_event_title;Provincial Event
msg_m_event_title;Major Event
Expand Down Expand Up @@ -1387,6 +1389,7 @@ amsg_crisis_voluntary_join;The nation joins a crisis without an offer;;;;;;;;;;;
amsg_army_built;The nation built an army;;;;;;;;;;;;x
amsg_navy_built;The nation built a navy;;;;;;;;;;;;x
amsg_bankruptcy;Nation goes bankrupt;;;;;;;;;;;;x
amsg_entered_automatic_alliance_title;The nation is automatically allied by another
alice_stockpile_button_0_0;National stockpiles function as a condiment to your usual economic-business activities, where people see �Ggreen�W lines go up, and �Rred�W lines go down, as per usual I'm �Ynot�W a line graph so I mostly go unnoticed :)
alice_stockpile_button_1_0;If you click me 10 times you will receive nothing in return, just trust me, don't click me... �ROR ELSE�W
alice_stockpile_button_1_1;I see, well now I'm not gonna say anything because I know you will keep clicking until I say a �Ydifferent�W dialogue and that's just boring
Expand Down
10 changes: 10 additions & 0 deletions src/ai/ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,16 @@ void form_alliances(sys::state& state) {
else
return a.index() > b.index();
});
if(state.world.nation_get_is_player_controlled(alliance_targets[0])) {
notification::post(state, notification::message{
[source = n](sys::state& state, text::layout_base& contents) {
text::add_line(state, contents, "msg_entered_automatic_alliance_1", text::variable_type::x, source);
},
"msg_entered_automatic_alliance_title",
n, dcon::nation_id{}, dcon::nation_id{},
sys::message_base_type::crisis_voluntary_join
});
}
nations::make_alliance(state, n, alliance_targets[0]);
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/common_types/constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ enum class message_setting_type : uint8_t {
army_built = 98, // added
navy_built = 99, // added
bankruptcy = 100,
entered_automatic_alliance = 101,
count = 128
};

Expand Down Expand Up @@ -375,6 +376,7 @@ enum class message_base_type : uint8_t {
army_built = 69, // added
navy_built = 70, // added
bankruptcy = 71,
entered_automatic_alliance = 72,
count = 72
};

Expand Down Expand Up @@ -496,6 +498,7 @@ constexpr inline msg_setting_entry message_setting_map[size_t(message_base_type:
msg_setting_entry{ message_setting_type::army_built, message_setting_type::count, message_setting_type::count}, //army_built = 69, // added
msg_setting_entry{ message_setting_type::navy_built, message_setting_type::count, message_setting_type::count}, //navy_built = 70, // added
msg_setting_entry{ message_setting_type::bankruptcy, message_setting_type::count, message_setting_type::count }, // bankruptcy = 71,
msg_setting_entry{ message_setting_type::entered_automatic_alliance, message_setting_type::count, message_setting_type::count },//entered_automatic_alliance = 72,
};

namespace message_response {
Expand Down
3 changes: 3 additions & 0 deletions src/gamestate/system_state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ struct user_settings_s {
message_response::standard_log,//army_built = 98,
message_response::standard_log,//navy_built = 99,
message_response::standard_popup,//bankruptcy = 100,
message_response::standard_popup,//entered_automatic_alliance = 101,
};
uint8_t interesting_message_settings[int32_t(sys::message_setting_type::count)] = {
message_response::standard_log,//revolt = 0,
Expand Down Expand Up @@ -258,6 +259,7 @@ struct user_settings_s {
message_response::ignore,//army_built = 98,
message_response::ignore,//navy_built = 99,
message_response::standard_popup,//bankruptcy = 100,
message_response::ignore,//entered_automatic_alliance = 101,
};
uint8_t other_message_settings[int32_t(sys::message_setting_type::count)] = {
message_response::ignore,//revolt = 0,
Expand Down Expand Up @@ -361,6 +363,7 @@ struct user_settings_s {
message_response::ignore,//army_built = 98,
message_response::ignore,//navy_built = 99,
message_response::standard_popup,//bankruptcy = 100,
message_response::ignore,//entered_automatic_alliance = 101,
};
bool fow_enabled = false;
map_label_mode map_label = map_label_mode::quadratic;
Expand Down
1 change: 1 addition & 0 deletions src/gui/gui_message_settings_window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ inline std::string get_setting_text_key(int32_t type) {
"amsg_army_built", // army_built
"amsg_navy_built", // navy_built
"amsg_bankruptcy", //bankruptcy
"amsg_entered_automatic_alliance",//entered_automatic_alliance
};
return std::string{key_str[type]};
}
Expand Down

0 comments on commit 2ffa978

Please sign in to comment.