find/replace "Game.world." -> "self.World." in all traits and activities.

This commit is contained in:
Bob
2010-01-21 13:15:05 +13:00
parent dd93ee014a
commit 6688716aa5
49 changed files with 106 additions and 106 deletions

View File

@@ -49,11 +49,11 @@ namespace OpenRa.Traits
BeginProduction( unit.Category,
new ProductionItem( order.TargetString, (int)time, ui.Cost,
() => Game.world.AddFrameEndTask(
() => self.World.AddFrameEndTask(
_ =>
{
var isBuilding = unit.Traits.Contains<BuildingInfo>();
if( !hasPlayedSound && order.Player == Game.world.LocalPlayer )
if( !hasPlayedSound && order.Player == self.World.LocalPlayer )
{
Sound.Play( isBuilding ? "conscmp1.aud" : "unitrdy1.aud" );
hasPlayedSound = true;
@@ -131,7 +131,7 @@ namespace OpenRa.Traits
Actor producer = null;
// Prioritise primary structure in build order
var primaryProducers = Game.world.Actors
var primaryProducers = self.World.Actors
.Where(x => x.traits.Contains<Production>()
&& producerTypes.Contains(x.Info)
&& x.Owner == self.Owner
@@ -152,7 +152,7 @@ namespace OpenRa.Traits
// Pick the first available producer
if (producer == null)
{
producer = Game.world.Actors
producer = self.World.Actors
.Where( x => producerTypes.Contains( x.Info ) && x.Owner == self.Owner )
.FirstOrDefault();
}