diff --git a/Source/VehiclesCompat/VehiclesCompat/VehiclesCompat.cs b/Source/VehiclesCompat/VehiclesCompat/VehiclesCompat.cs index ca63c22cec..16e0d4c3ff 100644 --- a/Source/VehiclesCompat/VehiclesCompat/VehiclesCompat.cs +++ b/Source/VehiclesCompat/VehiclesCompat/VehiclesCompat.cs @@ -78,13 +78,17 @@ public static IEnumerable _GetUsedAmmo() if (asd != null) { cetddme._ammoSet = asd; - HashSet allowedAmmo = (HashSet)vtd.ammunition?.AllowedThingDefs; - allowedAmmo.Clear(); + var ammunition = vtd.ammunition = new ThingFilter(); + vtd.genericAmmo = false; + HashSet allowedAmmo = (HashSet)ammunition.AllowedThingDefs; + foreach (var al in asd.ammoTypes) { allowedAmmo.Add(al.ammo); yield return al.ammo; } + + vtd.ammunition.ResolveReferences(); } } }