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

Fix #15919: Scenery groups are missing in scenario editor

This commit is contained in:
Duncan
2021-11-20 10:25:27 +00:00
committed by GitHub
parent f1a5b718e3
commit a60f7de103
3 changed files with 14 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
- Fix: [#15844] Tile Inspector has inconsistent text colours. - Fix: [#15844] Tile Inspector has inconsistent text colours.
- Fix: [#15878] Crash when opening a ride window for a corrupted vehicle. - Fix: [#15878] Crash when opening a ride window for a corrupted vehicle.
- Fix: [#15908] Crash when track elements have no ride assigned. - Fix: [#15908] Crash when track elements have no ride assigned.
- Fix: [#15919] Research status incorrectly considered for scenery when in editor modes.
0.3.5 (2021-11-06) 0.3.5 (2021-11-06)
------------------------------------------------------------------------ ------------------------------------------------------------------------

View File

@@ -597,6 +597,12 @@ bool scenery_group_is_invented(int32_t sgIndex)
return false; return false;
} }
// All scenery is temporarily invented when in the scenario editor
if (gScreenFlags & SCREEN_FLAGS_EDITOR)
{
return true;
}
if (gCheatsIgnoreResearchStatus) if (gCheatsIgnoreResearchStatus)
{ {
return true; return true;

View File

@@ -12,6 +12,7 @@
#include "../Cheats.h" #include "../Cheats.h"
#include "../Context.h" #include "../Context.h"
#include "../Game.h" #include "../Game.h"
#include "../OpenRCT2.h"
#include "../actions/BannerRemoveAction.h" #include "../actions/BannerRemoveAction.h"
#include "../actions/FootpathAdditionRemoveAction.h" #include "../actions/FootpathAdditionRemoveAction.h"
#include "../actions/LargeSceneryRemoveAction.h" #include "../actions/LargeSceneryRemoveAction.h"
@@ -291,6 +292,12 @@ int32_t wall_entry_get_door_sound(const WallSceneryEntry* wallEntry)
bool IsSceneryAvailableToBuild(const ScenerySelection& item) bool IsSceneryAvailableToBuild(const ScenerySelection& item)
{ {
// All scenery can be built when in the scenario editor
if (gScreenFlags & SCREEN_FLAGS_EDITOR)
{
return true;
}
if (!gCheatsIgnoreResearchStatus) if (!gCheatsIgnoreResearchStatus)
{ {
if (!scenery_is_invented(item)) if (!scenery_is_invented(item))