public override LuaTable GetLuaTable(Mission mission) { var map = new Dictionary <object, object> { { "units", LuaTable.CreateArray(Units) }, { "players", LuaTable.CreateArray(Players.Select(p => mission.Players.IndexOf(p))) }, }; return(new LuaTable(map)); }
public override LuaTable GetLuaTable(Mission mission) { var missionAlliances = mission.Alliances.Distinct().ToList(); var map = new Dictionary <object, object> { { "alliances", LuaTable.CreateArray(Alliances.Select(a => missionAlliances.IndexOf(a))) }, { "groups", LuaTable.CreateSet(groups) }, }; return(new LuaTable(map)); }
public override LuaTable GetLuaTable(Mission mission) { var map = new Dictionary <object, object> { { "orders", LuaTable.CreateArray(orders.Select(o => o.GetLuaMap(mission)).ToArray()) }, { "groups", LuaTable.CreateSet(groups) }, { "queue", queue } }; return(new LuaTable(map)); }
public override LuaTable GetLuaTable(Mission mission) { var map = new Dictionary <object, object> { { "units", LuaTable.CreateArray(units.Select(u => u.GetLuaMap(mission)).ToArray()) }, { "useOrbitalDrop", useOrbitalDrop }, { "ceg", ceg }, }; return(new LuaTable(map)); }
public override LuaTable GetLuaTable(Mission mission) { var map = new Dictionary <object, object> { { "buildOrders", LuaTable.CreateArray(buildOrders) }, { "builtUnitsGroups", LuaTable.CreateSet(builtUnitsGroups) }, { "factoryGroups", LuaTable.CreateSet(factoryGroups) }, { "repeatOrders", repeat }, }; return(new LuaTable(map)); }
public override LuaTable GetLuaTable(Mission mission) { var map = new Dictionary <object, object> { { "areas", LuaTable.CreateArray(areas.Select(a => a.GetLuaMap(mission))) }, { "groups", LuaTable.CreateSet(groups) }, { "players", LuaTable.CreateArray(players.Select(p => mission.Players.IndexOf(p))) }, { "number", number } }; return(new LuaTable(map)); }
public override LuaTable GetLuaTable(Mission mission) { foreach (var trigger in Triggers.ToArray()) { if (!mission.Triggers.Contains(trigger)) { Triggers.Remove(trigger); } } var triggerArray = triggers.Select(t => mission.Triggers.IndexOf((Trigger)t) + 1).Cast <object>().ToArray(); var map = new Dictionary <object, object> { { "triggers", LuaTable.CreateArray(triggerArray) }, }; return(new LuaTable(map)); }