Enforce stricter resource API

This commit is contained in:
Gustas
2025-03-04 13:53:49 +02:00
committed by Matthias Mailänder
parent 7779d0c27c
commit 5aa7ee43db
9 changed files with 37 additions and 36 deletions

View File

@@ -50,7 +50,7 @@ namespace OpenRA.Mods.Common.Warheads
if (!resourceLayer.CanAddResource(AddsResourceType, cell))
continue;
var splash = world.SharedRandom.Next(1, maxDensity - resourceLayer.GetResource(cell).Density);
var splash = (byte)world.SharedRandom.Next(1, maxDensity - resourceLayer.GetResource(cell).Density);
resourceLayer.AddResource(AddsResourceType, cell, splash);
}
}