diff --git a/src/openrct2/object/BannerObject.cpp b/src/openrct2/object/BannerObject.cpp index c9512dcb11..867ff8305e 100644 --- a/src/openrct2/object/BannerObject.cpp +++ b/src/openrct2/object/BannerObject.cpp @@ -19,6 +19,7 @@ #include "../drawing/drawing.h" #include "../localisation/language.h" +#include "../object.h" void BannerObject::ReadLegacy(IReadObjectContext * context, IStream * stream) { @@ -40,6 +41,18 @@ void BannerObject::ReadLegacy(IReadObjectContext * context, IStream * stream) { context->LogError(OBJECT_ERROR_INVALID_PROPERTY, "Price can not be free or negative."); } + + // Add banners to 'Signs and items for footpaths' group, rather than lumping them in the Miscellaneous tab. + // Since this is already done the other way round for original items, avoid adding those to prevent duplicates. + const std::string identifier = GetIdentifier(); + const rct_object_entry * objectEntry = object_list_find_by_name(identifier.c_str()); + uint8 source = (objectEntry->flags & 0xF0) >> 4; + static const rct_object_entry * scgPathX = object_list_find_by_name("SCGPATHX"); + + if (scgPathX != nullptr && source != 8) + { + SetPrimarySceneryGroup((rct_object_entry *)scgPathX); + } } void BannerObject::Load() diff --git a/src/openrct2/object/FootpathItemObject.cpp b/src/openrct2/object/FootpathItemObject.cpp index 1c419a43e3..2a4d976a56 100644 --- a/src/openrct2/object/FootpathItemObject.cpp +++ b/src/openrct2/object/FootpathItemObject.cpp @@ -19,6 +19,7 @@ #include "../drawing/drawing.h" #include "../localisation/localisation.h" +#include "../object.h" void FootpathItemObject::ReadLegacy(IReadObjectContext * context, IStream * stream) { @@ -41,6 +42,18 @@ void FootpathItemObject::ReadLegacy(IReadObjectContext * context, IStream * stre { context->LogError(OBJECT_ERROR_INVALID_PROPERTY, "Price can not be free or negative."); } + + // Add path bits to 'Signs and items for footpaths' group, rather than lumping them in the Miscellaneous tab. + // Since this is already done the other way round for original items, avoid adding those to prevent duplicates. + const std::string identifier = GetIdentifier(); + const rct_object_entry * objectEntry = object_list_find_by_name(identifier.c_str()); + uint8 source = (objectEntry->flags & 0xF0) >> 4; + static const rct_object_entry * scgPathX = object_list_find_by_name("SCGPATHX"); + + if (scgPathX != nullptr && source != 8) + { + SetPrimarySceneryGroup((rct_object_entry *)scgPathX); + } } void FootpathItemObject::Load()