mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 20:43:04 +01:00
Implement #5855: Display source game in missing obj window
This commit is contained in:
committed by
Michael Steenbeek
parent
f5923dbe99
commit
fab8efbe2a
@@ -19,6 +19,7 @@
|
||||
#include <unordered_set>
|
||||
#include "../core/Console.hpp"
|
||||
#include "../core/Memory.hpp"
|
||||
#include "../localisation/string_ids.h"
|
||||
#include "FootpathItemObject.h"
|
||||
#include "LargeSceneryObject.h"
|
||||
#include "Object.h"
|
||||
@@ -232,6 +233,22 @@ public:
|
||||
return objects;
|
||||
}
|
||||
|
||||
static rct_string_id GetObjectSourceGameString(const rct_object_entry * entry)
|
||||
{
|
||||
uint8 source = (entry->flags & 0xF0) >> 4;
|
||||
switch (source)
|
||||
{
|
||||
case OBJECT_SOURCE_RCT2:
|
||||
return STR_ROLLERCOASTER_TYCOON_2_DROPDOWN;
|
||||
case OBJECT_SOURCE_WACKY_WORLDS:
|
||||
return STR_OBJECT_FILTER_WW;
|
||||
case OBJECT_SOURCE_TIME_TWISTER:
|
||||
return STR_OBJECT_FILTER_TT;
|
||||
default:
|
||||
return STR_OBJECT_FILTER_CUSTOM;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
sint32 FindSpareSlot(uint8 objectType)
|
||||
{
|
||||
@@ -648,4 +665,9 @@ extern "C"
|
||||
objectManager->UnloadAll();
|
||||
}
|
||||
}
|
||||
|
||||
rct_string_id object_manager_get_source_game_string(const rct_object_entry * entry)
|
||||
{
|
||||
return ObjectManager::GetObjectSourceGameString(entry);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user