Skip to content

Commit

Permalink
apply default skin to tender when applying to engine
Browse files Browse the repository at this point in the history
  • Loading branch information
katycat5e committed Sep 6, 2023
1 parent 4ec3115 commit 89635a8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion SkinManagerMod/CommsRadioSkinSwitcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,16 @@ private void ApplySelectedSkin()
if( (attachedCar != null) && CarTypes.IsTender(attachedCar.carLivery) )
{
// car attached behind loco is tender
Skin tenderSkin = SkinProvider.FindSkinByName(attachedCar.carLivery, SelectedSkin.Name);
Skin tenderSkin;
if (SelectedSkin.IsDefault)
{
tenderSkin = SkinProvider.GetDefaultSkin(attachedCar.carLivery.id);
}
else
{
tenderSkin = SkinProvider.FindSkinByName(attachedCar.carLivery, SelectedSkin.Name);
}

if (tenderSkin != null)
{
// found a matching skin for the tender :D
Expand Down

0 comments on commit 89635a8

Please sign in to comment.