MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetParentLivery

Function GetParentLivery

src/group_cmd.cpp:285–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283
284
285const Livery *GetParentLivery(const Group *g)
286{
287 if (g->parent == GroupID::Invalid()) {
288 const Company *c = Company::Get(g->owner);
289 return &c->livery[LS_DEFAULT];
290 }
291
292 const Group *pg = Group::Get(g->parent);
293 return &pg->livery;
294}
295
296
297/**

Callers 2

CmdAlterGroupFunction · 0.85
CmdSetGroupLiveryFunction · 0.85

Calls 1

InvalidFunction · 0.85

Tested by

no test coverage detected