Make the default player color configurable in mod.yaml

This commit is contained in:
Matthias Mailänder
2020-04-07 14:39:05 +02:00
committed by abcdefg30
parent cadf4eb322
commit 5516e16fb8
2 changed files with 21 additions and 1 deletions

View 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);
}
}

View File

@@ -30,7 +30,7 @@ namespace OpenRA
public string Faction;
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 int Spawn = 0;