mirror of https://github.com/OpenRCT2/OpenRCT2.git
Automatically open shops & stalls
- Added a new option under misc to automatically open shops and stalls - Option is disabled by default - When enabled, shops & stalls are automatically opened right after being placed on the map
This commit is contained in:
parent
652031e0fe
commit
ba038c10ab
|
@ -3924,6 +3924,8 @@ STR_5582 :Trap mouse cursor in window
|
||||||
STR_5583 :{COMMA1DP16}ms{POWERNEGATIVEONE}
|
STR_5583 :{COMMA1DP16}ms{POWERNEGATIVEONE}
|
||||||
STR_5584 :SI
|
STR_5584 :SI
|
||||||
STR_5585 :{SMALLFONT}{BLACK}Unlocks ride operation limits, allowing for things like {VELOCITY} lift hills
|
STR_5585 :{SMALLFONT}{BLACK}Unlocks ride operation limits, allowing for things like {VELOCITY} lift hills
|
||||||
|
STR_5586 :Automatically open shops and stalls
|
||||||
|
STR_5587 :{SMALLFONT}{BLACK}When enabled, shops and stalls will be automatically opened after placing then in the map
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
# Rides/attractions #
|
# Rides/attractions #
|
||||||
|
|
|
@ -202,6 +202,7 @@ config_property_definition _generalDefinitions[] = {
|
||||||
{ offsetof(general_configuration, window_scale), "window_scale", CONFIG_VALUE_TYPE_FLOAT, { .value_float = 1.0f }, NULL },
|
{ offsetof(general_configuration, window_scale), "window_scale", CONFIG_VALUE_TYPE_FLOAT, { .value_float = 1.0f }, NULL },
|
||||||
{ offsetof(general_configuration, show_fps), "show_fps", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL },
|
{ offsetof(general_configuration, show_fps), "show_fps", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL },
|
||||||
{ offsetof(general_configuration, trap_cursor), "trap_cursor", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL },
|
{ offsetof(general_configuration, trap_cursor), "trap_cursor", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL },
|
||||||
|
{ offsetof(general_configuration, auto_open_shops), "auto_open_shops", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
config_property_definition _interfaceDefinitions[] = {
|
config_property_definition _interfaceDefinitions[] = {
|
||||||
|
|
|
@ -171,6 +171,7 @@ typedef struct {
|
||||||
float window_scale;
|
float window_scale;
|
||||||
uint8 show_fps;
|
uint8 show_fps;
|
||||||
uint8 trap_cursor;
|
uint8 trap_cursor;
|
||||||
|
uint8 auto_open_shops;
|
||||||
} general_configuration;
|
} general_configuration;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -2155,6 +2155,9 @@ enum {
|
||||||
STR_KICK_PLAYER = 5556,
|
STR_KICK_PLAYER = 5556,
|
||||||
STR_STAY_CONNECTED_AFTER_DESYNC = 5557,
|
STR_STAY_CONNECTED_AFTER_DESYNC = 5557,
|
||||||
|
|
||||||
|
STR_AUTO_OPEN_SHOPS = 5586,
|
||||||
|
STR_AUTO_OPEN_SHOPS_TIP = 5587,
|
||||||
|
|
||||||
STR_RESTART_REQUIRED = 5558,
|
STR_RESTART_REQUIRED = 5558,
|
||||||
STR_LANGUAGE_LOAD_FAILED = 5561,
|
STR_LANGUAGE_LOAD_FAILED = 5561,
|
||||||
|
|
||||||
|
|
|
@ -150,6 +150,7 @@ enum WINDOW_OPTIONS_WIDGET_IDX {
|
||||||
WIDX_TITLE_SEQUENCE_BUTTON,
|
WIDX_TITLE_SEQUENCE_BUTTON,
|
||||||
WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM,
|
WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM,
|
||||||
WIDX_STAY_CONNECTED_AFTER_DESYNC,
|
WIDX_STAY_CONNECTED_AFTER_DESYNC,
|
||||||
|
WIDX_AUTO_OPEN_SHOPS,
|
||||||
|
|
||||||
// Twitch
|
// Twitch
|
||||||
WIDX_CHANNEL_BUTTON = WIDX_PAGE_START,
|
WIDX_CHANNEL_BUTTON = WIDX_PAGE_START,
|
||||||
|
@ -270,6 +271,7 @@ static rct_widget window_options_misc_widgets[] = {
|
||||||
{ WWT_DROPDOWN_BUTTON, 1, 26, 185, 189, 200, STR_EDIT_TITLE_SEQUENCES_BUTTON, STR_NONE }, // Title sequences button
|
{ WWT_DROPDOWN_BUTTON, 1, 26, 185, 189, 200, STR_EDIT_TITLE_SEQUENCES_BUTTON, STR_NONE }, // Title sequences button
|
||||||
{ WWT_CHECKBOX, 2, 10, 299, 204, 215, STR_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM, STR_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM_TIP }, // Allow loading with incorrect checksum
|
{ WWT_CHECKBOX, 2, 10, 299, 204, 215, STR_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM, STR_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM_TIP }, // Allow loading with incorrect checksum
|
||||||
{ WWT_CHECKBOX, 2, 10, 299, 219, 230, STR_STAY_CONNECTED_AFTER_DESYNC, STR_NONE }, // Do not disconnect after the client desynchronises with the server
|
{ WWT_CHECKBOX, 2, 10, 299, 219, 230, STR_STAY_CONNECTED_AFTER_DESYNC, STR_NONE }, // Do not disconnect after the client desynchronises with the server
|
||||||
|
{ WWT_CHECKBOX, 2, 10, 299, 234, 245, STR_AUTO_OPEN_SHOPS, STR_AUTO_OPEN_SHOPS_TIP }, // Automatically open shops & stalls
|
||||||
{ WIDGETS_END },
|
{ WIDGETS_END },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -431,7 +433,8 @@ static uint32 window_options_page_enabled_widgets[] = {
|
||||||
(1 << WIDX_TITLE_SEQUENCE_DROPDOWN) |
|
(1 << WIDX_TITLE_SEQUENCE_DROPDOWN) |
|
||||||
(1 << WIDX_TITLE_SEQUENCE_BUTTON) |
|
(1 << WIDX_TITLE_SEQUENCE_BUTTON) |
|
||||||
(1 << WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM) |
|
(1 << WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM) |
|
||||||
(1 << WIDX_STAY_CONNECTED_AFTER_DESYNC),
|
(1 << WIDX_STAY_CONNECTED_AFTER_DESYNC) |
|
||||||
|
(1 << WIDX_AUTO_OPEN_SHOPS),
|
||||||
|
|
||||||
MAIN_OPTIONS_ENABLED_WIDGETS |
|
MAIN_OPTIONS_ENABLED_WIDGETS |
|
||||||
(1 << WIDX_CHANNEL_BUTTON) |
|
(1 << WIDX_CHANNEL_BUTTON) |
|
||||||
|
@ -687,6 +690,11 @@ static void window_options_mouseup(rct_window *w, int widgetIndex)
|
||||||
gConfigNetwork.stay_connected = !gConfigNetwork.stay_connected;
|
gConfigNetwork.stay_connected = !gConfigNetwork.stay_connected;
|
||||||
config_save_default();
|
config_save_default();
|
||||||
window_invalidate(w);
|
window_invalidate(w);
|
||||||
|
break;
|
||||||
|
case WIDX_AUTO_OPEN_SHOPS:
|
||||||
|
gConfigGeneral.auto_open_shops = !gConfigGeneral.auto_open_shops;
|
||||||
|
config_save_default();
|
||||||
|
window_invalidate(w);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1345,6 +1353,7 @@ static void window_options_invalidate(rct_window *w)
|
||||||
widget_set_checkbox_value(w, WIDX_DEBUGGING_TOOLS, gConfigGeneral.debugging_tools);
|
widget_set_checkbox_value(w, WIDX_DEBUGGING_TOOLS, gConfigGeneral.debugging_tools);
|
||||||
widget_set_checkbox_value(w, WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM, gConfigGeneral.allow_loading_with_incorrect_checksum);
|
widget_set_checkbox_value(w, WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM, gConfigGeneral.allow_loading_with_incorrect_checksum);
|
||||||
widget_set_checkbox_value(w, WIDX_STAY_CONNECTED_AFTER_DESYNC, gConfigNetwork.stay_connected);
|
widget_set_checkbox_value(w, WIDX_STAY_CONNECTED_AFTER_DESYNC, gConfigNetwork.stay_connected);
|
||||||
|
widget_set_checkbox_value(w, WIDX_AUTO_OPEN_SHOPS, gConfigGeneral.auto_open_shops);
|
||||||
|
|
||||||
window_options_misc_widgets[WIDX_REAL_NAME_CHECKBOX].type = WWT_CHECKBOX;
|
window_options_misc_widgets[WIDX_REAL_NAME_CHECKBOX].type = WWT_CHECKBOX;
|
||||||
window_options_misc_widgets[WIDX_SAVE_PLUGIN_DATA_CHECKBOX].type = WWT_CHECKBOX;
|
window_options_misc_widgets[WIDX_SAVE_PLUGIN_DATA_CHECKBOX].type = WWT_CHECKBOX;
|
||||||
|
@ -1359,6 +1368,7 @@ static void window_options_invalidate(rct_window *w)
|
||||||
window_options_misc_widgets[WIDX_TITLE_SEQUENCE_BUTTON].type = WWT_DROPDOWN_BUTTON;
|
window_options_misc_widgets[WIDX_TITLE_SEQUENCE_BUTTON].type = WWT_DROPDOWN_BUTTON;
|
||||||
window_options_misc_widgets[WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM].type = WWT_CHECKBOX;
|
window_options_misc_widgets[WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM].type = WWT_CHECKBOX;
|
||||||
window_options_misc_widgets[WIDX_STAY_CONNECTED_AFTER_DESYNC].type = WWT_CHECKBOX;
|
window_options_misc_widgets[WIDX_STAY_CONNECTED_AFTER_DESYNC].type = WWT_CHECKBOX;
|
||||||
|
window_options_misc_widgets[WIDX_AUTO_OPEN_SHOPS].type = WWT_CHECKBOX;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WINDOW_OPTIONS_PAGE_TWITCH:
|
case WINDOW_OPTIONS_PAGE_TWITCH:
|
||||||
|
|
|
@ -585,6 +585,12 @@ static void window_ride_construction_close(rct_window *w)
|
||||||
|
|
||||||
uint8 rideIndex = _currentRideIndex;
|
uint8 rideIndex = _currentRideIndex;
|
||||||
if (sub_6CAF80(rideIndex, &mapElement) || network_get_mode() == NETWORK_MODE_CLIENT) {
|
if (sub_6CAF80(rideIndex, &mapElement) || network_get_mode() == NETWORK_MODE_CLIENT) {
|
||||||
|
|
||||||
|
rct_ride *ride = GET_RIDE(rideIndex);
|
||||||
|
if (ride->mode == RIDE_MODE_SHOP_STALL && gConfigGeneral.auto_open_shops) {
|
||||||
|
ride->status = 1;
|
||||||
|
}
|
||||||
|
|
||||||
window_ride_main_open(rideIndex);
|
window_ride_main_open(rideIndex);
|
||||||
} else {
|
} else {
|
||||||
int eax = RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8);
|
int eax = RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8);
|
||||||
|
|
Loading…
Reference in New Issue