Mine Launcher: the 2021 damage curve; a mine layer is mountless in EveryCatalogGunTracks; script metas

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-08 14:20:13 +02:00
commit 3b41267bee
5 changed files with 10 additions and 3 deletions

View file

@ -84,6 +84,7 @@ public static class WireMines
if (AssetDatabase.TryGetGUIDAndLocalFileIdentifier(asset, out _, out long id) && id == fileId)
return asset;
if (assets.Length == 1) return assets[0];
throw new System.InvalidOperationException($"No {typeof(T).Name} with file id {fileId} in {path}");
throw new System.InvalidOperationException($"No {typeof(T).Name} with file id {fileId} in {path}; it holds " +
string.Join(", ", AssetDatabase.LoadAllAssetsAtPath(path).Select(a => $"{a.GetType().Name} {a.name}")));
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: ecae11055e2a7a04cace71a05965ae88

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 35c62f5e26769f645b1a1614a70422e1

View file

@ -285,8 +285,9 @@ public sealed partial class RunStartTests
Assert.True(price > limited * 2f, $"the mount limit priced the limited gun down: {limited} against {price}");
}
// The shipped catalog's weapon behaviours: launchers and guided weapons never mount-track, every other gun is a mount.
private static bool EvMountless(WeaponData data) => data is LauncherData || data is GuidedWeaponData;
// The shipped catalog's weapon behaviours: launchers, guided weapons and mine layers (which lay at no bearing)
// never mount-track, every other gun is a mount.
private static bool EvMountless(WeaponData data) => data is LauncherData || data is GuidedWeaponData || data is MineLayerData;
private IEnumerable<(WeaponItemData item, WeaponData data)> EvCatalogGuns() =>
_cache.GetAll<WeaponItemData>().SelectMany(item => item.Behaviors.OfType<WeaponData>().Select(data => (item, data)));

View file

@ -1543,6 +1543,7 @@ public static class Program
new MineLayerData
{
DamageType = DamageType.Kinetic,
DamageCurve = new BezierCurve { Keys = new[] { new float4(0f, 1f, 0f, 0f), new float4(1f, 1f, 0f, 0f) } },
Damage = Constant(50f),
Range = Constant(2000f),
MinRange = Constant(0f),