1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Allow running marketing campaigns for up to 12 weeks

This commit is contained in:
Gymnasiast
2015-07-26 12:14:14 +02:00
parent 3de7a456f5
commit 777065e6a6
3 changed files with 13 additions and 12 deletions

View File

@@ -2441,11 +2441,11 @@ STR_2433 :{BLACK}Vouchers for free {STRINGID}
STR_2434 :{BLACK}Advertising campaign for {STRINGID}
STR_2435 :{BLACK}Advertising campaign for {STRINGID}
STR_2436 :1 week
STR_2437 :2 weeks
STR_2438 :3 weeks
STR_2439 :4 weeks
STR_2440 :5 weeks
STR_2441 :6 weeks
STR_2437 :<not used anymore>
STR_2438 :<not used anymore>
STR_2439 :<not used anymore>
STR_2440 :<not used anymore>
STR_2441 :<not used anymore>
STR_2442 :{BLACK}({STRINGID} remaining)
STR_2443 :{WINDOW_COLOUR_2}Cost per week: {BLACK}{CURRENCY2DP}
STR_2444 :{WINDOW_COLOUR_2}Total cost: {BLACK}{CURRENCY2DP}
@@ -3811,6 +3811,7 @@ STR_5471 :Scroll map down
STR_5472 :Scroll map right
STR_5473 :Cycle day / night
STR_5474 :Display text on banners in upper case
STR_5475 :{COMMA16} weeks
STR_5476 :Hardware
STR_5477 :Map rendering
STR_5478 :Controls

View File

@@ -1096,11 +1096,6 @@ enum {
STR_ADVERTISING_CAMPAIGN_FOR_2 = 2435,
STR_MARKETING_1_WEEK = 2436,
STR_MARKETING_2_WEEKS = 2437,
STR_MARKETING_3_WEEKS = 2438,
STR_MARKETING_4_WEEKS = 2439,
STR_MARKETING_5_WEEKS = 2440,
STR_MARKETING_6_WEEKS = 2441,
STR_MARKETING_WEEKS_REMAINING = 2442,
STR_MARKETING_COST_PER_WEEK = 2443,
STR_MARKETING_TOTAL_COST = 2444,
@@ -1827,6 +1822,9 @@ enum {
STR_CYCLE_DAY_NIGHT = 5473,
STR_UPPER_CASE_BANNERS = 5474,
STR_X_WEEKS = 5475,
STR_HARDWARE_GROUP = 5476,
STR_RENDERING_GROUP = 5477,
STR_CONTROLS_GROUP = 5478,

View File

@@ -294,8 +294,9 @@ static void window_new_campaign_mousedown(int widgetIndex, rct_window *w, rct_wi
);
}
break;
// In RCT2, the maximum was 6 weeks
case WIDX_WEEKS_INCREASE_BUTTON:
w->campaign.no_weeks = min(w->campaign.no_weeks + 1, 6);
w->campaign.no_weeks = min(w->campaign.no_weeks + 1, 12);
window_invalidate(w);
break;
case WIDX_WEEKS_DECREASE_BUTTON:
@@ -366,7 +367,8 @@ static void window_new_campaign_invalidate(rct_window *w)
}
// Set current number of weeks spinner
window_new_campaign_widgets[WIDX_WEEKS_SPINNER].image = (STR_MARKETING_1_WEEK - 1) + w->campaign.no_weeks;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = w->campaign.no_weeks;
window_new_campaign_widgets[WIDX_WEEKS_SPINNER].image = w->campaign.no_weeks == 1 ? STR_MARKETING_1_WEEK : STR_X_WEEKS;
// Enable / disable start button based on ride dropdown
w->disabled_widgets &= ~(1 << WIDX_START_BUTTON);