Merge pull request #11176 from pchote/lobby-trait-checkbox-prep

Query lobby checkbox state via their owning traits.
This commit is contained in:
reaperrr
2016-05-16 19:00:35 +02:00
18 changed files with 194 additions and 148 deletions

View File

@@ -24,5 +24,13 @@ namespace OpenRA.Mods.Common.Traits
public readonly bool AllyBuildRadiusLocked = false;
}
public class MapBuildRadius { }
public class MapBuildRadius : INotifyCreated
{
public bool AllyBuildRadiusEnabled { get; private set; }
void INotifyCreated.Created(Actor self)
{
AllyBuildRadiusEnabled = self.World.LobbyInfo.GlobalSettings.AllyBuildRadius;
}
}
}

View File

@@ -24,5 +24,13 @@ namespace OpenRA.Mods.Common.Traits
public readonly bool Locked = false;
}
public class MapCreeps { }
public class MapCreeps : INotifyCreated
{
public bool Enabled { get; private set; }
void INotifyCreated.Created(Actor self)
{
Enabled = self.World.LobbyInfo.GlobalSettings.Creeps;
}
}
}

View File

@@ -39,5 +39,13 @@ namespace OpenRA.Mods.Common.Traits
public readonly bool DifficultyLocked = false;
}
public class MapOptions { }
public class MapOptions : INotifyCreated
{
public bool ShortGame { get; private set; }
void INotifyCreated.Created(Actor self)
{
ShortGame = self.World.LobbyInfo.GlobalSettings.ShortGame;
}
}
}