15 for(
auto p :
state.world.nation_get_province_ownership(
state.local_player_nation)) {
16 for(
auto fac : p.get_province().get_factory_location()) {
17 if(!fac.get_factory().get_subsidized()) {
20 bool is_set = any_cast<commodity_filter_query_data>(payload).filter;
32 auto rules =
state.world.nation_get_combined_issue_rules(
state.local_player_nation);
59 for(
auto p :
state.world.nation_get_province_ownership(
state.local_player_nation)) {
60 for(
auto fac : p.get_province().get_factory_location()) {
61 if(fac.get_factory().get_subsidized()) {
64 bool is_set = any_cast<commodity_filter_query_data>(payload).filter;
76 auto rules =
state.world.nation_get_combined_issue_rules(
state.local_player_nation);
149 for(
auto com :
state.world.in_commodity) {
152 bool is_set = any_cast<commodity_filter_query_data>(payload).filter;
164 for(
auto com :
state.world.in_commodity) {
167 bool is_set = any_cast<commodity_filter_query_data>(payload).filter;
211 auto content = any_cast<bool>(payload);
265 if(
name ==
"prod_subsidize_all") {
266 return make_element_by_type<factory_prod_subsidise_all_button>(
state,
id);
268 }
else if(
name ==
"prod_unsubsidize_all") {
269 return make_element_by_type<factory_prod_unsubsidise_all_button>(
state,
id);
271 }
else if(
name ==
"prod_open_all_factories") {
272 return make_element_by_type<factory_prod_open_all_button>(
state,
id);
274 }
else if(
name ==
"prod_close_all_factories") {
275 return make_element_by_type<factory_prod_close_all_button>(
state,
id);
277 }
else if(
name ==
"select_all") {
278 return make_element_by_type<factory_select_all_button>(
state,
id);
280 }
else if(
name ==
"deselect_all") {
281 return make_element_by_type<invisible_element>(
state,
id);
283 }
else if(
name ==
"show_empty_states") {
284 return make_element_by_type<factory_show_empty_states_button>(
state,
id);
286 }
else if(
name ==
"sort_by_name") {
287 return make_element_by_type<factory_name_sort>(
state,
id);
289 }
else if(
name ==
"sort_by_factories") {
290 return make_element_by_type<factory_count_sort>(
state,
id);
292 }
else if(
name ==
"sort_by_infra") {
293 return make_element_by_type<factory_infrastructure_sort>(
state,
id);
295 }
else if(
name ==
"filter_bounds") {
296 return make_element_by_type<commodity_filters_window>(
state,
id);
virtual void impl_on_update(sys::state &state) noexcept
message_result impl_get(sys::state &state, Cyto::Any &payload) noexcept
void set_visible(sys::state &state, bool vis)
@ change_factory_settings
int32_t factory_priority(sys::state const &state, dcon::factory_id f)
constexpr uint32_t can_subsidise
uint32_t pack_color(float r, float g, float b)
layout_box open_layout_box(layout_base &dest, int32_t indent)
void localised_format_box(sys::state &state, layout_base &dest, layout_box &box, std::string_view key, text::substitution_map const &sub)
std::string produce_simple_string(sys::state const &state, dcon::text_key id)
void close_layout_box(columnar_layout &dest, layout_box &box)
factory_select_all_button_state
Holds important data about the game world, state, and other data regarding windowing,...