move LobbyInfo onto OrderManager

This commit is contained in:
Bob
2010-10-11 16:00:02 +13:00
parent beecb8aeb1
commit 17990ab8b7
17 changed files with 98 additions and 88 deletions

View File

@@ -97,7 +97,7 @@ namespace OpenRA.Mods.RA
public virtual IEnumerable<ActorInfo> AllItems()
{
if (Game.LobbyInfo.GlobalSettings.AllowCheats && self.Owner.PlayerActor.Trait<DeveloperMode>().AllTech)
if (self.World.LobbyInfo.GlobalSettings.AllowCheats && self.Owner.PlayerActor.Trait<DeveloperMode>().AllTech)
return Produceable.Select(a => a.Key);
return Produceable.Where(a => a.Value.Buildable || a.Value.Visible).Select(a => a.Key);
@@ -105,7 +105,7 @@ namespace OpenRA.Mods.RA
public virtual IEnumerable<ActorInfo> BuildableItems()
{
if (Game.LobbyInfo.GlobalSettings.AllowCheats && self.Owner.PlayerActor.Trait<DeveloperMode>().AllTech)
if (self.World.LobbyInfo.GlobalSettings.AllowCheats && self.Owner.PlayerActor.Trait<DeveloperMode>().AllTech)
return Produceable.Select(a => a.Key);
return Produceable.Where(a => a.Value.Buildable).Select(a => a.Key);
@@ -185,7 +185,7 @@ namespace OpenRA.Mods.RA
if (unit == null || ! unit.Traits.Contains<BuildableInfo>())
return 0;
if (Game.LobbyInfo.GlobalSettings.AllowCheats && self.Owner.PlayerActor.Trait<DeveloperMode>().FastBuild) return 0;
if (self.World.LobbyInfo.GlobalSettings.AllowCheats && self.Owner.PlayerActor.Trait<DeveloperMode>().FastBuild) return 0;
var cost = unit.Traits.Contains<ValuedInfo>() ? unit.Traits.Get<ValuedInfo>().Cost : 0;
var time = cost
* Info.BuildSpeed