mirror of https://github.com/OpenRCT2/OpenRCT2.git
validate park entrances and land ownership tools
This commit is contained in:
parent
0ed22f52dd
commit
a2fda29d92
|
@ -4876,6 +4876,10 @@ void map_clear_all_elements()
|
|||
}
|
||||
|
||||
money32 place_park_entrance(int flags, sint16 x, sint16 y, sint16 z, uint8 direction) {
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_EDITOR) && !gCheatsSandboxMode) {
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LAND_PURCHASE * 4;
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_X, sint16) = x;
|
||||
|
|
|
@ -806,6 +806,11 @@ void game_command_remove_park_entrance(int *eax, int *ebx, int *ecx, int *edx, i
|
|||
y = *ecx & 0xFFFF;
|
||||
z = *edx * 16;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_EDITOR) && !gCheatsSandboxMode) {
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LAND_PURCHASE * 4;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_X, uint16) = x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_Y, uint16) = y;
|
||||
|
@ -987,6 +992,10 @@ money32 map_buy_land_rights_for_tile(int x, int y, int setting, int flags) {
|
|||
}
|
||||
return 0;
|
||||
default:
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_EDITOR) && !gCheatsSandboxMode) {
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
if (x <= 32 || y <= 32) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = 3215;
|
||||
return MONEY32_UNDEFINED;
|
||||
|
|
Loading…
Reference in New Issue