diff --git a/src/config.c b/src/config.c index 241862f72e..7c0d33793e 100644 --- a/src/config.c +++ b/src/config.c @@ -271,7 +271,7 @@ config_property_definition _notificationsDefinitions[] = { { offsetof(notification_configuration, ride_researched), "ride_researched", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL }, { offsetof(notification_configuration, guest_warnings), "guest_warnings", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL }, { offsetof(notification_configuration, guest_lost), "guest_lost", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL }, - { offsetof(notification_configuration, guest_entered_left_park), "guest_entered_left_park", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL }, + { offsetof(notification_configuration, guest_left_park), "guest_entered_left_park", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL }, { offsetof(notification_configuration, guest_queuing_for_ride), "guest_queuing_for_ride", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL }, { offsetof(notification_configuration, guest_on_ride), "guest_on_ride", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL }, { offsetof(notification_configuration, guest_left_ride), "guest_left_ride", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL }, diff --git a/src/config.h b/src/config.h index e45e672991..e85c5d66d1 100644 --- a/src/config.h +++ b/src/config.h @@ -240,7 +240,7 @@ typedef struct { bool ride_researched; bool guest_warnings; bool guest_lost; - bool guest_entered_left_park; + bool guest_left_park; bool guest_queuing_for_ride; bool guest_on_ride; bool guest_left_ride; diff --git a/src/localisation/string_ids.h b/src/localisation/string_ids.h index d3e09e203b..eefc342871 100644 --- a/src/localisation/string_ids.h +++ b/src/localisation/string_ids.h @@ -2221,7 +2221,7 @@ enum { STR_NOTIFICATION_RIDE_RESEARCHED = 5597, STR_NOTIFICATION_GUEST_WARNINGS = 5598, STR_NOTIFICATION_GUEST_LOST = 5599, - STR_NOTIFICATION_GUEST_ENTERED_LEFT_PARK = 5600, + STR_NOTIFICATION_GUEST_LEFT_PARK = 5600, STR_NOTIFICATION_GUEST_QUEUING_FOR_RIDE = 5601, STR_NOTIFICATION_GUEST_ON_RIDE = 5602, STR_NOTIFICATION_GUEST_LEFT_RIDE = 5603, diff --git a/src/management/award.c b/src/management/award.c index 6eac789f6b..b48bc9284b 100644 --- a/src/management/award.c +++ b/src/management/award.c @@ -19,6 +19,7 @@ *****************************************************************************/ #include "../addresses.h" +#include "../config.h" #include "../interface/window.h" #include "../localisation/localisation.h" #include "../peep/peep.h" @@ -619,7 +620,9 @@ void award_update_all() // Add award gCurrentAwards[freeAwardEntryIndex].type = awardType; gCurrentAwards[freeAwardEntryIndex].time = 5; - news_item_add_to_queue(NEWS_ITEM_AWARD, STR_NEWS_ITEM_AWARD_MOST_UNTIDY + awardType, 0); + if (gConfigNotifications.park_award) { + news_item_add_to_queue(NEWS_ITEM_AWARD, STR_NEWS_ITEM_AWARD_MOST_UNTIDY + awardType, 0); + } window_invalidate_by_class(WC_PARK_INFORMATION); } } diff --git a/src/management/marketing.c b/src/management/marketing.c index 602350b3a4..7e3a4a16be 100644 --- a/src/management/marketing.c +++ b/src/management/marketing.c @@ -19,6 +19,7 @@ *****************************************************************************/ #include "../addresses.h" +#include "../config.h" #include "../game.h" #include "../interface/window.h" #include "../localisation/localisation.h" @@ -100,7 +101,9 @@ void marketing_update() RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ShopItemStringIds[campaignItem].plural; } - news_item_add_to_queue(NEWS_ITEM_MONEY, STR_MARKETING_FINISHED_BASE + campaign, 0); + if (gConfigNotifications.park_marketing_campaign_finished) { + news_item_add_to_queue(NEWS_ITEM_MONEY, STR_MARKETING_FINISHED_BASE + campaign, 0); + } } } diff --git a/src/management/research.c b/src/management/research.c index d5f254da88..bf49249448 100644 --- a/src/management/research.c +++ b/src/management/research.c @@ -19,6 +19,7 @@ *****************************************************************************/ #include "../addresses.h" +#include "../config.h" #include "../game.h" #include "../interface/window.h" #include "../localisation/date.h" @@ -203,8 +204,11 @@ void research_finish_item(sint32 entryIndex) if (RCT2_GLOBAL(0x009AC06C, uint8) == 0) { RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, rct_string_id) = ((rideEntry->flags & RIDE_ENTRY_FLAG_SEPARATE_RIDE_NAME)) ? rideEntry->name : base_ride_type + 2; - if (!gSilentResearch) - news_item_add_to_queue(NEWS_ITEM_RESEARCH, STR_NEWS_ITEM_RESEARCH_NEW_RIDE_AVAILABLE, entryIndex); + if (!gSilentResearch) { + if (gConfigNotifications.ride_researched) { + news_item_add_to_queue(NEWS_ITEM_RESEARCH, STR_NEWS_ITEM_RESEARCH_NEW_RIDE_AVAILABLE, entryIndex); + } + } } research_invalidate_related_windows(); @@ -219,8 +223,11 @@ void research_finish_item(sint32 entryIndex) // I don't think 0x009AC06C is ever not 0, so probably redundant if (RCT2_GLOBAL(0x009AC06C, uint8) == 0) { RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, rct_string_id) = scenerySetEntry->name; - if (!gSilentResearch) - news_item_add_to_queue(NEWS_ITEM_RESEARCH, STR_NEWS_ITEM_RESEARCH_NEW_SCENERY_SET_AVAILABLE, entryIndex); + if (!gSilentResearch) { + if (gConfigNotifications.ride_researched) { + news_item_add_to_queue(NEWS_ITEM_RESEARCH, STR_NEWS_ITEM_RESEARCH_NEW_SCENERY_SET_AVAILABLE, entryIndex); + } + } } research_invalidate_related_windows(); diff --git a/src/peep/peep.c b/src/peep/peep.c index c042195323..5a698ff3bf 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -1329,7 +1329,9 @@ void peep_update_falling(rct_peep* peep){ if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & 0x80000)){ RCT2_GLOBAL(0x13CE952, uint16) = peep->name_string_idx; RCT2_GLOBAL(0x13CE954, uint32) = peep->id; - news_item_add_to_queue(NEWS_ITEM_BLANK, STR_NEWS_ITEM_GUEST_DROWNED, peep->x | (peep->y << 16)); + if (gConfigNotifications.guest_died) { + news_item_add_to_queue(NEWS_ITEM_BLANK, STR_NEWS_ITEM_GUEST_DROWNED, peep->x | (peep->y << 16)); + } } RCT2_GLOBAL(0x135882E, uint16) += 25; if (RCT2_GLOBAL(0x135882E, uint16) > 1000){ @@ -2123,8 +2125,10 @@ static void peep_update_ride_sub_state_2_enter_ride(rct_peep* peep, rct_ride* ri else msg_string = STR_PEEP_TRACKING_PEEP_IS_ON_X; + if (gConfigNotifications.guest_on_ride) { news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, msg_string, peep->sprite_index); } + } if (ride->type == RIDE_TYPE_SPIRAL_SLIDE){ sub_693BE5(peep, 1); @@ -3169,7 +3173,9 @@ static void peep_update_ride_sub_state_18(rct_peep* peep){ RCT2_GLOBAL(0x13CE958, uint16) = ride->name; RCT2_GLOBAL(0x13CE95A, uint32) = ride->name_arguments; - news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_LEFT_RIDE_X, peep->sprite_index); + if (gConfigNotifications.guest_left_ride) { + news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_LEFT_RIDE_X, peep->sprite_index); + } } peep->var_79 = 0xFF; @@ -5264,54 +5270,70 @@ void peep_problem_warnings_update() --warning_throttle[0]; else if ( hunger_counter >= PEEP_HUNGER_WARNING_THRESHOLD && hunger_counter >= guests_in_park / 16) { warning_throttle[0] = 4; + if (gConfigNotifications.guest_warnings) { news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_ARE_HUNGRY, 20); } + } if (warning_throttle[1]) --warning_throttle[1]; else if (thirst_counter >= PEEP_THIRST_WARNING_THRESHOLD && thirst_counter >= guests_in_park / 16) { warning_throttle[1] = 4; + if (gConfigNotifications.guest_warnings) { news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_ARE_THIRSTY, 21); } + } if (warning_throttle[2]) --warning_throttle[2]; else if (bathroom_counter >= PEEP_BATHROOM_WARNING_THRESHOLD && bathroom_counter >= guests_in_park / 16) { warning_throttle[2] = 4; + if (gConfigNotifications.guest_warnings) { news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_CANT_FIND_BATHROOM, 22); } + } if (warning_throttle[3]) --warning_throttle[3]; else if (litter_counter >= PEEP_LITTER_WARNING_THRESHOLD && litter_counter >= guests_in_park / 32) { warning_throttle[3] = 4; + if (gConfigNotifications.guest_warnings) { news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_DISLIKE_LITTER, 26); } + } if (warning_throttle[4]) --warning_throttle[4]; else if (disgust_counter >= PEEP_DISGUST_WARNING_THRESHOLD && disgust_counter >= guests_in_park / 32) { warning_throttle[4] = 4; + if (gConfigNotifications.guest_warnings) { news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_DISGUSTED_BY_PATHS, 31); } + } if (warning_throttle[5]) --warning_throttle[5]; else if (vandalism_counter >= PEEP_VANDALISM_WARNING_THRESHOLD && vandalism_counter >= guests_in_park / 32) { warning_throttle[5] = 4; + if (gConfigNotifications.guest_warnings) { news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_DISLIKE_VANDALISM, 33); } + } if (warning_throttle[6]) --warning_throttle[6]; else if (noexit_counter >= PEEP_NOEXIT_WARNING_THRESHOLD) { warning_throttle[6] = 4; + if (gConfigNotifications.guest_warnings) { news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_GETTING_LOST_OR_STUCK, 27); + } } else if (lost_counter >= PEEP_LOST_WARNING_THRESHOLD) { warning_throttle[6] = 4; + if (gConfigNotifications.guest_warnings) { news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_GETTING_LOST_OR_STUCK, 16); } } +} /** * @@ -6297,7 +6319,9 @@ static int peep_interact_with_entrance(rct_peep* peep, sint16 x, sint16 y, rct_m RCT2_GLOBAL(0x0013CE954, uint32) = peep->id; RCT2_GLOBAL(0x0013CE958, rct_string_id) = ride->name; RCT2_GLOBAL(0x0013CE95A, uint32) = ride->name_arguments; - news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, peep->sprite_index); + if (gConfigNotifications.guest_queuing_for_ride) { + news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, peep->sprite_index); + } } return 1; } @@ -6339,7 +6363,9 @@ static int peep_interact_with_entrance(rct_peep* peep, sint16 x, sint16 y, rct_m if (peep->flags & PEEP_FLAGS_TRACKING){ RCT2_GLOBAL(0x0013CE952, rct_string_id) = peep->name_string_idx; RCT2_GLOBAL(0x0013CE954, uint32) = peep->id; - news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_LEFT_PARK, peep->sprite_index); + if (gConfigNotifications.guest_left_park) { + news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_LEFT_PARK, peep->sprite_index); + } } return 1; } @@ -6674,7 +6700,9 @@ static int peep_interact_with_path(rct_peep* peep, sint16 x, sint16 y, rct_map_e RCT2_GLOBAL(0x0013CE954, uint32) = peep->id; RCT2_GLOBAL(0x0013CE958, rct_string_id) = ride->name; RCT2_GLOBAL(0x0013CE95A, uint32) = ride->name_arguments; - news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, peep->sprite_index); + if (gConfigNotifications.guest_queuing_for_ride) { + news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, peep->sprite_index); + } } return peep_footpath_move_forward(peep, x, y, map_element, vandalism_present); @@ -6746,8 +6774,10 @@ static int peep_interact_with_shop(rct_peep* peep, sint16 x, sint16 y, rct_map_e RCT2_GLOBAL(0x0013CE958, rct_string_id) = ride->name; RCT2_GLOBAL(0x0013CE95A, uint32) = ride->name_arguments; rct_string_id string_id = ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IN_RIDE) ? 1933 : 1932; + if (gConfigNotifications.guest_used_facility) { news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, string_id, peep->sprite_index); } + } return 1; } else{ @@ -8287,8 +8317,10 @@ loc_69B221: RCT2_GLOBAL(0x13CE952,uint16) = peep->name_string_idx; RCT2_GLOBAL((0x13CE952 + 2), uint32) = peep->id; RCT2_GLOBAL((0x13CE956 + 2), uint16) = (shopItem >= 32 ? STR_SHOP_ITEM_INDEFINITE_PHOTO2 + (shopItem - 32) : STR_SHOP_ITEM_INDEFINITE_BALLOON + shopItem); + if (gConfigNotifications.guest_bought_item) { news_item_add_to_queue(2, STR_PEEP_TRACKING_NOTIFICATION_BOUGHT_X, peep->sprite_index); } + } if (shop_item_is_food(shopItem)) peep->no_of_food++; diff --git a/src/ride/ride.c b/src/ride/ride.c index fb154e3852..09c44baa8f 100644 --- a/src/ride/ride.c +++ b/src/ride/ride.c @@ -2299,7 +2299,9 @@ void ride_breakdown_add_news_item(int rideIndex) RCT2_GLOBAL(0x0013CE952 + 0, uint16) = ride->name; RCT2_GLOBAL(0x0013CE952 + 2, uint32) = ride->name_arguments; - news_item_add_to_queue(NEWS_ITEM_RIDE, STR_RIDE_IS_BROKEN_DOWN, rideIndex); + if (gConfigNotifications.ride_broken_down) { + news_item_add_to_queue(NEWS_ITEM_RIDE, STR_RIDE_IS_BROKEN_DOWN, rideIndex); + } } /** @@ -2323,7 +2325,9 @@ static void ride_breakdown_status_update(int rideIndex) ) { RCT2_GLOBAL(0x0013CE952 + 0, uint16) = ride->name; RCT2_GLOBAL(0x0013CE952 + 2, uint32) = ride->name_arguments; - news_item_add_to_queue(NEWS_ITEM_RIDE, STR_RIDE_IS_STILL_NOT_FIXED, rideIndex); + if (gConfigNotifications.ride_warnings) { + news_item_add_to_queue(NEWS_ITEM_RIDE, STR_RIDE_IS_STILL_NOT_FIXED, rideIndex); + } } } @@ -3043,7 +3047,9 @@ static void ride_entrance_exit_connected(rct_ride* ride, int ride_idx) // name of ride is parameter of the format string RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name; RCT2_GLOBAL(0x013CE954, uint32) = ride->name_arguments; + if (gConfigNotifications.ride_warnings) { news_item_add_to_queue(1, STR_ENTRANCE_NOT_CONNECTED, ride_idx); + } ride->connected_message_throttle = 3; } @@ -3051,7 +3057,9 @@ static void ride_entrance_exit_connected(rct_ride* ride, int ride_idx) // name of ride is parameter of the format string RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name; RCT2_GLOBAL(0x013CE954, uint32) = ride->name_arguments; + if (gConfigNotifications.ride_warnings) { news_item_add_to_queue(1, STR_EXIT_NOT_CONNECTED, ride_idx); + } ride->connected_message_throttle = 3; } @@ -3117,7 +3125,9 @@ static void ride_shop_connected(rct_ride* ride, int ride_idx) // Name of ride is parameter of the format string RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name; RCT2_GLOBAL(0x013CE954, uint32) = ride->name_arguments; + if (gConfigNotifications.ride_warnings) { news_item_add_to_queue(1, STR_ENTRANCE_NOT_CONNECTED, ride_idx); + } ride->connected_message_throttle = 3; } @@ -7211,8 +7221,10 @@ void ride_crash(int rideIndex, int vehicleIndex) RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, rct_string_id) = ride->name; RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments; + if (gConfigNotifications.ride_crashed) { news_item_add_to_queue(NEWS_ITEM_RIDE, STR_RIDE_HAS_CRASHED, rideIndex); } +} bool ride_type_is_intamin(int rideType) { diff --git a/src/scenario.c b/src/scenario.c index 8f2cf58bb0..9bc0f7e262 100644 --- a/src/scenario.c +++ b/src/scenario.c @@ -511,7 +511,9 @@ void scenario_entrance_fee_too_high_check() } packed_xy = (y << 16) | x; - news_item_add_to_queue(NEWS_ITEM_BLANK, STR_ENTRANCE_FEE_TOO_HI, packed_xy); + if (gConfigNotifications.park_warnings) { + news_item_add_to_queue(NEWS_ITEM_BLANK, STR_ENTRANCE_FEE_TOO_HI, packed_xy); + } } } @@ -1330,13 +1332,21 @@ static void scenario_objective_check_guests_and_rating() if (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_PARK_RATING, uint16) < 700 && RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_YEAR, uint16) >= 1) { RCT2_GLOBAL(RCT2_ADDRESS_PARK_RATING_WARNING_DAYS, uint16)++; if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_RATING_WARNING_DAYS, uint16) == 1) { - news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_RATING_WARNING_4_WEEKS_REMAINING, 0); + if (gConfigNotifications.park_rating_warnings) { + news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_RATING_WARNING_4_WEEKS_REMAINING, 0); + } } else if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_RATING_WARNING_DAYS, uint16) == 8) { - news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_RATING_WARNING_3_WEEKS_REMAINING, 0); + if (gConfigNotifications.park_rating_warnings) { + news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_RATING_WARNING_3_WEEKS_REMAINING, 0); + } } else if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_RATING_WARNING_DAYS, uint16) == 15) { - news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_RATING_WARNING_2_WEEKS_REMAINING, 0); + if (gConfigNotifications.park_rating_warnings) { + news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_RATING_WARNING_2_WEEKS_REMAINING, 0); + } } else if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_RATING_WARNING_DAYS, uint16) == 22) { - news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_RATING_WARNING_1_WEEK_REMAINING, 0); + if (gConfigNotifications.park_rating_warnings) { + news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_RATING_WARNING_1_WEEK_REMAINING, 0); + } } else if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_RATING_WARNING_DAYS, uint16) == 29) { news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_HAS_BEEN_CLOSED_DOWN, 0); RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_PARK_OPEN; diff --git a/src/windows/news_options.c b/src/windows/news_options.c index 20a8760e24..41a99e7f3a 100644 --- a/src/windows/news_options.c +++ b/src/windows/news_options.c @@ -27,7 +27,7 @@ static const notification_def NewsItemOptionDefinitions[] = { { NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_RESEARCHED, offsetof(notification_configuration, ride_researched) }, { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_WARNINGS, offsetof(notification_configuration, guest_warnings) }, { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_LOST, offsetof(notification_configuration, guest_lost) }, - { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_ENTERED_LEFT_PARK, offsetof(notification_configuration, guest_entered_left_park) }, + { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_LEFT_PARK, offsetof(notification_configuration, guest_left_park) }, { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_QUEUING_FOR_RIDE, offsetof(notification_configuration, guest_queuing_for_ride) }, { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_ON_RIDE, offsetof(notification_configuration, guest_on_ride) }, { NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_LEFT_RIDE, offsetof(notification_configuration, guest_left_ride) },