Move StoresOre into Mods.RA

This commit is contained in:
Paul Chote
2010-07-08 19:32:07 +12:00
parent d9ba7ff90c
commit 476d40b317
5 changed files with 15 additions and 8 deletions

View File

@@ -48,8 +48,8 @@ namespace OpenRA.Traits
int nextSiloAdviceTime = 0;
void TickOre(Actor self)
{
OreCapacity = self.World.Queries.OwnedBy[Owner].WithTrait<StoresOre>()
.Sum(a => a.Actor.Info.Traits.Get<StoresOreInfo>().Capacity);
OreCapacity = self.World.Queries.OwnedBy[Owner].WithTrait<IStoreOre>()
.Sum(a => a.Actor.traits.WithInterface<IStoreOre>().Sum(b => b.Capacity));
if (Ore > OreCapacity)
Ore = OreCapacity;