Make the default player color configurable in mod.yaml
This commit is contained in:
committed by
abcdefg30
parent
cadf4eb322
commit
5516e16fb8
20
OpenRA.Game/DefaultPlayer.cs
Normal file
20
OpenRA.Game/DefaultPlayer.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2020 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation, either version 3 of
|
||||||
|
* the License, or (at your option) any later version. For more
|
||||||
|
* information, see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using OpenRA.Primitives;
|
||||||
|
|
||||||
|
namespace OpenRA
|
||||||
|
{
|
||||||
|
public class DefaultPlayer : IGlobalModData
|
||||||
|
{
|
||||||
|
public readonly Color Color = Color.FromAhsl(0, 0, 238);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -30,7 +30,7 @@ namespace OpenRA
|
|||||||
public string Faction;
|
public string Faction;
|
||||||
|
|
||||||
public bool LockColor = false;
|
public bool LockColor = false;
|
||||||
public Color Color = Color.FromAhsl(0, 0, 238);
|
public Color Color = Game.ModData.Manifest.Get<DefaultPlayer>().Color;
|
||||||
|
|
||||||
public bool LockSpawn = false;
|
public bool LockSpawn = false;
|
||||||
public int Spawn = 0;
|
public int Spawn = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user