mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-23 04:04:09 +01:00
Codechange: Simplify usage of GRFFileProps by adding some common helper methods.
This commit is contained in:
@@ -386,8 +386,7 @@ ObjectResolverObject::ObjectResolverObject(const ObjectSpec *spec, Object *obj,
|
||||
CallbackID callback, uint32_t param1, uint32_t param2)
|
||||
: ResolverObject(spec->grf_prop.grffile, callback, param1, param2), object_scope(*this, obj, spec, tile, view)
|
||||
{
|
||||
this->root_spritegroup = (obj == nullptr) ? spec->grf_prop.GetSpriteGroup(StandardSpriteGroup::Purchase) : nullptr;
|
||||
if (this->root_spritegroup == nullptr) this->root_spritegroup = spec->grf_prop.GetSpriteGroup(StandardSpriteGroup::Default);
|
||||
this->root_spritegroup = spec->grf_prop.GetSpriteGroup(obj != nullptr);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user