move LobbyInfo onto OrderManager
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user