Skip to content

Commit

Permalink
fix #39 require license type not displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
katycat5e committed May 25, 2022
1 parent b27b53d commit ee01021
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Patches_LicenseManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,18 @@ static void AcquirePassLicenseLegacySave()
}
}
}

[HarmonyPatch(nameof(LicenseManager.GetRequiredLicensesInOrderToAcquireJobLicense))]
[HarmonyPrefix]
static bool RequiredToAcquirePassLicense(JobLicenses license, ref ValueTuple<GeneralLicenseType, JobLicenses> __result)
{
if (license != PassLicenses.Passengers1)
{
return true;
}

__result = new ValueTuple<GeneralLicenseType, JobLicenses>(GeneralLicenseType.NotSet, JobLicenses.Shunting);
return false;
}
}
}

0 comments on commit ee01021

Please sign in to comment.