mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 06:44:38 +01:00
Add loadImages parameter to LoadTempObject()
This commit is contained in:
@@ -245,7 +245,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
return;
|
||||
|
||||
auto& objManager = GetContext()->GetObjectManager();
|
||||
if (auto obj = objManager.LoadTempObject(source.textObjectId); obj != nullptr)
|
||||
if (auto obj = objManager.LoadTempObject(source.textObjectId, true); obj != nullptr)
|
||||
{
|
||||
auto& scenarioMetaObj = reinterpret_cast<ScenarioMetaObject&>(*obj);
|
||||
scenarioMetaObj.Load();
|
||||
|
||||
@@ -165,7 +165,7 @@ namespace OpenRCT2
|
||||
return objectList;
|
||||
}
|
||||
|
||||
std::unique_ptr<Object> LoadTempObject(std::string_view id) override
|
||||
std::unique_ptr<Object> LoadTempObject(std::string_view id, bool loadImages) override
|
||||
{
|
||||
const ObjectRepositoryItem* ori = _objectRepository.FindObject(id);
|
||||
if (ori == nullptr)
|
||||
@@ -174,7 +174,7 @@ namespace OpenRCT2
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto object = _objectRepository.LoadObject(ori);
|
||||
auto object = _objectRepository.LoadObject(ori, loadImages);
|
||||
return object;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace OpenRCT2
|
||||
virtual ObjectEntryIndex GetLoadedObjectEntryIndex(const Object* object) = 0;
|
||||
virtual ObjectList GetLoadedObjects() = 0;
|
||||
|
||||
virtual std::unique_ptr<Object> LoadTempObject(std::string_view identifier) = 0;
|
||||
virtual std::unique_ptr<Object> LoadTempObject(std::string_view identifier, bool loadImages) = 0;
|
||||
virtual Object* LoadObject(std::string_view identifier) = 0;
|
||||
virtual Object* LoadObject(const RCTObjectEntry* entry) = 0;
|
||||
virtual Object* LoadObject(const ObjectEntryDescriptor& descriptor) = 0;
|
||||
|
||||
@@ -271,7 +271,7 @@ namespace OpenRCT2::RCT1
|
||||
auto& objManager = GetContext()->GetObjectManager();
|
||||
|
||||
// Load the one specified
|
||||
if (auto obj = objManager.LoadTempObject(desc.textObjectId); obj != nullptr)
|
||||
if (auto obj = objManager.LoadTempObject(desc.textObjectId, false); obj != nullptr)
|
||||
{
|
||||
auto& textObject = reinterpret_cast<ScenarioMetaObject&>(*obj);
|
||||
name = textObject.GetScenarioName();
|
||||
@@ -2422,7 +2422,7 @@ namespace OpenRCT2::RCT1
|
||||
{
|
||||
auto& objManager = GetContext()->GetObjectManager();
|
||||
|
||||
if (auto obj = objManager.LoadTempObject(desc.textObjectId); obj != nullptr)
|
||||
if (auto obj = objManager.LoadTempObject(desc.textObjectId, false); obj != nullptr)
|
||||
{
|
||||
auto& textObject = reinterpret_cast<ScenarioMetaObject&>(*obj);
|
||||
name = textObject.GetScenarioName();
|
||||
|
||||
@@ -272,7 +272,7 @@ namespace OpenRCT2::RCT2
|
||||
{
|
||||
auto& objManager = GetContext()->GetObjectManager();
|
||||
|
||||
if (auto obj = objManager.LoadTempObject(desc.textObjectId); obj != nullptr)
|
||||
if (auto obj = objManager.LoadTempObject(desc.textObjectId, false); obj != nullptr)
|
||||
{
|
||||
auto& textObject = reinterpret_cast<ScenarioMetaObject&>(*obj);
|
||||
dst->Name = textObject.GetScenarioName();
|
||||
|
||||
Reference in New Issue
Block a user