Add default facings to lua
This commit is contained in:
@@ -177,6 +177,7 @@
|
|||||||
<Compile Include="Orders\UnitOrderTargeter.cs" />
|
<Compile Include="Orders\UnitOrderTargeter.cs" />
|
||||||
<Compile Include="Pathfinder\CellInfo.cs" />
|
<Compile Include="Pathfinder\CellInfo.cs" />
|
||||||
<Compile Include="PlayerExtensions.cs" />
|
<Compile Include="PlayerExtensions.cs" />
|
||||||
|
<Compile Include="Scripting\Global\FacingGlobal.cs" />
|
||||||
<Compile Include="Scripting\Global\HSLColorGlobal.cs" />
|
<Compile Include="Scripting\Global\HSLColorGlobal.cs" />
|
||||||
<Compile Include="Scripting\Global\UserInterfaceGlobal.cs" />
|
<Compile Include="Scripting\Global\UserInterfaceGlobal.cs" />
|
||||||
<Compile Include="ServerTraits\ColorValidator.cs" />
|
<Compile Include="ServerTraits\ColorValidator.cs" />
|
||||||
|
|||||||
30
OpenRA.Mods.Common/Scripting/Global/FacingGlobal.cs
Normal file
30
OpenRA.Mods.Common/Scripting/Global/FacingGlobal.cs
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2015 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. For more information,
|
||||||
|
* see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using OpenRA.Scripting;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.Common.Scripting.Global
|
||||||
|
{
|
||||||
|
[ScriptGlobal("Facing")]
|
||||||
|
public class FacingGlobal : ScriptGlobal
|
||||||
|
{
|
||||||
|
public FacingGlobal(ScriptContext context)
|
||||||
|
: base(context) { }
|
||||||
|
|
||||||
|
public int North { get { return 0; } }
|
||||||
|
public int NorthWest { get { return 32; } }
|
||||||
|
public int West { get { return 64; } }
|
||||||
|
public int SouthWest { get { return 96; } }
|
||||||
|
public int South { get { return 128; } }
|
||||||
|
public int SouthEast { get { return 160; } }
|
||||||
|
public int East { get { return 192; } }
|
||||||
|
public int NorthEast { get { return 224; } }
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user