Separated resource rendering into another trait

This commit is contained in:
teinarss
2019-06-18 22:09:45 +02:00
committed by abcdefg30
parent 0e93d85273
commit f0b69f8b8d
16 changed files with 377 additions and 180 deletions

View File

@@ -65,7 +65,7 @@ namespace OpenRA.Mods.Common.Traits
var cell = Util.RandomWalk(self.Location, self.World.SharedRandom)
.Take(info.MaxRange)
.SkipWhile(p => !self.World.Map.Contains(p) ||
(resLayer.GetResource(p) == resourceType && resLayer.IsFull(p)))
(resLayer.GetResourceType(p) == resourceType && resLayer.IsFull(p)))
.Cast<CPos?>().FirstOrDefault();
if (cell != null && resLayer.CanSpawnResourceAt(resourceType, cell.Value))