Expose WAngle to Lua API and deprecate old Facing.

This commit is contained in:
Paul Chote
2020-06-10 20:53:44 +01:00
committed by reaperrr
parent 0349435650
commit a98e460257
6 changed files with 121 additions and 12 deletions

View File

@@ -19,13 +19,18 @@ namespace OpenRA.Mods.Common.Scripting.Global
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; } }
void Deprecated()
{
Game.Debug("The Facing table is deprecated. Use Angle instead.");
}
public int North { get { Deprecated(); return 0; } }
public int NorthWest { get { Deprecated(); return 32; } }
public int West { get { Deprecated(); return 64; } }
public int SouthWest { get { Deprecated(); return 96; } }
public int South { get { Deprecated(); return 128; } }
public int SouthEast { get { Deprecated(); return 160; } }
public int East { get { Deprecated(); return 192; } }
public int NorthEast { get { Deprecated(); return 224; } }
}
}