mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-02-02 11:45:13 +01:00
integrate game command error string variables
- gGameCommandErrorTitle - gGameCommandErrorText
This commit is contained in:
@@ -301,13 +301,13 @@ void game_command_set_current_loan(int* eax, int* ebx, int* ecx, int* edx, int*
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_INTEREST * 4;
|
||||
if (newLoan > currentLoan) {
|
||||
if (newLoan > RCT2_GLOBAL(RCT2_ADDRESS_MAXIMUM_LOAN, money32)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_BANK_REFUSES_TO_INCREASE_LOAN;
|
||||
gGameCommandErrorText = STR_BANK_REFUSES_TO_INCREASE_LOAN;
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (loanDifference > money) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_NOT_ENOUGH_CASH_AVAILABLE;
|
||||
gGameCommandErrorText = STR_NOT_ENOUGH_CASH_AVAILABLE;
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ void marketing_set_guest_campaign(rct_peep *peep, int campaign)
|
||||
|
||||
void marketing_start_campaign(int type, int rideOrItem, int numWeeks)
|
||||
{
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, uint16) = STR_CANT_START_MARKETING_CAMPAIGN;
|
||||
gGameCommandErrorTitle = STR_CANT_START_MARKETING_CAMPAIGN;
|
||||
game_do_command(0, (numWeeks << 8) | GAME_COMMAND_FLAG_APPLY, 0, (rideOrItem << 8) | type, GAME_COMMAND_START_MARKETING_CAMPAIGN, 0, 0);
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ void game_command_start_campaign(int* eax, int* ebx, int* ecx, int* edx, int* es
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_MARKETING * 4;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = 3048;
|
||||
gGameCommandErrorText = 3048;
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user