Merge pull request #11176 from pchote/lobby-trait-checkbox-prep
Query lobby checkbox state via their owning traits.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user