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);
142 for(
auto com :
state.world.in_commodity) {
145 bool is_set = any_cast<commodity_filter_query_data>(payload).filter;
170 for(
auto com :
state.world.in_commodity) {
173 bool is_set = any_cast<commodity_filter_query_data>(payload).filter;
200 auto content = any_cast<bool>(payload);
254 if(
name ==
"prod_subsidize_all") {
255 return make_element_by_type<factory_prod_subsidise_all_button>(
state,
id);
257 }
else if(
name ==
"prod_unsubsidize_all") {
258 return make_element_by_type<factory_prod_unsubsidise_all_button>(
state,
id);
260 }
else if(
name ==
"prod_open_all_factories") {
261 return make_element_by_type<factory_prod_open_all_button>(
state,
id);
263 }
else if(
name ==
"prod_close_all_factories") {
264 return make_element_by_type<factory_prod_close_all_button>(
state,
id);
266 }
else if(
name ==
"select_all") {
267 return make_element_by_type<factory_select_all_button>(
state,
id);
269 }
else if(
name ==
"deselect_all") {
270 return make_element_by_type<factory_deselect_all_button>(
state,
id);
272 }
else if(
name ==
"show_empty_states") {
273 return make_element_by_type<factory_show_empty_states_button>(
state,
id);
275 }
else if(
name ==
"sort_by_name") {
276 return make_element_by_type<factory_name_sort>(
state,
id);
278 }
else if(
name ==
"sort_by_factories") {
279 return make_element_by_type<factory_count_sort>(
state,
id);
281 }
else if(
name ==
"sort_by_infra") {
282 return make_element_by_type<factory_infrastructure_sort>(
state,
id);
284 }
else if(
name ==
"filter_bounds") {
285 return make_element_by_type<commodity_filters_window>(
state,
id);
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)