Feature: Vehicle add-ons can now group engines in purchase list.

Grouped engines are collapsed by default but can be expanded. This allows
similar engines to be grouped together to avoid cluttering the list.

Suggested uses for this are e.g.:
* Liveries; same stats but different paint job.
* Re-gearing; engine design is mostly the same but different stats.

... but avoiding complex hidden cargo subtype refit systems.

Grouped engines are otherwise separate, so can be independently
autoreplaced, even between variants.
This commit is contained in:
Peter Nelson
2022-12-05 19:54:41 +00:00
committed by PeterN
parent 94167dfd34
commit 85814b29d4
3 changed files with 85 additions and 13 deletions

View File

@@ -9001,7 +9001,7 @@ static void FinaliseEngineArray()
/* Set appropriate flags on variant engine */
if (e->info.variant_id != INVALID_ENGINE) {
Engine::Get(e->info.variant_id)->display_flags |= EngineDisplayFlags::HasVariants;
Engine::Get(e->info.variant_id)->display_flags |= EngineDisplayFlags::HasVariants | EngineDisplayFlags::IsFolded;
}
/* Skip wagons, there livery is defined via the engine */