Codechange: Sprite mapping for objects doesn't involve cargo types. (#10905)

Objects have a default sprite group and an optional purchase list sprite
group. There is no need to pretend that these are cargo IDs.
This commit is contained in:
PeterN
2023-06-02 09:25:13 +01:00
committed by GitHub
parent cdb3a6288b
commit 0b663f709d
3 changed files with 13 additions and 19 deletions

View File

@@ -378,8 +378,8 @@ ObjectResolverObject::ObjectResolverObject(const ObjectSpec *spec, Object *obj,
: ResolverObject(spec->grf_prop.grffile, callback, param1, param2), object_scope(*this, obj, spec, tile, view)
{
this->town_scope = nullptr;
this->root_spritegroup = (obj == nullptr && spec->grf_prop.spritegroup[CT_PURCHASE_OBJECT] != nullptr) ?
spec->grf_prop.spritegroup[CT_PURCHASE_OBJECT] : spec->grf_prop.spritegroup[0];
this->root_spritegroup = (obj == nullptr && spec->grf_prop.spritegroup[OBJECT_SPRITE_GROUP_PURCHASE] != nullptr) ?
spec->grf_prop.spritegroup[OBJECT_SPRITE_GROUP_PURCHASE] : spec->grf_prop.spritegroup[OBJECT_SPRITE_GROUP_DEFAULT];
}
ObjectResolverObject::~ObjectResolverObject()