diff --git a/AUTHORS b/AUTHORS index f99bd317ac..a54e89c1cc 100644 --- a/AUTHORS +++ b/AUTHORS @@ -111,13 +111,6 @@ the Apache 2.0 license. Using GeoLite2 data created by MaxMind and distributed under the CC BY-SA 3.0 license. -Using KopiLua created by Mark Feldman and -maintained by Vinicius Jarina and distributed -under the MIT license. - -Using NLua created by Vinicius Jarina and -distributed under the MIT license. - Using SharpFont created by Robert Rouhani and distributed under the MIT license. @@ -127,6 +120,9 @@ MIT license. Using SDL2# created by Ethan Lee and released under the zlib license. +Using Eluant created by Chris Howie and released +under the MIT license. + Using FuzzyLogicLibrary (fuzzynet) by Dmitry Kaluzhny and released under the GNU GPL terms. diff --git a/Makefile b/Makefile index d407aa0682..a1dcf74860 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ INSTALL_PROGRAM = $(INSTALL) -m755 INSTALL_DATA = $(INSTALL) -m644 # program targets -CORE = rsdl2 rnull game utility irc ralint +CORE = rsdl2 rnull game utility ralint TOOLS = editor tsbuild crashdialog VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`) @@ -86,14 +86,6 @@ game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico PROGRAMS += game game: $(game_TARGET) -irc_SRCS := $(shell find OpenRA.Irc/ -iname '*.cs') -irc_TARGET = OpenRA.Irc.dll -irc_KIND = library -irc_DEPS = $(game_TARGET) -irc_LIBS = $(COMMON_LIBS) $(irc_DEPS) -PROGRAMS += irc -irc: $(irc_TARGET) - # Renderer dlls rsdl2_SRCS := $(shell find OpenRA.Renderer.Sdl2/ -iname '*.cs') rsdl2_TARGET = OpenRA.Renderer.Sdl2.dll @@ -120,16 +112,15 @@ mod_common: $(mod_common_TARGET) ##### Official Mods ##### -STD_MOD_LIBS = $(game_TARGET) thirdparty/KopiLua.dll thirdparty/NLua.dll +STD_MOD_LIBS = $(game_TARGET) STD_MOD_DEPS = $(STD_MOD_LIBS) $(ralint_TARGET) - # Red Alert mod_ra_SRCS := $(shell find OpenRA.Mods.RA/ -iname '*.cs') mod_ra_TARGET = mods/ra/OpenRA.Mods.RA.dll mod_ra_KIND = library -mod_ra_DEPS = $(STD_MOD_DEPS) $(mod_common_TARGET) $(irc_TARGET) -mod_ra_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET) $(irc_TARGET) +mod_ra_DEPS = $(STD_MOD_DEPS) $(mod_common_TARGET) +mod_ra_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET) PROGRAMS += mod_ra mod_ra: $(mod_ra_TARGET) @@ -333,7 +324,6 @@ install-core: default @$(CP_R) glsl "$(DATA_INSTALL_DIR)" @$(CP_R) lua "$(DATA_INSTALL_DIR)" - @$(CP) *.ttf "$(DATA_INSTALL_DIR)" @$(CP) SDL2-CS* "$(DATA_INSTALL_DIR)" @$(CP) Eluant* "$(DATA_INSTALL_DIR)" @$(INSTALL_PROGRAM) ICSharpCode.SharpZipLib.dll "$(DATA_INSTALL_DIR)" @@ -341,8 +331,6 @@ install-core: default @$(INSTALL_PROGRAM) SharpFont.dll "$(DATA_INSTALL_DIR)" @$(CP) SharpFont.dll.config "$(DATA_INSTALL_DIR)" @$(INSTALL_PROGRAM) Mono.Nat.dll "$(DATA_INSTALL_DIR)" - @$(INSTALL_PROGRAM) KopiLua.dll "$(DATA_INSTALL_DIR)" - @$(INSTALL_PROGRAM) NLua.dll "$(DATA_INSTALL_DIR)" @$(INSTALL_PROGRAM) MaxMind.Db.dll "$(DATA_INSTALL_DIR)" @$(INSTALL_PROGRAM) MaxMind.GeoIP2.dll "$(DATA_INSTALL_DIR)" @$(INSTALL_PROGRAM) Newtonsoft.Json.dll "$(DATA_INSTALL_DIR)" diff --git a/OpenRA.Game/Settings.cs b/OpenRA.Game/Settings.cs index 781bffcad7..a8430f3da5 100644 --- a/OpenRA.Game/Settings.cs +++ b/OpenRA.Game/Settings.cs @@ -214,22 +214,6 @@ namespace OpenRA } } - public class IrcSettings - { - public string Hostname = "irc.openra.net"; - public int Port = 6667; - public string Nickname = null; - public string Username = "openra"; - public string Realname = null; - public string DefaultNickname = "Newbie"; - public string Channel = "global"; - public string TimestampFormat = "HH:mm:ss"; - public int ReconnectDelay = 10000; - public int ConnectionTimeout = 300000; - public bool Debug = false; - public bool ConnectAutomatically = false; - } - public class Settings { string settingsFile; @@ -241,7 +225,6 @@ namespace OpenRA public ServerSettings Server = new ServerSettings(); public DebugSettings Debug = new DebugSettings(); public KeySettings Keys = new KeySettings(); - public IrcSettings Irc = new IrcSettings(); public Dictionary Sections; @@ -257,7 +240,6 @@ namespace OpenRA { "Server", Server }, { "Debug", Debug }, { "Keys", Keys }, - { "Irc", Irc } }; // Override fieldloader to ignore invalid entries diff --git a/OpenRA.Irc/Channel.cs b/OpenRA.Irc/Channel.cs deleted file mode 100644 index 72df1f7fa4..0000000000 --- a/OpenRA.Irc/Channel.cs +++ /dev/null @@ -1,27 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 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 System; -using OpenRA.Primitives; - -namespace OpenRA.Irc -{ - public class Channel - { - public readonly string Name; - public readonly ObservableSortedDictionary Users = new ObservableSortedDictionary(StringComparer.OrdinalIgnoreCase); - public Topic Topic = new Topic(); - - public Channel(string name) - { - Name = name; - } - } -} diff --git a/OpenRA.Irc/IrcClient.cs b/OpenRA.Irc/IrcClient.cs deleted file mode 100644 index 03befd5dd1..0000000000 --- a/OpenRA.Irc/IrcClient.cs +++ /dev/null @@ -1,400 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 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 System; -using System.IO; -using System.Net.Sockets; -using System.Threading; -using OpenRA.Primitives; - -namespace OpenRA.Irc -{ - public sealed class IrcClient : IDisposable - { - public static readonly IrcClient Instance = new IrcClient(); - - public static string MainChannel { get { return '#' + Game.Settings.Irc.Channel; } } - - public static void AddHistory(string line) - { - Instance.History.Add("{0} {1}".F(DateTime.Now.ToString(Game.Settings.Irc.TimestampFormat), line)); - } - - public static void AddMessage(string nickname, string message) - { - AddHistory("{0}: {1}".F(nickname, message)); - } - - public static void AddNotice(string nickname, string message) - { - AddHistory("-{0}- {1}".F(nickname, message)); - } - - public static void AddSelfNotice(string nickname, string message) - { - AddHistory("-> -{0}- {1}".F(nickname, message)); - } - - public static void AddAction(string nickname, string message) - { - AddHistory("* {0} {1}".F(nickname, message)); - } - - static void InstanceInitialize() - { - var s = Game.Settings.Irc; - - Instance.OnPublicMessage += l => - { - var action = IrcUtils.FromAction(l.Message); - if (action != null) - AddAction(l.Prefix.Nickname, action); - else - AddMessage(l.Prefix.Nickname, l.Message); - }; - Instance.OnPrivateMessage += l => - { - var ctcp = IrcUtils.FromCtcp(l.Message); - if (ctcp == null) - return; - - var split = ctcp.Split(new[] { ' ' }, 2); - var command = split[0]; - if (command.EqualsIC("VERSION")) - { - var mod = Game.modData.Manifest.Mod; - Instance.CtcpRespond(l.Prefix.Nickname, command, "{0}: {1}".F(mod.Title, mod.Version)); - } - }; - Instance.OnPrivateNotice += l => - { - if (l.Target == "*") // Drop pre-register notices - return; - AddNotice(l.Prefix.Nickname, l.Message); - }; - Instance.OnRegister += l => - { - Instance.Join(MainChannel); - Game.Settings.Irc.Nickname = Instance.LocalUser.Nickname; - Game.Settings.Save(); - }; - Instance.OnConnecting += () => AddHistory("Connecting"); - Instance.OnConnect += () => AddHistory("Connected"); - Instance.OnPart += l => AddHistory("{0} left{1}".F(l.Prefix.Nickname, l.Message != null ? ": " + l.Message : "")); - Instance.OnJoin += l => AddHistory("{0} joined".F(l.Prefix.Nickname)); - Instance.OnQuit += l => AddHistory("{0} quit{1}".F(l.Prefix.Nickname, l.Message != null ? ": " + l.Message : "")); - Instance.OnKick += l => AddHistory("{0} kicked {1}{2}".F(l.Prefix.Nickname, l.KickeeNickname, l.Message != null ? ": " + l.Message : "")); - Instance.OnNicknameSet += l => - { - AddHistory("{0} set their nickname to {1}".F(l.Prefix.Nickname, l.NewNickname)); - if (l.NewNickname == Instance.LocalUser.Nickname) - { - Instance.Nickname = l.NewNickname; - Game.Settings.Irc.Nickname = l.NewNickname; - Game.Settings.Save(); - } - }; - Instance.OnTopicSet += l => AddHistory("{0} set the topic to {1}".F(l.Prefix.Nickname, l.Message)); - Instance.OnNumeric += l => - { - if (l.Numeric == NumericCommand.RPL_TOPIC) - { - var topic = Instance.GetChannel(MainChannel).Topic; - AddHistory("Topic is {0}".F(topic.Message)); - } - else if (l.Numeric == NumericCommand.RPL_TOPICWHOTIME) - { - var topic = Instance.GetChannel(MainChannel).Topic; - AddHistory("Topic set by {0} at {1}".F(topic.Author.Nickname, topic.Time.ToLocalTime())); - } - else if (l.Numeric == NumericCommand.RPL_NOTOPIC) - AddHistory("No topic is set"); - else if (l.Numeric == NumericCommand.ERR_NICKNAMEINUSE) - AddHistory("Nickname {0} is already in use".F(l.AltTarget)); - else if (l.Numeric == NumericCommand.ERR_ERRONEUSNICKNAME) - AddHistory("Nickname {0} is erroneus".F(l.AltTarget)); - }; - Instance.OnDisconnect += () => - { - if (Instance.ConnectionFailure != null) - { - AddHistory("Disconnected: {0}".F(Instance.ConnectionFailure.Message)); - if (s.ReconnectDelay >= 0) - { - AddHistory("Reconnecting in {0} seconds".F(s.ReconnectDelay / 1000)); - Instance.ConnectionState = IrcConnectionState.Reconnecting; - Game.RunAfterDelay(s.ReconnectDelay, () => - { - if (Instance.IsReconnecting) - Instance.Connect(Instance.Hostname, Instance.Port, Instance.ConnectionTimeout, Instance.Nickname, Instance.Username, Instance.Realname); - }); - } - } - else - AddHistory("Disconnected"); - }; - Instance.OnLineRead += l => - { - if (s.Debug) - AddHistory(l.RawString); - }; - Game.OnQuit += Instance.Disconnect; - } - - static IrcClient() - { - Log.AddChannel("irc", "irc.log"); - InstanceInitialize(); - } - - public readonly ObservableCollection History = new ObservableCollection(); - - IrcConnection connection; - Thread thread; - public IrcConnectionState ConnectionState { get; private set; } - public IrcClientUser LocalUser { get; private set; } - public Exception ConnectionFailure { get; private set; } - - public string Hostname { get; private set; } - public int Port { get; private set; } - public int ConnectionTimeout { get; private set; } - public string Nickname { get; private set; } - public string Username { get; private set; } - public string Realname { get; private set; } - - public bool IsConnected - { - get { return ConnectionState == IrcConnectionState.Connected; } - } - - public bool IsReconnecting - { - get { return ConnectionState == IrcConnectionState.Reconnecting; } - } - - public IrcClient() - { - ConnectionState = IrcConnectionState.Disconnected; - } - - public void Connect(string hostname, int port, int connectionTimeout, string nickname, string username, string realname) - { - ConnectionFailure = null; - if (IsConnected) - Disconnect(); - - Hostname = hostname; - Port = port; - ConnectionTimeout = connectionTimeout; - Nickname = nickname; - Username = username; - Realname = realname; - - thread = new Thread(() => - { - try - { - ConnectionState = IrcConnectionState.Connecting; - LocalUser = new IrcClientUser(this); - connection = new IrcConnection(); - OnConnecting(); - connection.Connect(hostname, port, connectionTimeout); - ConnectionState = IrcConnectionState.Connected; - OnConnect(); - SetNickname(nickname); - SetUser(username, realname); - ProcessLines(); - } - catch (Exception e) - { - Log.Write("irc", e.ToString()); - if (e is SocketException || e is IOException) - ConnectionFailure = e; - } - finally - { - Disconnect(); - } - }) { IsBackground = true }; - thread.Start(); - } - - public void WriteLine(string format, params object[] args) - { - try - { - connection.WriteLine(format, args); - } - catch (Exception e) - { - Log.Write("irc", e.ToString()); - if (e is SocketException || e is IOException) - ConnectionFailure = e; - Disconnect(); - } - } - - public void Disconnect() - { - if (!IsConnected || IsReconnecting) - { - ConnectionState = IrcConnectionState.Disconnected; - return; - } - - ConnectionState = IrcConnectionState.Disconnecting; - OnDisconnecting(); - if (connection != null) - connection.Close(); - ConnectionState = IrcConnectionState.Disconnected; - OnDisconnect(); - LocalUser = null; - connection = null; - } - - public void Dispose() - { - Disconnect(); - } - - void ProcessLines() - { - string line; - while (IsConnected && (line = connection.ReadLine()) != null) - ProcessLine(line); - } - - void ProcessLine(string line) - { - if (string.IsNullOrEmpty(line)) - return; - - var l = new Line(this, line); - OnLineRead(l); - - int numeric; - if (Exts.TryParseIntegerInvariant(l.Command, out numeric)) - { - var nl = new NumericLine(l, numeric); - LocalUser.OnNumeric(nl); - OnNumeric(nl); - switch (nl.Numeric) - { - case NumericCommand.RPL_WELCOME: - OnRegister(nl); - break; - case NumericCommand.RPL_ENDOFNAMES: - OnSync(nl); - break; - } - } - else - { - switch (l.Command) - { - case "PING": - Pong(l.Message); - OnPing(l); - break; - case "PRIVMSG": - if (IrcUtils.IsChannel(l.Target)) - OnPublicMessage(l); - else - OnPrivateMessage(l); - break; - case "NOTICE": - if (IrcUtils.IsChannel(l.Target)) - OnPublicNotice(l); - else - OnPrivateNotice(l); - break; - case "JOIN": - var jl = new JoinLine(l); - LocalUser.OnJoin(jl); - OnJoin(jl); - break; - case "PART": - LocalUser.OnPart(l); - OnPart(l); - break; - case "NICK": - var nsl = new NicknameSetLine(l); - LocalUser.OnNicknameSet(nsl); - OnNicknameSet(nsl); - break; - case "QUIT": - OnQuit(l); - LocalUser.OnQuit(l); - break; - case "KICK": - var kl = new KickLine(l); - LocalUser.OnKick(kl); - OnKick(kl); - break; - case "TOPIC": - LocalUser.OnTopicSet(l); - OnTopicSet(l); - break; - } - } - } - - public event Action OnRegister = l => { }; - public event Action OnSync = l => { }; - public event Action OnLineRead = _ => { }; - public event Action OnConnect = () => { }; - public event Action OnConnecting = () => { }; - public event Action OnDisconnect = () => { }; - public event Action OnDisconnecting = () => { }; - public event Action OnPublicMessage = _ => { }; - public event Action OnPublicNotice = _ => { }; - public event Action OnPrivateMessage = _ => { }; - public event Action OnPrivateNotice = _ => { }; - public event Action OnJoin = _ => { }; - public event Action OnPart = _ => { }; - public event Action OnNicknameSet = _ => { }; - public event Action OnQuit = _ => { }; - public event Action OnPing = _ => { }; - public event Action OnNumeric = _ => { }; - public event Action OnKick = _ => { }; - public event Action OnTopicSet = _ => { }; - - public void SetNickname(string nickname) { WriteLine("NICK {0}", nickname); } - public void SetUser(string username, string realname) { WriteLine("USER {0} 0 * :{1}", username, realname); } - public void Join(string channel) { WriteLine("JOIN {0}", channel); } - public void Part(string channel) { WriteLine("PART {0}", channel); } - public void Message(string target, string message) { WriteLine("PRIVMSG {0} :{1}", target, message); } - public void Notice(string target, string message) { WriteLine("NOTICE {0} :{1}", target, message); } - public void Pong(string reply) { WriteLine("PONG :{0}", reply); } - public void CtcpRequest(string target, string command, string request) { Message(target, IrcUtils.ToCtcp("{0} {1}".F(command, request))); } - public void CtcpRespond(string target, string command, string response) { Notice(target, IrcUtils.ToCtcp("{0} {1}".F(command, response))); } - public void Act(string target, string message) { Message(target, IrcUtils.ToAction(message)); } - public void GetTopic(string channel) { WriteLine("TOPIC {0}", channel); } - public void Quit(string message) { WriteLine("QUIT :{0}", message); } - - public Channel GetChannel(string channel) - { - if (!IsConnected) - return null; - Channel c; - LocalUser.Channels.TryGetValue(channel, out c); - return c; - } - } - - public enum IrcConnectionState - { - Disconnected, - Connected, - Disconnecting, - Connecting, - Reconnecting - } -} diff --git a/OpenRA.Irc/IrcClientUser.cs b/OpenRA.Irc/IrcClientUser.cs deleted file mode 100644 index 33be998592..0000000000 --- a/OpenRA.Irc/IrcClientUser.cs +++ /dev/null @@ -1,112 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 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 System; -using System.Linq; -using OpenRA.Primitives; - -namespace OpenRA.Irc -{ - public class IrcClientUser : User - { - public readonly ObservableDictionary Channels = new ObservableDictionary(StringComparer.OrdinalIgnoreCase); - public readonly IrcClient Client; - - public IrcClientUser(IrcClient client) - { - Client = client; - } - - public void OnNumeric(NumericLine line) - { - switch (line.Numeric) - { - case NumericCommand.RPL_WELCOME: - new User(line.Message.Substring(line.Message.LastIndexOf(' ') + 1)).CopyTo(this); - break; - case NumericCommand.RPL_NAMREPLY: - { - var channel = line.GetChannel(); - var nicknames = line.Message.Replace("~", "").Replace("&", "").Replace("@", "").Replace("%", "").Replace("+", "").Split(' '); - - foreach (var nickname in nicknames.Where(n => !channel.Users.ContainsKey(n))) - channel.Users.Add(nickname, new User { Nickname = nickname }); - } - break; - case NumericCommand.RPL_TOPIC: - line.GetChannel().Topic.Message = line.Message; - break; - case NumericCommand.RPL_TOPICWHOTIME: - { - var topic = line.GetChannel().Topic; - topic.Author = new User(line[4]); - topic.Time = IrcUtils.DateTimeFromUnixTime(Exts.ParseIntegerInvariant(line[5])); - } - break; - case NumericCommand.ERR_NICKNAMEINUSE: - if (line.Target == "*") // no nickname set yet - Client.SetNickname(Client.Nickname + new Random().Next(10000, 99999)); - break; - } - } - - public void OnJoin(Line line) - { - if (line.PrefixIsSelf()) - Channels.Add(line.Target, new Channel(line.Target)); - - line.GetChannel().Users.Add(line.Prefix.Nickname, new User(line.Prefix)); - } - - public void OnPart(Line line) - { - line.GetChannel().Users.Remove(line.Prefix.Nickname); - - if (line.PrefixIsSelf()) - Channels.Remove(line.Target); - } - - public void OnNicknameSet(NicknameSetLine line) - { - if (line.PrefixIsSelf()) - Nickname = line.NewNickname; - - foreach (var channel in Channels.Values.Where(c => c.Users.ContainsKey(line.Prefix.Nickname))) - { - var user = channel.Users[line.Prefix.Nickname]; - channel.Users.Remove(line.Prefix.Nickname); - user.Nickname = line.NewNickname; - channel.Users.Add(line.NewNickname, user); - } - } - - public void OnQuit(Line line) - { - foreach (var channel in Channels) - channel.Value.Users.Remove(line.Prefix.Nickname); - } - - public void OnKick(KickLine line) - { - line.GetChannel().Users.Remove(line.KickeeNickname); - - if (line.KickeeNickname.EqualsIC(Nickname)) - Channels.Remove(line.Target); - } - - public void OnTopicSet(Line line) - { - var topic = line.GetChannel().Topic; - topic.Message = line.Message; - topic.Author = line.Prefix; - topic.Time = DateTime.UtcNow; - } - } -} diff --git a/OpenRA.Irc/IrcConnection.cs b/OpenRA.Irc/IrcConnection.cs deleted file mode 100644 index 7359b90723..0000000000 --- a/OpenRA.Irc/IrcConnection.cs +++ /dev/null @@ -1,72 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 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 System; -using System.IO; -using System.Net.Sockets; - -namespace OpenRA.Irc -{ - public sealed class IrcConnection : IDisposable - { - TcpClient socket; - Stream stream; - StreamWriter writer; - StreamReader reader; - bool disposed; - - public void Connect(string hostname, int port, int connectionTimeout) - { - CheckDisposed(); - if (socket != null && socket.Connected) - throw new InvalidOperationException("Socket already connected"); - - socket = new TcpClient(hostname, port); - socket.ReceiveTimeout = socket.SendTimeout = connectionTimeout; - stream = socket.GetStream(); - writer = new StreamWriter(stream) { AutoFlush = true }; - reader = new StreamReader(stream); - } - - public void WriteLine(string format, params object[] args) - { - CheckDisposed(); - writer.WriteLine(format, args); - } - - public string ReadLine() - { - CheckDisposed(); - return reader.ReadLine(); - } - - public void Close() - { - if (disposed) - return; - disposed = true; - if (socket != null) socket.Close(); - if (stream != null) stream.Close(); - if (writer != null) writer.Close(); - if (reader != null) reader.Close(); - } - - public void Dispose() - { - Close(); - } - - void CheckDisposed() - { - if (disposed) - throw new ObjectDisposedException(GetType().FullName); - } - } -} diff --git a/OpenRA.Irc/IrcUtils.cs b/OpenRA.Irc/IrcUtils.cs deleted file mode 100644 index 5fdb50d129..0000000000 --- a/OpenRA.Irc/IrcUtils.cs +++ /dev/null @@ -1,67 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 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 System; -using System.Linq; - -namespace OpenRA.Irc -{ - public static class IrcUtils - { - public static bool IsChannel(string s) - { - return !string.IsNullOrEmpty(s) && s[0] == '#'; - } - - public static bool IsNickname(string s) - { - return !string.IsNullOrEmpty(s) && (char.IsLetter(s[0]) || NicknameSpecialChars.Contains(s[0])) - && s.Substring(1).All(c => char.IsLetterOrDigit(c) || NicknameSpecialChars.Contains(c) || c == '-'); - } - - const string NicknameSpecialChars = @"[]\`_^{|}"; - - public static DateTime DateTimeFromUnixTime(int seconds) - { - return new DateTime(1970, 1, 1).AddSeconds(seconds); - } - - public static bool EqualsIC(this string a, string b) - { - return a.Equals(b, StringComparison.OrdinalIgnoreCase); - } - - public static string FromCtcp(string message) - { - if (message.Length < 2 || !message.StartsWith("\x0001") || !message.EndsWith("\x0001")) - return null; - - return message.Substring(1, message.Length - 2); - } - - public static string ToCtcp(string message) - { - return "\x0001{0}\x0001".F(message); - } - - public static string FromAction(string message) - { - if (!message.StartsWith("\x0001ACTION ") || !message.EndsWith("\x0001")) - return null; - - return message.Substring(8, message.Length - 8 - 1); - } - - public static string ToAction(string message) - { - return "\x0001ACTION {0}\x0001".F(message); - } - } -} diff --git a/OpenRA.Irc/Line.cs b/OpenRA.Irc/Line.cs deleted file mode 100644 index c476913de9..0000000000 --- a/OpenRA.Irc/Line.cs +++ /dev/null @@ -1,155 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 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 System.Linq; - -namespace OpenRA.Irc -{ - public class Line - { - public readonly IrcClient Client; - public readonly string RawString; - public readonly string[] RawStringParts; - public readonly User Prefix; - public readonly string Command; - public string Target { get; protected set; } - public string Message { get; protected set; } - - public Line(Line line) - { - Client = line.Client; - RawString = line.RawString; - RawStringParts = line.RawStringParts; - Prefix = line.Prefix; - Command = line.Command; - Target = line.Target; - Message = line.Message; - } - - public Line(IrcClient client, string line) - { - RawString = line; - RawStringParts = line.Split(' '); - Client = client; - - if (line[0] == ':') - { - line = line.Substring(1); - var prefixDelim = line.Split(new[] { ' ' }, 2); - Prefix = new User(prefixDelim[0]); - - if (prefixDelim.Length > 1) - { - var messageDelim = prefixDelim[1].Split(new[] { ':' }, 2); - - var args = messageDelim[0].Trim().Split(' '); - - Command = args[0]; - if (args.Length > 1) - Target = args[1]; - - if (messageDelim.Length > 1) - Message = messageDelim[1]; - } - } - else - { - var messageDelim = line.Split(new[] { ':' }, 2); - - var args = messageDelim[0].Trim().Split(' '); - - Command = args[0]; - if (args.Length > 1) - Target = args[1]; - - if (messageDelim.Length > 1) - Message = messageDelim[1]; - } - } - - public virtual Channel GetChannel() - { - return Client.GetChannel(Target); - } - - public string this[int index] - { - get { return RawStringParts[index]; } - } - - public bool PrefixIsSelf() - { - return Client.LocalUser != null && Prefix.Nickname.EqualsIC(Client.LocalUser.Nickname); - } - - public bool TargetIsSelf() - { - return Target != null && Target.EqualsIC(Client.LocalUser.Nickname); - } - } - - public class NicknameSetLine : Line - { - public readonly string NewNickname; - - public NicknameSetLine(Line line) - : base(line) - { - NewNickname = Message; - } - } - - public class NumericLine : Line - { - public readonly NumericCommand Numeric; - public readonly string AltTarget; - - public override Channel GetChannel() - { - if (IrcUtils.IsChannel(AltTarget)) - return Client.GetChannel(AltTarget); - return Client.GetChannel(Target); - } - - public NumericLine(Line line, int numeric) - : base(line) - { - if (!IrcUtils.IsChannel(Target)) - { - var numericParts = line.RawStringParts.Skip(1).TakeWhile(p => !p.StartsWith(":")); - AltTarget = numericParts.LastOrDefault(IrcUtils.IsChannel); - if (AltTarget == null) - AltTarget = numericParts.LastOrDefault(); - } - Numeric = (NumericCommand)numeric; - } - } - - public class JoinLine : Line // for compatibility with certain IRCds - { - public JoinLine(Line line) - : base(line) - { - if (Message != null) // don't overwrite the target if it was already set properly by the IRCd - Target = Message; - } - } - - public class KickLine : Line - { - public readonly string KickeeNickname; - - public KickLine(Line line) - : base(line) - { - KickeeNickname = this[3]; - } - } -} diff --git a/OpenRA.Irc/NumericCommand.cs b/OpenRA.Irc/NumericCommand.cs deleted file mode 100644 index b4e8e5b787..0000000000 --- a/OpenRA.Irc/NumericCommand.cs +++ /dev/null @@ -1,25 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 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 - -namespace OpenRA.Irc -{ - public enum NumericCommand - { - Undefined = 0, - RPL_WELCOME = 001, - RPL_NOTOPIC = 331, - RPL_TOPIC = 332, - RPL_TOPICWHOTIME = 333, - RPL_NAMREPLY = 353, - RPL_ENDOFNAMES = 366, - ERR_ERRONEUSNICKNAME = 432, - ERR_NICKNAMEINUSE = 433 - } -} diff --git a/OpenRA.Irc/OpenRA.Irc.csproj b/OpenRA.Irc/OpenRA.Irc.csproj deleted file mode 100644 index 16be64721c..0000000000 --- a/OpenRA.Irc/OpenRA.Irc.csproj +++ /dev/null @@ -1,59 +0,0 @@ - - - - - Debug - AnyCPU - {85B48234-8B31-4BE6-AF9C-665CC6866841} - Library - Properties - OpenRA.Irc - OpenRA.Irc - 512 - - - - - true - full - ..\ - DEBUG;TRACE - x86 - prompt - AllRules.ruleset - true - - - - - - - - - - - - - - - - - - {0DFB103F-2962-400F-8C6D-E2C28CCBA633} - OpenRA.Game - False - - - - - - - - - \ No newline at end of file diff --git a/OpenRA.Irc/Settings.StyleCop b/OpenRA.Irc/Settings.StyleCop deleted file mode 100644 index 1590d17baa..0000000000 --- a/OpenRA.Irc/Settings.StyleCop +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - - \ No newline at end of file diff --git a/OpenRA.Irc/Topic.cs b/OpenRA.Irc/Topic.cs deleted file mode 100644 index 36d5bdb387..0000000000 --- a/OpenRA.Irc/Topic.cs +++ /dev/null @@ -1,30 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 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 System; - -namespace OpenRA.Irc -{ - public class Topic - { - public string Message; - public User Author; - public DateTime Time; - - public Topic() { } - - public Topic(string message, User author, DateTime time) - { - Message = message; - Author = author; - Time = time; - } - } -} diff --git a/OpenRA.Irc/User.cs b/OpenRA.Irc/User.cs deleted file mode 100644 index f045c89d84..0000000000 --- a/OpenRA.Irc/User.cs +++ /dev/null @@ -1,73 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 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 System; - -namespace OpenRA.Irc -{ - public class User - { - public string Nickname; - public string Username; - public string Hostname; - - public User() { } - - public User(User user) - { - Nickname = user.Nickname; - Username = user.Username; - Hostname = user.Hostname; - } - - public void CopyTo(User user) - { - user.Nickname = Nickname; - user.Username = Username; - user.Hostname = Hostname; - } - - public User(string prefix) - { - if (string.IsNullOrEmpty(prefix)) - throw new ArgumentException("prefix"); - - var ex = prefix.IndexOf('!'); - var at = prefix.IndexOf('@'); - - if (ex >= 0 && at >= 0 && at < ex) - throw new ArgumentException("Bogus input string: @ before !"); - - if (ex >= 0) - { - Nickname = prefix.Substring(0, ex); - if (at >= 0) - { - Username = prefix.Substring(ex + 1, at - ex - 1); - Hostname = prefix.Substring(at + 1); - } - else - Username = prefix.Substring(ex + 1); - } - else - Nickname = prefix; - } - - public override string ToString() - { - var ret = "" + Nickname; - if (Username != null) - ret += "!" + Username; - if (Hostname != null) - ret += "@" + Hostname; - return ret; - } - } -} diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 84ed13657c..50c4933903 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -53,14 +53,6 @@ ..\thirdparty\FuzzyLogicLibrary.dll False - - ..\thirdparty\KopiLua.dll - False - - - ..\thirdparty\NLua.dll - False - @@ -324,10 +316,7 @@ - - - @@ -368,7 +357,6 @@ - @@ -542,11 +530,6 @@ OpenRA.Game False - - {85B48234-8B31-4BE6-AF9C-665CC6866841} - OpenRA.Irc - False - {fe6c8cc0-2f07-442a-b29f-17617b3b7fc6} OpenRA.Mods.Common diff --git a/OpenRA.Mods.RA/Scripting/LuaScriptContext.cs b/OpenRA.Mods.RA/Scripting/LuaScriptContext.cs deleted file mode 100644 index cf9af09840..0000000000 --- a/OpenRA.Mods.RA/Scripting/LuaScriptContext.cs +++ /dev/null @@ -1,142 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 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 System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using NLua; -using NLua.Event; -using OpenRA.Primitives; - -namespace OpenRA.Mods.RA.Scripting -{ - [Desc("Part of the legacy Lua API.")] - public sealed class LuaScriptContext : IDisposable - { - public Lua Lua { get; private set; } - readonly Cache functionCache; - - public LuaScriptContext() - { - Log.AddChannel("lua", "lua.log"); - Log.Write("lua", "Creating Lua script context"); - Lua = new Lua(); - Lua.HookException += OnLuaException; - functionCache = new Cache(Lua.GetFunction); - } - - public void RegisterObject(object target, string tableName, bool exposeAllMethods) - { - Log.Write("lua", "Registering object {0}", target); - - if (tableName != null && Lua.GetTable(tableName) == null) - Lua.NewTable(tableName); - - var type = target.GetType(); - - var methods = type.GetMethods(BindingFlags.Public | BindingFlags.Instance); - RegisterMethods(tableName, target, methods, exposeAllMethods); - } - - public void RegisterType(Type type, string tableName, bool exposeAllMethods) - { - Log.Write("lua", "Registering type {0}", type); - - if (tableName != null && Lua.GetTable(tableName) == null) - Lua.NewTable(tableName); - - var methods = type.GetMethods(BindingFlags.Public | BindingFlags.Static); - RegisterMethods(tableName, null, methods, exposeAllMethods); - } - - void RegisterMethods(string tableName, object target, IEnumerable methods, bool allMethods) - { - foreach (var method in methods) - { - string methodName; - - var attr = method.GetCustomAttributes(true).FirstOrDefault(); - if (attr == null) - { - if (allMethods) - methodName = method.Name; - else - continue; - } - else - methodName = attr.Name ?? method.Name; - - var methodTarget = method.IsStatic ? null : target; - - if (tableName != null) - Lua.RegisterFunction(tableName + "." + methodName, methodTarget, method); - else - Lua.RegisterFunction(methodName, methodTarget, method); - } - } - - void OnLuaException(object sender, HookExceptionEventArgs e) - { - ShowException(e.Exception); - } - - void ShowException(Exception e) - { - ShowErrorMessage(e.Message, e.ToString()); - } - - public void ShowErrorMessage(string shortMessage, string longMessage) - { - Game.Debug("{0}", shortMessage); - Game.Debug("See lua.log for details"); - Log.Write("lua", "{0}", longMessage ?? shortMessage); - } - - public void LoadLuaScripts(Func getFileContents, params string[] files) - { - foreach (var file in files) - { - try - { - Log.Write("lua", "Loading Lua script {0}", file); - var content = getFileContents(file); - Lua.DoString(content, file); - } - catch (Exception e) - { - ShowException(e); - } - } - } - - public object[] InvokeLuaFunction(string name, params object[] args) - { - try - { - var function = functionCache[name]; - if (function == null) - return null; - return function.Call(args); - } - catch (Exception e) - { - ShowException(e); - return null; - } - } - - public void Dispose() - { - if (Lua != null) - Lua.Dispose(); - } - } -} diff --git a/OpenRA.Mods.RA/Scripting/LuaScriptEvents.cs b/OpenRA.Mods.RA/Scripting/LuaScriptEvents.cs deleted file mode 100644 index 7dfdc049b6..0000000000 --- a/OpenRA.Mods.RA/Scripting/LuaScriptEvents.cs +++ /dev/null @@ -1,65 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 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 System; -using OpenRA.Traits; - -namespace OpenRA.Mods.RA.Scripting -{ - [Desc("Part of the legacy Lua API.")] - public class LuaScriptEventsInfo : TraitInfo { } - - public class LuaScriptEvents : INotifyKilled, INotifyAddedToWorld, INotifyRemovedFromWorld, - INotifyCapture, INotifyDamage, INotifyIdle, INotifyProduction - { - public event Action OnKilled = (self, e) => { }; - public event Action OnAddedToWorld = self => { }; - public event Action OnRemovedFromWorld = self => { }; - public event Action OnCaptured = (self, captor, oldOwner, newOwner) => { }; - public event Action OnDamaged = (self, e) => { }; - public event Action OnIdle = self => { }; - public event Action OnProduced = (self, other, exit) => { }; - - public void Killed(Actor self, AttackInfo e) - { - OnKilled(self, e); - } - - public void AddedToWorld(Actor self) - { - OnAddedToWorld(self); - } - - public void RemovedFromWorld(Actor self) - { - OnRemovedFromWorld(self); - } - - public void OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner) - { - OnCaptured(self, captor, oldOwner, newOwner); - } - - public void Damaged(Actor self, AttackInfo e) - { - OnDamaged(self, e); - } - - public void TickIdle(Actor self) - { - OnIdle(self); - } - - public void UnitProduced(Actor self, Actor other, CPos exit) - { - OnProduced(self, other, exit); - } - } -} diff --git a/OpenRA.Mods.RA/Scripting/LuaScriptInterface.cs b/OpenRA.Mods.RA/Scripting/LuaScriptInterface.cs deleted file mode 100644 index fe8e22b888..0000000000 --- a/OpenRA.Mods.RA/Scripting/LuaScriptInterface.cs +++ /dev/null @@ -1,470 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 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 System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using NLua; -using OpenRA.Effects; -using OpenRA.FileSystem; -using OpenRA.Mods.RA.Activities; -using OpenRA.Mods.RA.Air; -using OpenRA.Network; -using OpenRA.Scripting; -using OpenRA.Support; -using OpenRA.Traits; -using WorldRenderer = OpenRA.Graphics.WorldRenderer; - -namespace OpenRA.Mods.RA.Scripting -{ - [Desc("Part of the legacy Lua API.")] - public class LuaScriptInterfaceInfo : ITraitInfo, Requires - { - public readonly string[] LuaScripts = { }; - - public object Create(ActorInitializer init) { return new LuaScriptInterface(this); } - } - - public sealed class LuaScriptInterface : IWorldLoaded, ITick, IDisposable - { - World world; - SpawnMapActors sma; - readonly LuaScriptContext context = new LuaScriptContext(); - readonly LuaScriptInterfaceInfo info; - - public LuaScriptInterface(LuaScriptInterfaceInfo info) - { - this.info = info; - } - - public void WorldLoaded(World w, WorldRenderer wr) - { - world = w; - sma = world.WorldActor.Trait(); - - context.Lua["World"] = w; - context.Lua["WorldRenderer"] = wr; - context.RegisterObject(this, "Internal", false); - context.RegisterType(typeof(WVec), "WVec", true); - context.RegisterType(typeof(CVec), "CVec", true); - context.RegisterType(typeof(WPos), "WPos", true); - context.RegisterType(typeof(CPos), "CPos", true); - context.RegisterType(typeof(WRot), "WRot", true); - context.RegisterType(typeof(WAngle), "WAngle", true); - context.RegisterType(typeof(WRange), "WRange", true); - context.RegisterType(typeof(int2), "int2", true); - context.RegisterType(typeof(float2), "float2", true); - - context.LoadLuaScripts(f => GlobalFileSystem.Open(f).ReadAllText(), Game.modData.Manifest.LuaScripts); - - AddMapActorGlobals(); - - context.LoadLuaScripts(f => w.Map.Container.GetContent(f).ReadAllText(), info.LuaScripts); - - context.InvokeLuaFunction("WorldLoaded"); - } - - void AddMapActorGlobals() - { - foreach (var kv in sma.Actors) - { - if (context.Lua[kv.Key] != null) - context.ShowErrorMessage("{0}: The global name '{1}' is reserved and may not be used by map actor {2}".F(GetType().Name, kv.Key, kv.Value), null); - else - context.Lua[kv.Key] = kv.Value; - } - } - - public void Tick(Actor self) - { - using (new PerfSample("tick_lua")) - context.InvokeLuaFunction("Tick"); - } - - public void Dispose() - { - context.Dispose(); - } - - [LuaGlobal] - public object New(string typeName, LuaTable args) - { - var type = Game.modData.ObjectCreator.FindType(typeName); - if (type == null) - throw new InvalidOperationException("Cannot locate type: {0}".F(typeName)); - if (args == null) - return Activator.CreateInstance(type); - var argsArray = ConvertArgs(args); - return Activator.CreateInstance(type, argsArray); - } - - static object[] ConvertArgs(LuaTable args) - { - var argsArray = new object[args.Keys.Count]; - for (var i = 1; i <= args.Keys.Count; i++) - { - var arg = args[i] as LuaTable; - if (arg != null && arg[1] != null && arg[2] != null) - argsArray[i - 1] = Convert.ChangeType(arg[1], Enum.Parse(arg[2].ToString())); - else - argsArray[i - 1] = args[i]; - } - return argsArray; - } - - [LuaGlobal] - public void Debug(object obj) - { - if (obj != null) - Game.Debug(obj.ToString()); - } - - [LuaGlobal] - public object TraitOrDefault(Actor actor, string className) - { - var type = Game.modData.ObjectCreator.FindType(className); - if (type == null) - return null; - - var method = typeof(Actor).GetMethod("TraitOrDefault"); - var genericMethod = method.MakeGenericMethod(type); - return genericMethod.Invoke(actor, null); - } - - [LuaGlobal] - public object Trait(Actor actor, string className) - { - var ret = TraitOrDefault(actor, className); - if (ret == null) - throw new InvalidOperationException("Actor {0} does not have trait of type {1}".F(actor, className)); - return ret; - } - - [LuaGlobal] - public bool HasTrait(Actor actor, string className) - { - var ret = TraitOrDefault(actor, className); - return ret != null; - } - - [LuaGlobal] - public object[] ActorsWithTrait(string className) - { - var type = Game.modData.ObjectCreator.FindType(className); - if (type == null) - throw new InvalidOperationException("Cannot locate type: {0}".F(className)); - - var method = typeof(World).GetMethod("ActorsWithTrait"); - var genericMethod = method.MakeGenericMethod(type); - var result = ((IEnumerable)genericMethod.Invoke(world, null)).Cast().ToArray(); - return result; - } - - [LuaGlobal] - public object TraitInfoOrDefault(string actorType, string className) - { - var type = Game.modData.ObjectCreator.FindType(className); - if (type == null || !world.Map.Rules.Actors.ContainsKey(actorType)) - return null; - - return world.Map.Rules.Actors[actorType].Traits.GetOrDefault(type); - } - - [LuaGlobal] - public object TraitInfo(string actorType, string className) - { - var ret = TraitInfoOrDefault(actorType, className); - if (ret == null) - throw new InvalidOperationException("Actor type {0} does not have trait info of type {1}".F(actorType, className)); - return ret; - } - - [LuaGlobal] - public bool HasTraitInfo(string actorType, string className) - { - var ret = TraitInfoOrDefault(actorType, className); - return ret != null; - } - - [LuaGlobal] - public void RunAfterDelay(double delay, Action func) - { - world.AddFrameEndTask(w => w.Add(new DelayedAction((int)delay, func))); - } - - [LuaGlobal] - public void PlaySpeechNotification(Player player, string notification) - { - Sound.PlayNotification(world.Map.Rules, player, "Speech", notification, player != null ? player.Country.Race : null); - } - - [LuaGlobal] - public void PlaySoundNotification(Player player, string notification) - { - Sound.PlayNotification(world.Map.Rules, player, "Sounds", notification, player != null ? player.Country.Race : null); - } - - [LuaGlobal] - public void WaitFor(Actor actor, Func func) - { - actor.QueueActivity(new WaitFor(func)); - } - - [LuaGlobal] - public void CallFunc(Actor actor, Action func) - { - actor.QueueActivity(new CallFunc(func)); - } - - [LuaGlobal] - public int GetFacing(object vec, double currentFacing) - { - if (vec is CVec) - return world.Map.FacingBetween(CPos.Zero, CPos.Zero + (CVec)vec, (int)currentFacing); - if (vec is WVec) - return Util.GetFacing((WVec)vec, (int)currentFacing); - throw new ArgumentException("Unsupported vector type: {0}".F(vec.GetType())); - } - - [LuaGlobal] - public WRange GetWRangeFromCells(double cells) - { - return WRange.FromCells((int)cells); - } - - [LuaGlobal] - public void SetWinState(Player player, string winState) - { - player.WinState = Enum.Parse(winState); - } - - [LuaGlobal] - public void PlayRandomMusic() - { - if (!Game.Settings.Sound.MapMusic || !world.Map.Rules.InstalledMusic.Any()) - return; - Game.ConnectionStateChanged += StopMusic; - PlayMusic(); - } - - void PlayMusic() - { - var track = world.Map.Rules.InstalledMusic.Random(Game.CosmeticRandom); - Sound.PlayMusicThen(track.Value, PlayMusic); - } - - void StopMusic(OrderManager orderManager) - { - if (!orderManager.GameStarted) - { - Sound.StopMusic(); - Game.ConnectionStateChanged -= StopMusic; - } - } - - [LuaGlobal] - public bool IsDead(Actor actor) - { - return actor.IsDead(); - } - - [LuaGlobal] - public void PlayMovieFullscreen(string movie, Action onComplete) - { - Media.PlayFMVFullscreen(world, movie, onComplete); - } - - [LuaGlobal] - public void FlyToPos(Actor actor, WPos pos) - { - actor.QueueActivity(new Fly(actor, Target.FromPos(pos))); - } - - [LuaGlobal] - public void FlyAttackActor(Actor actor, Actor targetActor) - { - actor.QueueActivity(new FlyAttack(Target.FromActor(targetActor))); - } - - [LuaGlobal] - public void FlyAttackCell(Actor actor, CPos location) - { - actor.QueueActivity(new FlyAttack(Target.FromCell(actor.World, location))); - } - - [LuaGlobal] - public void HeliFlyToPos(Actor actor, WPos pos) - { - actor.QueueActivity(new HeliFly(actor, Target.FromPos(pos))); - } - - [LuaGlobal] - public void SetUnitStance(Actor actor, string stance) - { - var at = actor.TraitOrDefault(); - if (at != null) - at.Stance = Enum.Parse(stance); - } - - [LuaGlobal] - public bool RequiredUnitsAreDestroyed(Player player) - { - return player.HasNoRequiredUnits(); - } - - [LuaGlobal] - public void AttackMove(Actor actor, CPos location, double nearEnough) - { - if (actor.HasTrait()) - actor.QueueActivity(new AttackMove.AttackMoveActivity(actor, new Move.Move(actor, location, (int)nearEnough))); - else - actor.QueueActivity(new Move.Move(actor, location, (int)nearEnough)); - } - - [LuaGlobal] - public int GetRandomInteger(double low, double high) - { - return world.SharedRandom.Next((int)low, (int)high); - } - - [LuaGlobal] - public CPos GetRandomCell() - { - return world.Map.ChooseRandomCell(world.SharedRandom); - } - - [LuaGlobal] - public CPos GetRandomEdgeCell() - { - return world.Map.ChooseRandomEdgeCell(world.SharedRandom); - } - - [LuaGlobal] - public Actor GetNamedActor(string actorName) - { - return sma.Actors[actorName]; - } - - [LuaGlobal] - public bool IsNamedActor(Actor actor) - { - return actor.ActorID <= sma.LastMapActorID && actor.ActorID > sma.LastMapActorID - sma.Actors.Count; - } - - [LuaGlobal] - public IEnumerable GetNamedActors() - { - return sma.Actors.Values; - } - - [LuaGlobal] - public Actor[] FindActorsInBox(WPos topLeft, WPos bottomRight) - { - return world.ActorMap.ActorsInBox(topLeft, bottomRight).ToArray(); - } - - [LuaGlobal] - public Actor[] FindActorsInCircle(WPos location, WRange radius) - { - return world.FindActorsInCircle(location, radius).ToArray(); - } - - ClassicProductionQueue GetSharedQueueForCategory(Player player, string category) - { - return world.ActorsWithTrait() - .Where(a => a.Actor.Owner == player && a.Trait.Info.Type == category) - .Select(a => a.Trait).FirstOrDefault(); - } - - ClassicProductionQueue GetSharedQueueForUnit(Player player, string unit) - { - var ri = world.Map.Rules.Actors[unit]; - - var bi = ri.Traits.GetOrDefault(); - if (bi == null) - return null; - - return bi.Queue.Select(q => GetSharedQueueForCategory(player, q)).FirstOrDefault(); - } - - [LuaGlobal] - public void BuildWithSharedQueue(Player player, string unit, double amount) - { - var queue = GetSharedQueueForUnit(player, unit); - - if (queue != null) - queue.ResolveOrder(queue.Actor, Order.StartProduction(queue.Actor, unit, (int)amount)); - } - - [LuaGlobal] - public void BuildWithPerFactoryQueue(Actor factory, string unit, double amount) - { - var ri = world.Map.Rules.Actors[unit]; - - var bi = ri.Traits.GetOrDefault(); - if (bi == null) - return; - - var queue = factory.TraitsImplementing() - .FirstOrDefault(q => q.Enabled); - - if (queue != null) - queue.ResolveOrder(factory, Order.StartProduction(factory, unit, (int)amount)); - } - - [LuaGlobal] - public bool SharedQueueIsBusy(Player player, string category) - { - var queue = GetSharedQueueForCategory(player, category); - - if (queue == null) - return true; - - return queue.CurrentItem() != null; - } - - [LuaGlobal] - public bool PerFactoryQueueIsBusy(Actor factory) - { - var queue = factory.TraitsImplementing() - .FirstOrDefault(q => q.Enabled); - - if (queue == null) - return true; - - return queue.CurrentItem() != null; - } - - [LuaGlobal] - public void Guard(Actor guard, Actor target) - { - if (target.HasTrait()) - { - var gt = guard.TraitOrDefault(); - - if (gt != null) - gt.GuardTarget(guard, Target.FromActor(target)); - } - } - - [LuaGlobal] - public IEnumerable ExpandFootprint(LuaTable cells, bool allowDiagonal) - { - return Util.ExpandFootprint(cells.Values.Cast(), allowDiagonal); - } - - [LuaGlobal] - public WPos CenterOfCell(CPos position) - { - return world.Map.CenterOfCell(position); - } - } -} diff --git a/OpenRA.Mods.RA/Widgets/Logic/IrcLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/IrcLogic.cs deleted file mode 100644 index b883992516..0000000000 --- a/OpenRA.Mods.RA/Widgets/Logic/IrcLogic.cs +++ /dev/null @@ -1,252 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 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 System; -using System.Collections.Generic; -using System.Linq; -using OpenRA.Irc; -using OpenRA.Widgets; - -namespace OpenRA.Mods.RA.Widgets.Logic -{ - class IrcLogic - { - TextFieldWidget inputBox; - TextFieldWidget nicknameBox; - Widget connectBG; - Widget ircContainer; - - [ObjectCreator.UseCtor] - public IrcLogic(Widget widget) - { - var historyPanel = widget.Get("HISTORY_PANEL"); - var historyTemplate = widget.Get("HISTORY_TEMPLATE"); - var nicknamePanel = widget.Get("NICKNAME_PANEL"); - var nicknameTemplate = widget.Get("NICKNAME_TEMPLATE"); - - inputBox = widget.Get("INPUT_BOX"); - inputBox.OnEnterKey = EnterPressed; - inputBox.OnTabKey = TabPressed; - inputBox.IsDisabled = () => IrcClient.Instance.GetChannel(IrcClient.MainChannel) == null; - - nicknameBox = widget.Get("NICKNAME_BOX"); - nicknameBox.Text = ChooseNickname(Game.Settings.Irc.Nickname); - - connectBG = widget.Get("IRC_CONNECT_BG"); - ircContainer = widget.Get("IRC_CONTAINER"); - - widget.Get("DISCONNECT_BUTTON").OnClick = IrcClient.Instance.Disconnect; - - MaybeShowConnectPanel(); - - historyPanel.Bind(IrcClient.Instance.History, item => MakeLabelWidget(historyTemplate, item), LabelItemEquals, true); - - var mainChannel = IrcClient.Instance.GetChannel(IrcClient.MainChannel); - if (mainChannel != null) - nicknamePanel.Bind(mainChannel.Users, item => MakeLabelWidget(nicknameTemplate, item), LabelItemEquals, false); - - IrcClient.Instance.OnSync += l => - { - var channel = l.GetChannel(); - if (channel.Name.EqualsIC(IrcClient.MainChannel)) - nicknamePanel.Bind(channel.Users, item => MakeLabelWidget(nicknameTemplate, item), LabelItemEquals, false); - }; - IrcClient.Instance.OnKick += l => - { - if (l.KickeeNickname.EqualsIC(IrcClient.Instance.LocalUser.Nickname) && l.Target.EqualsIC(IrcClient.MainChannel)) - nicknamePanel.Unbind(); - }; - IrcClient.Instance.OnPart += l => - { - if (l.PrefixIsSelf() && l.Target.EqualsIC(IrcClient.MainChannel)) - nicknamePanel.Unbind(); - }; - IrcClient.Instance.OnDisconnect += () => - { - nicknamePanel.Unbind(); - MaybeShowConnectPanel(); - }; - - commands.Add("me", args => - { - IrcClient.Instance.Act(IrcClient.MainChannel, args); - IrcClient.AddAction(IrcClient.Instance.LocalUser.Nickname, args); - }); - commands.Add("slap", args => - { - IrcClient.Instance.Act(IrcClient.MainChannel, "slaps {0} around a bit with a large trout".F(args)); - IrcClient.AddAction(IrcClient.Instance.LocalUser.Nickname, "slaps {0} around a bit with a large trout".F(args)); - }); - commands.Add("notice", args => - { - var split = args.Split(new[] { ' ' }, 2); - if (split.Length < 2) - { - IrcClient.AddHistory("/notice: Not enough arguments"); - return; - } - IrcClient.Instance.Notice(split[0], split[1]); - IrcClient.AddSelfNotice(split[0], split[1]); - }); - commands.Add("disconnect", args => - { - Game.Settings.Irc.ConnectAutomatically = false; - Game.Settings.Save(); - IrcClient.Instance.Disconnect(); - }); - commands.Add("quit", args => - { - Game.Settings.Irc.ConnectAutomatically = false; - Game.Settings.Save(); - if (IrcClient.Instance.IsConnected) - IrcClient.Instance.Quit(args); - else - IrcClient.Instance.Disconnect(); - }); - commands.Add("nick", args => IrcClient.Instance.SetNickname(args)); - commands.Add("topic", args => IrcClient.Instance.GetTopic(IrcClient.MainChannel)); - } - - void MaybeShowConnectPanel() - { - if (IrcClient.Instance.IsConnected || IrcClient.Instance.IsReconnecting) - { - ircContainer.Visible = true; - connectBG.Visible = false; - return; - } - - if (Game.Settings.Irc.ConnectAutomatically) - { - ircContainer.Visible = true; - connectBG.Visible = false; - Connect(); - return; - } - - ircContainer.Visible = false; - connectBG.Visible = true; - - var connectAutomaticallyCheckBox = connectBG.Get("CONNECT_AUTOMATICALLY_CHECKBOX"); - var connectAutomaticallyChecked = false; - connectAutomaticallyCheckBox.IsChecked = () => connectAutomaticallyChecked; - connectAutomaticallyCheckBox.OnClick = () => connectAutomaticallyChecked ^= true; - - var connectButton = connectBG.Get("CONNECT_BUTTON"); - - connectButton.OnClick = () => - { - ircContainer.Visible = true; - connectBG.Visible = false; - - Game.Settings.Irc.ConnectAutomatically = connectAutomaticallyCheckBox.IsChecked(); - Game.Settings.Save(); - Connect(); - }; - } - - static string ChooseNickname(string nickname) - { - if (!IrcUtils.IsNickname(nickname)) - { - nickname = Game.Settings.Player.Name; - if (!IrcUtils.IsNickname(nickname)) - nickname = Game.Settings.Irc.DefaultNickname; - } - return nickname; - } - - void Connect() - { - var nickname = ChooseNickname(nicknameBox.Text); - var s = Game.Settings.Irc; - s.Nickname = nickname; - Game.Settings.Save(); - IrcClient.Instance.Connect(s.Hostname, s.Port, s.ConnectionTimeout, nickname, s.Username ?? nickname, s.Realname ?? nickname); - } - - static Widget MakeLabelWidget(LabelWidget template, object item) - { - var itemString = item.ToString(); - var widget = (LabelWidget)template.Clone(); - var font = Game.Renderer.Fonts[widget.Font]; - itemString = WidgetUtils.WrapText(itemString, widget.Bounds.Width, font); - widget.Bounds.Height = font.Measure(itemString).Y; - widget.GetText = () => itemString; - return widget; - } - - bool LabelItemEquals(Widget widget, object item) - { - return item != null && ((LabelWidget)widget).GetText() == item.ToString(); - } - - bool EnterPressed() - { - if (!inputBox.Text.Any()) - return true; - - var text = inputBox.Text; - inputBox.Text = ""; - - if (text[0] == '/') - { - var parts = text.Split(new[] { ' ' }, 2); - var name = parts[0].Substring(1); - var args = parts.Length > 1 ? parts[1] : null; - - Action command; - if (!commands.TryGetValue(name, out command)) - { - IrcClient.AddHistory("{0}: Unknown command".F(name)); - return true; - } - command(args); - } - else - { - IrcClient.Instance.Message(IrcClient.MainChannel, text); - IrcClient.AddMessage(IrcClient.Instance.LocalUser.Nickname, text); - } - return true; - } - - Dictionary> commands = new Dictionary>(StringComparer.OrdinalIgnoreCase); - - List tabMatches = new List(); - int tabMatchesIndex = -1; - - bool TabPressed() - { - if (!inputBox.Text.Any()) - return true; - - var channel = IrcClient.Instance.GetChannel(IrcClient.MainChannel); - - if (channel == null) - return true; - - var spaceIndex = inputBox.Text.TrimEnd().LastIndexOf(' '); - var tabMatchtext = inputBox.Text.Substring(spaceIndex + 1); - - if (tabMatchesIndex < 0 || !tabMatches.Any() || tabMatchtext != tabMatches[tabMatchesIndex]) - tabMatches = channel.Users.Keys.Where(u => u.StartsWith(tabMatchtext, StringComparison.OrdinalIgnoreCase)).ToList(); - - if (!tabMatches.Any()) - return true; - - tabMatchesIndex = (tabMatchesIndex + 1) % tabMatches.Count; - inputBox.Text = inputBox.Text.Remove(spaceIndex + 1) + tabMatches[tabMatchesIndex]; - inputBox.CursorPosition = inputBox.Text.Length; - - return true; - } - } -} diff --git a/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs index bab0f4dd40..65da1d1834 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs @@ -107,7 +107,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic showIncompatibleCheckbox.OnClick = () => { showIncompatible ^= true; RefreshServerList(); }; } - // Game.LoadWidget(null, "SERVERBROWSER_IRC", panel.Get("IRC_ROOT"), new WidgetArgs()); RefreshServerList(); } diff --git a/OpenRA.sln b/OpenRA.sln index 84606d62db..89b342a0ab 100644 --- a/OpenRA.sln +++ b/OpenRA.sln @@ -21,8 +21,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.D2k", "OpenRA.M EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.TS", "OpenRA.Mods.TS\OpenRA.Mods.TS.csproj", "{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Irc", "OpenRA.Irc\OpenRA.Irc.csproj", "{85B48234-8B31-4BE6-AF9C-665CC6866841}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Renderer.Sdl2", "OpenRA.Renderer.Sdl2\OpenRA.Renderer.Sdl2.csproj", "{33D03738-C154-4028-8EA8-63A3C488A651}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.Common", "OpenRA.Mods.Common\OpenRA.Mods.Common.csproj", "{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}" @@ -47,7 +45,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tiberian Dawn Lua scripts", ProjectSection(SolutionItems) = preProject mods\cnc\maps\gdi01\gdi01.lua = mods\cnc\maps\gdi01\gdi01.lua mods\cnc\maps\gdi02\gdi02.lua = mods\cnc\maps\gdi02\gdi02.lua - mods\cnc\maps\gdi03\gdi03.lua = mods\cnc\maps\gdi03\gdi03.lua mods\cnc\maps\gdi04a\gdi04a.lua = mods\cnc\maps\gdi04a\gdi04a.lua mods\cnc\maps\gdi04b\gdi04b.lua = mods\cnc\maps\gdi04b\gdi04b.lua mods\cnc\maps\gdi04c\gdi04c.lua = mods\cnc\maps\gdi04c\gdi04c.lua @@ -102,8 +99,6 @@ Global {C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|x86.Build.0 = Debug|x86 {5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Debug|x86.ActiveCfg = Debug|x86 {5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Debug|x86.Build.0 = Debug|x86 - {85B48234-8B31-4BE6-AF9C-665CC6866841}.Debug|x86.ActiveCfg = Debug|x86 - {85B48234-8B31-4BE6-AF9C-665CC6866841}.Debug|x86.Build.0 = Debug|x86 {33D03738-C154-4028-8EA8-63A3C488A651}.Debug|x86.ActiveCfg = Debug|x86 {33D03738-C154-4028-8EA8-63A3C488A651}.Debug|x86.Build.0 = Debug|x86 {47F1B0EE-EB35-47F2-93E4-273C70909157}.Debug|x86.ActiveCfg = Debug|x86 diff --git a/mods/cnc/chrome/irc.yaml b/mods/cnc/chrome/irc.yaml deleted file mode 100644 index 0165e25cf3..0000000000 --- a/mods/cnc/chrome/irc.yaml +++ /dev/null @@ -1,70 +0,0 @@ -Container@SERVERBROWSER_IRC: - Logic: IrcLogic - Width: 700 - Height: 250 - Children: - Container@IRC_CONTAINER: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Children: - ScrollPanel@HISTORY_PANEL: - Width: 565 - Height: PARENT_BOTTOM - 30 - ItemSpacing: 5 - Label@HISTORY_TEMPLATE: - X: 5 - Width: 530 - Height: 25 - WordWrap: True - TextField@INPUT_BOX: - Y: PARENT_BOTTOM - 25 - Width: 565 - Height: 25 - ScrollPanel@NICKNAME_PANEL: - X: 570 - Width: 130 - Height: PARENT_BOTTOM - 30 - Label@NICKNAME_TEMPLATE: - X: 5 - Button@DISCONNECT_BUTTON: - X: 570 - Y: PARENT_BOTTOM - 25 - Width: 130 - Height: 25 - Text: Disconnect - Font: Bold - Background@IRC_CONNECT_BG: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Background: scrollpanel-bg - Children: - Label@GLOBAL_CHAT_LABEL: - Y: PARENT_BOTTOM / 4 - Width: PARENT_RIGHT - Align: Center - Text: Global Chat - Font: Bold - Label@NICKNAME_LABEL: - X: 200 - Y: PARENT_BOTTOM / 4 + 35 - Text: Nickname: - TextField@NICKNAME_BOX: - X: 270 - Y: PARENT_BOTTOM / 4 + 25 - Width: 150 - Height: 25 - Checkbox@CONNECT_AUTOMATICALLY_CHECKBOX: - X: 270 - Y: PARENT_BOTTOM / 4 + 75 - Height: 20 - Width: 180 - Font: Regular - Text: Connect Automatically - Button@CONNECT_BUTTON: - X: 430 - Y: PARENT_BOTTOM / 4 + 25 - Width: 100 - Height: 25 - Text: Connect - Font: Bold - diff --git a/mods/cnc/maps/gdi03/gdi03.lua b/mods/cnc/maps/gdi03/gdi03.lua deleted file mode 100644 index 942a931a7e..0000000000 --- a/mods/cnc/maps/gdi03/gdi03.lua +++ /dev/null @@ -1,41 +0,0 @@ -MissionAccomplished = function() - Mission.MissionOver({ player }, nil, true) - Media.PlayMovieFullscreen("bombaway.vqa") -end - -MissionFailed = function() - Mission.MissionOver(nil, { player }, true) - Media.PlayMovieFullscreen("gameover.vqa") -end - -AttackPlayer = function() - if not Actor.IsDead(NodBarracks) then - Production.BuildWithPerFactoryQueue(NodBarracks, "e1", 5) - attackSquad = Team.New(Map.FindUnitsInCircle(enemy, NodBarracks, 3)) - Team.Do(attackSquad, function(unit) - Actor.AttackMove(unit, waypoint9.location) - Actor.Hunt(unit) - end) - Team.AddEventHandler(attackSquad.OnAllKilled, OpenRA.RunAfterDelay(Utils.Seconds(15), AttackPlayer)) - end -end - -WorldLoaded = function() - player = OpenRA.GetPlayer("GDI") - enemy = OpenRA.GetPlayer("Nod") - - Media.PlayMovieFullscreen("samdie.vqa") - - samSites = Team.New({ Sam1, Sam2, Sam3, Sam4 }) - Team.AddEventHandler(samSites.OnAllKilled, function() Actor.Create("PowerProxy.AirSupport", { Owner = player }) end) - OpenRA.RunAfterDelay(Utils.Seconds(15), AttackPlayer) -end - -Tick = function() - if Mission.RequiredUnitsAreDestroyed(player) then - MissionFailed() - end - if Mission.RequiredUnitsAreDestroyed(enemy) then - MissionAccomplished() - end -end diff --git a/mods/cnc/maps/gdi03/map.bin b/mods/cnc/maps/gdi03/map.bin deleted file mode 100644 index 626001a409..0000000000 Binary files a/mods/cnc/maps/gdi03/map.bin and /dev/null differ diff --git a/mods/cnc/maps/gdi03/map.png b/mods/cnc/maps/gdi03/map.png deleted file mode 100644 index aa595926ed..0000000000 Binary files a/mods/cnc/maps/gdi03/map.png and /dev/null differ diff --git a/mods/cnc/maps/gdi03/map.yaml b/mods/cnc/maps/gdi03/map.yaml deleted file mode 100644 index 60fa5d3f1d..0000000000 --- a/mods/cnc/maps/gdi03/map.yaml +++ /dev/null @@ -1,1061 +0,0 @@ -Selectable: False - -MapFormat: 6 - -RequiresMod: cnc - -Title: Destroy The SAM Sites - -Description: Build up forces to destroy Nod base.\n\nOnce all Nod SAM sites are neutralized then air support will be provided to combat obstacles such as turrets.\n\nDestroy all units and structures to complete the mission objective. - -PreviewVideo: gdi3.vqa - -Author: Westwood Studios - -Tileset: TEMPERAT - -MapSize: 64,64 - -Bounds: 1,25,45,37 - -UseAsShellmap: False - -Type: Campaign - -Options: - Crates: False - Fog: False - Shroud: True - AllyBuildRadius: False - FragileAlliances: False - StartingCash: 5000 - ConfigurableStartingUnits: False - -Players: - PlayerReference@Nod: - Name: Nod - Race: nod - ColorRamp: 3,255,127 - Allies: Nod - Enemies: GDI - PlayerReference@Neutral: - Name: Neutral - OwnsWorld: True - NonCombatant: True - Race: gdi - Enemies: Nod - PlayerReference@GDI: - Name: GDI - Playable: True - AllowBots: False - Required: True - LockRace: True - Race: gdi - LockColor: True - ColorRamp: 31,222,183 - LockSpawn: True - LockTeam: True - Allies: GDI - Enemies: Nod - PlayerReference@Creeps: - Name: Creeps - NonCombatant: True - Race: Random - Enemies: Nod,GDI - -Actors: - Actor0: wood - Location: 45,59 - Owner: Neutral - Actor1: wood - Location: 44,59 - Owner: Neutral - Actor2: wood - Location: 43,59 - Owner: Neutral - Actor3: wood - Location: 42,59 - Owner: Neutral - Actor4: wood - Location: 45,58 - Owner: Neutral - Actor5: v14 - Location: 44,58 - Owner: Neutral - Actor6: v15 - Location: 43,58 - Owner: Neutral - Actor7: wood - Location: 42,58 - Owner: Neutral - Actor8: wood - Location: 45,57 - Owner: Neutral - Actor9: v17 - Location: 44,57 - Owner: Neutral - Actor10: v17 - Location: 43,57 - Owner: Neutral - Actor11: wood - Location: 42,57 - Owner: Neutral - Actor12: sbag - Location: 35,33 - Owner: Neutral - Actor13: sbag - Location: 34,33 - Owner: Neutral - Actor14: sbag - Location: 33,33 - Owner: Neutral - Actor15: sbag - Location: 32,33 - Owner: Neutral - Actor16: sbag - Location: 31,33 - Owner: Neutral - Actor17: sbag - Location: 30,33 - Owner: Neutral - Actor18: sbag - Location: 29,33 - Owner: Neutral - Actor19: sbag - Location: 28,33 - Owner: Neutral - Actor20: sbag - Location: 23,33 - Owner: Neutral - Actor21: sbag - Location: 22,33 - Owner: Neutral - Actor22: sbag - Location: 21,33 - Owner: Neutral - Actor23: sbag - Location: 20,33 - Owner: Neutral - Actor24: sbag - Location: 35,32 - Owner: Neutral - Actor25: sbag - Location: 29,32 - Owner: Neutral - Actor26: sbag - Location: 28,32 - Owner: Neutral - Actor27: sbag - Location: 23,32 - Owner: Neutral - Actor28: sbag - Location: 22,32 - Owner: Neutral - Actor29: sbag - Location: 20,32 - Owner: Neutral - Actor30: sbag - Location: 35,31 - Owner: Neutral - Actor31: sbag - Location: 20,31 - Owner: Neutral - Actor32: sbag - Location: 35,30 - Owner: Neutral - Actor33: sbag - Location: 20,30 - Owner: Neutral - Actor34: sbag - Location: 35,29 - Owner: Neutral - Actor35: sbag - Location: 20,29 - Owner: Neutral - Actor36: sbag - Location: 35,28 - Owner: Neutral - Actor37: sbag - Location: 20,28 - Owner: Neutral - Actor38: sbag - Location: 35,27 - Owner: Neutral - Actor39: sbag - Location: 20,27 - Owner: Neutral - Actor40: sbag - Location: 35,26 - Owner: Neutral - Actor41: sbag - Location: 20,26 - Owner: Neutral - Actor42: sbag - Location: 35,25 - Owner: Neutral - Actor43: sbag - Location: 34,25 - Owner: Neutral - Actor44: sbag - Location: 33,25 - Owner: Neutral - Actor45: sbag - Location: 32,25 - Owner: Neutral - Actor46: sbag - Location: 31,25 - Owner: Neutral - Actor47: sbag - Location: 30,25 - Owner: Neutral - Actor48: sbag - Location: 29,25 - Owner: Neutral - Actor49: sbag - Location: 28,25 - Owner: Neutral - Actor50: sbag - Location: 27,25 - Owner: Neutral - Actor51: sbag - Location: 26,25 - Owner: Neutral - Actor52: sbag - Location: 25,25 - Owner: Neutral - Actor53: sbag - Location: 24,25 - Owner: Neutral - Actor54: sbag - Location: 23,25 - Owner: Neutral - Actor55: sbag - Location: 22,25 - Owner: Neutral - Actor56: sbag - Location: 21,25 - Owner: Neutral - Actor57: sbag - Location: 20,25 - Owner: Neutral - Actor58: t01 - Location: 21,51 - Owner: Neutral - Actor59: tc04 - Location: 11,34 - Owner: Neutral - Actor60: t01 - Location: 43,59 - Owner: Neutral - Actor61: t01 - Location: 41,58 - Owner: Neutral - Actor62: t05 - Location: 12,38 - Owner: Neutral - Actor63: tc01 - Location: 22,44 - Owner: Neutral - Actor64: t02 - Location: 3,34 - Owner: Neutral - Actor65: tc02 - Location: 24,57 - Owner: Neutral - Actor66: tc02 - Location: 3,35 - Owner: Neutral - Actor67: tc02 - Location: 2,48 - Owner: Neutral - Actor68: t03 - Location: 41,57 - Owner: Neutral - Actor69: t03 - Location: 45,55 - Owner: Neutral - Actor70: t06 - Location: 45,53 - Owner: Neutral - Actor71: t16 - Location: 40,60 - Owner: Neutral - Actor72: tc01 - Location: 44,52 - Owner: Neutral - Actor73: tc04 - Location: 39,53 - Owner: Neutral - Actor74: t01 - Location: 36,38 - Owner: Neutral - Actor75: t06 - Location: 36,43 - Owner: Neutral - Actor76: t06 - Location: 35,42 - Owner: Neutral - Actor77: t05 - Location: 24,56 - Owner: Neutral - Actor78: tc02 - Location: 30,51 - Owner: Neutral - Actor79: t01 - Location: 30,53 - Owner: Neutral - Actor80: tc05 - Location: 34,56 - Owner: Neutral - Actor81: tc04 - Location: 24,49 - Owner: Neutral - Actor82: t07 - Location: 4,36 - Owner: Neutral - Actor83: t06 - Location: 2,37 - Owner: Neutral - Actor84: t08 - Location: 3,38 - Owner: Neutral - Actor85: t11 - Location: 2,36 - Owner: Neutral - Actor86: tc05 - Location: 17,31 - Owner: Neutral - Actor87: t12 - Location: 19,26 - Owner: Neutral - Actor88: t12 - Location: 33,44 - Owner: Neutral - Actor89: t08 - Location: 36,42 - Owner: Neutral - Actor90: tc01 - Location: 39,43 - Owner: Neutral - Actor91: tc02 - Location: 22,51 - Owner: Neutral - Actor92: tc04 - Location: 20,50 - Owner: Neutral - Actor93: tc01 - Location: 43,33 - Owner: Neutral - Actor94: t17 - Location: 14,33 - Owner: Neutral - Actor95: t12 - Location: 36,30 - Owner: Neutral - Actor96: tc04 - Location: 38,25 - Owner: Neutral - Actor97: tc01 - Location: 36,28 - Owner: Neutral - Actor98: t16 - Location: 38,28 - Owner: Neutral - Actor99: tc01 - Location: 34,45 - Owner: Neutral - Actor100: tc04 - Location: 20,42 - Owner: Neutral - Actor101: t16 - Location: 19,43 - Owner: Neutral - Actor102: tc04 - Location: 16,26 - Owner: Neutral - Actor103: tc01 - Location: 4,31 - Owner: Neutral - Actor104: t17 - Location: 6,31 - Owner: Neutral - Actor105: t01 - Location: 20,38 - Owner: Neutral - Actor106: t02 - Location: 23,40 - Owner: Neutral - Actor107: t02 - Location: 31,42 - Owner: Neutral - Actor108: t07 - Location: 32,39 - Owner: Neutral - Actor109: t07 - Location: 21,33 - Owner: Neutral - Actor110: nuke - Location: 29,26 - Owner: Nod - Health: 1 - Facing: 0 - NodBarracks: hand - Location: 24,26 - Owner: Nod - Health: 1 - Facing: 0 - Actor112: silo - Location: 33,26 - Owner: Nod - Health: 1 - Facing: 0 - Actor113: silo - Location: 31,26 - Owner: Nod - Health: 1 - Facing: 0 - Actor114: proc - Location: 31,28 - Owner: Nod - Health: 1 - Facing: 0 - Actor115: nuke - Location: 22,26 - Owner: Nod - Health: 1 - Facing: 0 - Actor116: fact - Location: 26,26 - Owner: Nod - Health: 1 - Facing: 0 - Actor117: gun - Location: 20,34 - Owner: Nod - Health: 1 - Facing: 160 - Actor118: v07 - Location: 40,55 - Owner: Neutral - Health: 1 - Facing: 0 - Actor119: v11 - Location: 44,60 - Owner: Neutral - Health: 1 - Facing: 0 - Actor120: v08 - Location: 40,56 - Owner: Neutral - Health: 1 - Facing: 0 - Actor121: v01 - Location: 44,54 - Owner: Neutral - Health: 1 - Facing: 0 - Sam1: sam - Location: 28,52 - Owner: Nod - Health: 1 - Facing: 0 - Sam2: sam - Location: 22,46 - Owner: Nod - Health: 1 - Facing: 0 - Sam3: sam - Location: 35,47 - Owner: Nod - Health: 1 - Facing: 0 - Actor125: gun - Location: 36,30 - Owner: Nod - Health: 1 - Facing: 96 - Sam4: sam - Location: 12,34 - Owner: Nod - Health: 1 - Facing: 0 - Actor127: gun - Location: 29,34 - Owner: Nod - Health: 1 - Facing: 96 - Actor129: bggy - Location: 22,29 - Owner: Nod - Health: 1 - Facing: 128 - Actor130: mcv - Location: 9,60 - Owner: GDI - Health: 1 - Facing: 0 - Actor131: jeep - Location: 8,58 - Owner: GDI - Health: 1 - Facing: 0 - Actor132: jeep - Location: 10,58 - Owner: GDI - Health: 1 - Facing: 0 - Actor133: jeep - Location: 9,58 - Owner: GDI - Health: 1 - Facing: 0 - Actor134: bggy - Location: 21,29 - Owner: Nod - Health: 1 - Facing: 128 - Actor135: bggy - Location: 28,50 - Owner: Nod - Health: 1 - Facing: 160 - Actor136: bggy - Location: 6,25 - Owner: Nod - Health: 1 - Facing: 0 - Actor137: bggy - Location: 21,30 - Owner: Nod - Health: 1 - Facing: 128 - Actor138: bggy - Location: 22,30 - Owner: Nod - Health: 1 - Facing: 128 - Actor139: e3 - Location: 17,28 - Owner: Nod - Health: 1 - Facing: 96 - SubCell: 0 - Actor140: e1 - Location: 19,29 - Owner: Nod - Health: 1 - Facing: 160 - SubCell: 4 - Actor141: e1 - Location: 18,28 - Owner: Nod - Health: 1 - Facing: 160 - SubCell: 4 - Actor142: e1 - Location: 19,28 - Owner: Nod - Health: 1 - Facing: 96 - SubCell: 0 - Actor143: e1 - Location: 31,32 - Owner: Nod - Health: 1 - Facing: 160 - SubCell: 0 - Actor144: e1 - Location: 34,32 - Owner: Nod - Health: 1 - Facing: 96 - SubCell: 4 - Actor145: e3 - Location: 34,31 - Owner: Nod - Health: 1 - Facing: 96 - SubCell: 4 - Actor146: e3 - Location: 34,32 - Owner: Nod - Health: 1 - Facing: 96 - SubCell: 1 - Actor147: e3 - Location: 18,29 - Owner: Nod - Health: 1 - Facing: 160 - SubCell: 3 - Actor148: e3 - Location: 30,51 - Owner: Nod - Health: 1 - Facing: 160 - SubCell: 0 - Actor149: e1 - Location: 20,42 - Owner: Nod - Health: 1 - Facing: 160 - SubCell: 0 - Actor150: e1 - Location: 23,44 - Owner: Nod - Health: 1 - Facing: 224 - SubCell: 4 - Actor151: e1 - Location: 24,33 - Owner: Nod - Health: 1 - Facing: 192 - SubCell: 0 - Actor152: e1 - Location: 22,34 - Owner: Nod - Health: 1 - Facing: 96 - SubCell: 4 - Actor153: e1 - Location: 27,33 - Owner: Nod - Health: 1 - Facing: 96 - SubCell: 2 - Actor154: e1 - Location: 30,34 - Owner: Nod - Health: 1 - Facing: 160 - SubCell: 1 - Actor155: e1 - Location: 14,33 - Owner: Nod - Health: 1 - Facing: 96 - SubCell: 4 - Actor156: e1 - Location: 34,45 - Owner: Nod - Health: 1 - Facing: 64 - SubCell: 1 - Actor157: e1 - Location: 36,45 - Owner: Nod - Health: 1 - Facing: 160 - SubCell: 1 - Actor158: e3 - Location: 30,32 - Owner: Nod - Health: 1 - Facing: 160 - SubCell: 3 - Actor159: e3 - Location: 21,32 - Owner: Nod - Health: 1 - Facing: 96 - SubCell: 3 - Actor160: e3 - Location: 14,32 - Owner: Nod - Health: 1 - Facing: 96 - SubCell: 3 - Actor161: e1 - Location: 11,31 - Owner: Nod - Health: 1 - Facing: 96 - SubCell: 4 - Actor162: e1 - Location: 10,31 - Owner: Nod - Health: 1 - Facing: 96 - SubCell: 2 - Actor163: c6 - Location: 42,56 - Owner: Neutral - Health: 1 - Facing: 0 - SubCell: 1 - Actor164: c3 - Location: 43,56 - Owner: Neutral - Health: 1 - Facing: 0 - SubCell: 1 - Actor165: c2 - Location: 40,58 - Owner: Neutral - Health: 1 - Facing: 0 - SubCell: 1 - Actor166: e3 - Location: 40,43 - Owner: Nod - Health: 1 - Facing: 0 - SubCell: 3 - Actor167: e3 - Location: 19,45 - Owner: Nod - Health: 1 - Facing: 160 - SubCell: 2 - Actor168: e3 - Location: 43,33 - Owner: Nod - Health: 1 - Facing: 96 - SubCell: 4 - Actor169: e1 - Location: 11,58 - Owner: GDI - Health: 1 - Facing: 0 - SubCell: 2 - Actor170: e1 - Location: 11,58 - Owner: GDI - Health: 1 - Facing: 0 - SubCell: 1 - Actor171: e1 - Location: 11,57 - Owner: GDI - Health: 1 - Facing: 0 - SubCell: 4 - Actor172: e1 - Location: 11,57 - Owner: GDI - Health: 1 - Facing: 0 - SubCell: 3 - Actor173: e2 - Location: 7,58 - Owner: GDI - Health: 1 - Facing: 0 - SubCell: 1 - Actor174: e2 - Location: 7,57 - Owner: GDI - Health: 1 - Facing: 0 - SubCell: 3 - Actor175: e2 - Location: 7,57 - Owner: GDI - Health: 1 - Facing: 0 - SubCell: 4 - Actor176: e2 - Location: 7,58 - Owner: GDI - Health: 1 - Facing: 0 - SubCell: 2 - Actor177: e3 - Location: 14,32 - Owner: Nod - Health: 1 - Facing: 96 - SubCell: 1 - Actor178: e1 - Location: 9,31 - Owner: Nod - Health: 1 - Facing: 96 - SubCell: 1 - Actor179: e3 - Location: 13,36 - Owner: Nod - Health: 1 - Facing: 96 - SubCell: 2 - Actor180: e3 - Location: 11,34 - Owner: Nod - Health: 1 - Facing: 64 - SubCell: 4 - Actor181: e3 - Location: 20,45 - Owner: Nod - Health: 1 - Facing: 160 - SubCell: 3 - Actor182: e1 - Location: 25,51 - Owner: Nod - Health: 1 - Facing: 160 - SubCell: 0 - Actor183: e1 - Location: 24,52 - Owner: Nod - Health: 1 - Facing: 160 - SubCell: 0 - Actor184: e3 - Location: 33,46 - Owner: Nod - Health: 1 - Facing: 160 - SubCell: 0 - Actor185: e3 - Location: 37,47 - Owner: Nod - Health: 1 - Facing: 160 - SubCell: 3 - Actor186: e3 - Location: 37,28 - Owner: Nod - Health: 1 - Facing: 0 - SubCell: 3 - Actor187: e3 - Location: 38,28 - Owner: Nod - Health: 1 - Facing: 0 - SubCell: 0 - Actor188: e3 - Location: 14,32 - Owner: Nod - Health: 1 - Facing: 0 - SubCell: 4 - Actor189: e1 - Location: 10,31 - Owner: Nod - Health: 1 - Facing: 0 - SubCell: 3 - Actor190: e1 - Location: 10,31 - Owner: Nod - Health: 1 - Facing: 0 - SubCell: 4 - Actor191: e3 - Location: 24,46 - Owner: Nod - Health: 1 - Facing: 128 - SubCell: 1 - waypoint26: waypoint - Location: 2,54 - Owner: Neutral - waypoint12: waypoint - Location: 11,37 - Owner: Neutral - waypoint11: waypoint - Location: 32,41 - Owner: Neutral - waypoint10: waypoint - Location: 29,50 - Owner: Neutral - waypoint9: waypoint - Location: 6,52 - Owner: Neutral - waypoint8: waypoint - Location: 14,35 - Owner: Neutral - waypoint7: waypoint - Location: 36,35 - Owner: Neutral - waypoint6: waypoint - Location: 36,32 - Owner: Neutral - waypoint5: waypoint - Location: 17,41 - Owner: Neutral - waypoint4: waypoint - Location: 24,54 - Owner: Neutral - waypoint3: waypoint - Location: 42,51 - Owner: Neutral - waypoint2: waypoint - Location: 43,37 - Owner: Neutral - waypoint1: waypoint - Location: 34,37 - Owner: Neutral - waypoint0: waypoint - Location: 26,37 - Owner: Neutral - -Smudges: - -Rules: - World: - -SpawnMPUnits: - -MPStartLocations: - -CrateSpawner: - LuaScriptInterface: - LuaScripts: gdi03.lua - ObjectivesPanel: - PanelName: MISSION_OBJECTIVES - Player: - -ConquestVictoryConditions: - MissionObjectives: - EarlyGameOver: true - ^Vehicle: - MustBeDestroyed: - Tooltip: - GenericVisibility: Enemy - ShowOwnerRow: false - ^Tank: - MustBeDestroyed: - Tooltip: - GenericVisibility: Enemy - ShowOwnerRow: false - ^Helicopter: - MustBeDestroyed: - Tooltip: - GenericVisibility: Enemy - ShowOwnerRow: false - ^Infantry: - MustBeDestroyed: - Tooltip: - GenericVisibility: Enemy - ShowOwnerRow: false - ^Plane: - Tooltip: - GenericVisibility: Enemy - ShowOwnerRow: false - ^Ship: - Tooltip: - GenericVisibility: Enemy - ShowOwnerRow: false - ^Building: - Tooltip: - GenericVisibility: Enemy - ShowOwnerRow: false - ^Wall: - Tooltip: - ShowOwnerRow: false - ^Husk: - Tooltip: - GenericVisibility: Enemy, Ally, Neutral - GenericStancePrefix: false - ShowOwnerRow: false - HARV: - -MustBeDestroyed: - WEAP: - Buildable: - Prerequisites: ~disabled - NUK2: - Buildable: - Prerequisites: ~disabled - FIX: - Buildable: - Prerequisites: ~disabled - HPAD: - Buildable: - Prerequisites: ~disabled - EYE: - Buildable: - Prerequisites: ~disabled - GUN: - Buildable: - Prerequisites: ~disabled - ATWR: - Buildable: - Prerequisites: ~disabled - E3: - Buildable: - Prerequisites: ~disabled - E4: - Buildable: - Prerequisites: ~disabled - E5: - Buildable: - Prerequisites: ~disabled - RMBO: - Buildable: - Prerequisites: ~disabled - AFLD: - Buildable: - Prerequisites: ~disabled - TMPL: - Buildable: - Prerequisites: ~disabled - OBLI: - Buildable: - Prerequisites: ~disabled - SAM: - Buildable: - Prerequisites: ~disabled - Building: - Power: - Amount: -10 - HQ: - Buildable: - Prerequisites: ~disabled - NOHQ: - RequiresPower: - CanPowerDown: - Inherits: ^BaseBuilding - Valued: - Cost: 1000 - Tooltip: - Name: Communications Center - Description: Provides an overview of the battlefield.\n Requires power to operate. - ProvidesCustomPrerequisite: - Prerequisite: anyhq - Buildable: - BuildPaletteOrder: 70 - Prerequisites: proc - Queue: Building.GDI - Building: - Footprint: x_ xx - Dimensions: 2,2 - Health: - HP: 750 - RevealsShroud: - Range: 10 - Bib: - ProvidesRadar: - RenderBuilding: - Image: hq - Power: - Amount: -40 - PowerProxy.AirSupport: - AirstrikePower: - Icon: airstrike - ChargeTime: 30 - SquadSize: 3 - QuantizedFacings: 8 - Description: Air Strike - LongDesc: Deploy an aerial napalm strike.\nBurns buildings and infantry along a line. - EndChargeSound: airredy1.aud - SelectTargetSound: select1.aud - IncomingSound: enemya.aud - UnitType: a10 - DisplayBeacon: True - BeaconPoster: airstrike - DisplayRadarPing: True - CameraActor: camera - -Sequences: - -VoxelSequences: - -Weapons: - -Voices: - -Notifications: - -Translations: diff --git a/mods/cnc/mod.yaml b/mods/cnc/mod.yaml index c7d0354c08..bb4653acb7 100644 --- a/mods/cnc/mod.yaml +++ b/mods/cnc/mod.yaml @@ -103,7 +103,6 @@ ChromeLayout: ./mods/cnc/chrome/credits.yaml ./mods/cnc/chrome/dialogs.yaml ./mods/cnc/chrome/tooltips.yaml - ./mods/cnc/chrome/irc.yaml ./mods/cnc/chrome/assetbrowser.yaml ./mods/cnc/chrome/missionbrowser.yaml @@ -172,28 +171,28 @@ ChromeMetrics: Fonts: Small: - Font:./FreeSans.ttf + Font:./mods/common/FreeSans.ttf Size:12 Regular: - Font:./FreeSans.ttf + Font:./mods/common/FreeSans.ttf Size:14 Bold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:14 Title: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:32 MediumBold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:18 BigBold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:24 Tiny: - Font:./FreeSans.ttf + Font:./mods/common/FreeSans.ttf Size:10 TinyBold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:10 LuaScripts: diff --git a/mods/cnc/rules/defaults.yaml b/mods/cnc/rules/defaults.yaml index db7de46166..d08506f1d4 100644 --- a/mods/cnc/rules/defaults.yaml +++ b/mods/cnc/rules/defaults.yaml @@ -40,7 +40,6 @@ CloakSound: trans1.aud UncloakSound: trans1.aud Huntable: - LuaScriptEvents: ScriptTriggers: GainsStatUpgrades: SelfHealing@ELITE: @@ -96,7 +95,6 @@ CloakSound: trans1.aud UncloakSound: trans1.aud Huntable: - LuaScriptEvents: ScriptTriggers: GainsStatUpgrades: SelfHealing@ELITE: @@ -135,7 +133,6 @@ BodyOrientation: UpdatesPlayerStatistics: Huntable: - LuaScriptEvents: ScriptTriggers: Tooltip: GenericName: Helicopter @@ -210,7 +207,6 @@ Prerequisites: hosp UpdatesPlayerStatistics: Huntable: - LuaScriptEvents: DetectCloaked: Range: 1 ScriptTriggers: @@ -307,7 +303,6 @@ AttackFrontal: UpdatesPlayerStatistics: Huntable: - LuaScriptEvents: ScriptTriggers: DeathSounds: @@ -328,7 +323,6 @@ BodyOrientation: Huntable: AttackMove: - LuaScriptEvents: ScriptTriggers: GainsStatUpgrades: SelfHealing@ELITE: @@ -362,7 +356,6 @@ BodyOrientation: UpdatesPlayerStatistics: Huntable: - LuaScriptEvents: ScriptTriggers: GainsStatUpgrades: SelfHealing@ELITE: @@ -414,7 +407,6 @@ FrozenUnderFog: UpdatesPlayerStatistics: Huntable: - LuaScriptEvents: Demolishable: ScriptTriggers: WithMakeAnimation: @@ -459,7 +451,6 @@ BodyOrientation: FrozenUnderFog: StartsRevealed: true - LuaScriptEvents: ScriptTriggers: WithMakeAnimation: @@ -505,7 +496,6 @@ Palette: terrain FrozenUnderFog: StartsRevealed: true - LuaScriptEvents: ScriptTriggers: WithMakeAnimation: @@ -539,7 +529,6 @@ Guardable: BodyOrientation: FrozenUnderFog: - LuaScriptEvents: ScriptTriggers: ^Tree: @@ -564,7 +553,6 @@ BodyOrientation: FrozenUnderFog: StartsRevealed: true - LuaScriptEvents: ScriptTriggers: WithMakeAnimation: @@ -583,7 +571,6 @@ BodyOrientation: FrozenUnderFog: StartsRevealed: true - LuaScriptEvents: WithMakeAnimation: ^Rock: @@ -602,7 +589,6 @@ BodyOrientation: FrozenUnderFog: StartsRevealed: true - LuaScriptEvents: ScriptTriggers: WithMakeAnimation: @@ -630,7 +616,6 @@ BodyOrientation: Tooltip: GenericName: Destroyed Vehicle - LuaScriptEvents: DisabledOverlay: ScriptTriggers: @@ -660,6 +645,5 @@ DamagedSound: xplos.aud DestroyedSound: xplobig4.aud BodyOrientation: - LuaScriptEvents: ScriptTriggers: diff --git a/FreeSans.ttf b/mods/common/FreeSans.ttf similarity index 100% rename from FreeSans.ttf rename to mods/common/FreeSans.ttf diff --git a/FreeSansBold.ttf b/mods/common/FreeSansBold.ttf similarity index 100% rename from FreeSansBold.ttf rename to mods/common/FreeSansBold.ttf diff --git a/mods/common/lua/actor.lua b/mods/common/lua/actor.lua deleted file mode 100644 index 0ace58e364..0000000000 --- a/mods/common/lua/actor.lua +++ /dev/null @@ -1,236 +0,0 @@ -Actor = { } - -Actor.Create = function(name, init) - if name == nil then error("No actor name specified", 2) end - if init.Owner == nil then error("No actor owner specified", 2) end - local td = OpenRA.New("TypeDictionary") - local addToWorld = true - for key, value in pairs(init) do - if key == "AddToWorld" then - addToWorld = value - else - td:Add(OpenRA.New(key .. "Init", { value })) - end - end - return World:CreateActor(addToWorld, name, td) -end - -Actor.Turn = function(actor, facing) - actor:QueueActivity(OpenRA.New("Turn", { actor, { facing, "Int32" } })) -end - -Actor.Move = function(actor, location) - Actor.MoveNear(actor, location, 0) -end - -Actor.MoveNear = function(actor, location, nearEnough) - actor:QueueActivity(OpenRA.New("Move", { actor, location, WRange.FromCells(nearEnough) })) -end - -Actor.ScriptedMove = function(actor, location) - if Actor.HasTrait(actor, "Helicopter") then - Internal.HeliFlyToPos(actor, Map.CenterOfCell(location)) - else - actor:QueueActivity(OpenRA.New("Move", { actor, location })) - end -end - -Actor.AfterMove = function(actor) - local heli = Actor.TraitOrDefault(actor, "Helicopter") - if heli ~= nil then - Actor.Turn(actor, heli.Info.InitialFacing) - Actor.HeliLand(actor, true) - end -end - -Actor.Teleport = function(actor, location) - actor:QueueActivity(OpenRA.New("SimpleTeleport", { location })) -end - -Actor.AttackMove = function(actor, location, nearEnough) - Internal.AttackMove(actor, location, nearEnough or 0) -end - -Actor.HeliFly = function(actor, position) - Internal.HeliFlyToPos(actor, position) -end - -Actor.HeliLand = function(actor, requireSpace) - actor:QueueActivity(OpenRA.New("HeliLand", { requireSpace })) -end - -Actor.Fly = function(actor, position) - Internal.FlyToPos(actor, position) -end - -Actor.FlyAttackActor = function(actor, targetActor) - Internal.FlyAttackActor(actor, targetActor) -end - -Actor.FlyAttackCell = function(actor, location) - Internal.FlyAttackCell(actor, location) -end - -Actor.FlyOffMap = function(actor) - actor:QueueActivity(OpenRA.New("FlyOffMap")) -end - -Actor.Hunt = function(actor) - if Actor.HasTrait(actor, "AttackBase") and Actor.HasTrait(actor, "IMove") then - actor:QueueActivity(OpenRA.New("Hunt", { actor })) - end -end - -Actor.CargoIsEmpty = function(actor) - local cargo = Actor.TraitOrDefault(actor, "Cargo") - return cargo == nil or cargo:IsEmpty(actor) -end - -Actor.UnloadCargo = function(actor, unloadAll) - actor:QueueActivity(OpenRA.New("UnloadCargo", { actor, unloadAll })) -end - -Actor.Harvest = function(actor) - actor:QueueActivity(OpenRA.New("FindResources")) -end - -Actor.Scatter = function(actor) - local mobile = Actor.Trait(actor, "Mobile") - mobile:Nudge(actor, actor, true) -end - -Actor.Wait = function(actor, period) - actor:QueueActivity(OpenRA.New("Wait", { { period, "Int32" } })) -end - -Actor.WaitFor = function(actor, func) - Internal.WaitFor(actor, func) -end - -Actor.CallFunc = function(actor, func) - Internal.CallFunc(actor, func) -end - -Actor.DeployTransform = function(actor) - Actor.CallFunc(actor, function() - -- Queue the transform order - Actor.Trait(actor, "Transforms"):DeployTransform(true) - end) -end - -Actor.RemoveSelf = function(actor) - actor:QueueActivity(OpenRA.New("RemoveSelf")) -end - -Actor.Stop = function(actor) - actor:CancelActivity() -end - -Actor.IsDead = function(actor) - return Internal.IsDead(actor) -end - -Actor.IsInWorld = function(actor) - return actor.IsInWorld -end - -Actor.Owner = function(actor) - return actor.Owner -end - -Actor.Facing = function(actor) - return Actor.Trait(actor, "IFacing"):get_Facing() -end - -Actor.IsIdle = function(actor) - return actor.IsIdle -end - -Actor.SetStance = function(actor, stance) - Internal.SetUnitStance(actor, stance) -end - -Actor.RepairBuilding = function(actor) - local rb = Actor.TraitOrDefault(actor, "RepairableBuilding") - if rb ~= nil and not rb.RepairActive then - rb:RepairBuilding(actor, Actor.Owner(actor)) - end -end - -Actor.OnDamaged = function(actor, eh) - Actor.Trait(actor, "LuaScriptEvents").OnDamaged:Add(eh) -end - -Actor.OnKilled = function(actor, eh) - Actor.Trait(actor, "LuaScriptEvents").OnKilled:Add(eh) -end - -Actor.OnAddedToWorld = function(actor, eh) - Actor.Trait(actor, "LuaScriptEvents").OnAddedToWorld:Add(eh) -end - -Actor.OnRemovedFromWorld = function(actor, eh) - Actor.Trait(actor, "LuaScriptEvents").OnRemovedFromWorld:Add(eh) -end - -Actor.OnCaptured = function(actor, eh) - Actor.Trait(actor, "LuaScriptEvents").OnCaptured:Add(eh) -end - -Actor.OnIdle = function(actor, eh) - Actor.Trait(actor, "LuaScriptEvents").OnIdle:Add(eh) -end - -Actor.OnProduced = function(actor, eh) - Actor.Trait(actor, "LuaScriptEvents").OnProduced:Add(eh) -end - -Actor.ActorsWithTrait = function(className) - local ret = { } - for item in Utils.Enumerate(Internal.ActorsWithTrait(className)) do - table.insert(ret, item.Actor) - end - return ret -end - -Actor.HasTrait = function(actor, className) - return Internal.HasTrait(actor, className) -end - -Actor.TraitOrDefault = function(actor, className) - return Internal.TraitOrDefault(actor, className) -end - -Actor.Trait = function(actor, className) - return Internal.Trait(actor, className) -end - -Actor.ReturnToBase = function(actor, airfield) - actor:QueueActivity(OpenRA.New("ReturnToBase", { actor, airfield })) -end - -Actor.Guard = function(actor, target) - Internal.Guard(actor, target) -end - -Actor.Patrol = function(actor, waypoints, wait, loop) - if not Actor.IsDead(actor) then - Utils.Do(waypoints, function(wpt) - Actor.AttackMove(actor, wpt.Location, 3) - Actor.Wait(actor, wait or 0) - end) - if loop or loop == nil then - Actor.CallFunc(actor, function() Actor.Patrol(actor, waypoints, wait, loop) end) - end - end -end - -Actor.PatrolUntil = function(actor, waypoints, wait, func) - if func == nil then error("No function specified", 2) end - if not Actor.IsDead(actor) then - Actor.Patrol(actor, waypoints, wait, false) - if not func(actor) then - Actor.CallFunc(actor, function() Actor.PatrolUntil(actor, waypoints, wait, func) end) - end - end -end diff --git a/mods/common/lua/facing.lua b/mods/common/lua/facing.lua deleted file mode 100644 index 827d3c6890..0000000000 --- a/mods/common/lua/facing.lua +++ /dev/null @@ -1,10 +0,0 @@ -Facing = { } - -Facing.North = { 0, "Int32" } -Facing.NorthWest = { 32, "Int32" } -Facing.West = { 64, "Int32" } -Facing.SouthWest = { 96, "Int32" } -Facing.South = { 128, "Int32" } -Facing.SouthEast = { 160, "Int32" } -Facing.East = { 192, "Int32" } -Facing.NorthEast = { 224, "Int32" } diff --git a/mods/common/lua/map.lua b/mods/common/lua/map.lua deleted file mode 100644 index f1ed30ce9c..0000000000 --- a/mods/common/lua/map.lua +++ /dev/null @@ -1,109 +0,0 @@ -Map = { } - -Map.GetFacing = function(vec, currentFacing) - return Internal.GetFacing(vec, currentFacing) -end - -Map.GetRandomCell = function() - return Internal.GetRandomCell() -end - -Map.GetRandomEdgeCell = function() - return Internal.GetRandomEdgeCell() -end - -Map.IsNamedActor = function(actor) - return Internal.IsNamedActor(actor) -end - -Map.GetNamedActor = function(actorName) - return Internal.GetNamedActor(actorName) -end - -Map.GetNamedActors = function() - return Internal.GetNamedActors() -end - -Map.FindActorsInCircle = function(location, radius, func) - local actors = Internal.FindActorsInCircle(location.CenterPosition, WRange.FromCells(radius)) - return Utils.EnumerableWhere(actors, func) -end - -Map.FindActorsInBox = function(topLeft, bottomRight, func) - local actors = Internal.FindActorsInBox(topLeft.CenterPosition, bottomRight.CenterPosition) - return Utils.EnumerableWhere(actors, func) -end - -Map.__FilterByTrait = function(a, player, trait) - return Actor.Owner(a) == player and Actor.HasTrait(a, trait) -end - -Map.__FilterByTraitAndIdle = function(a, player, trait) - return Map.__FilterByTrait(a, player, trait) and Actor.IsIdle(a) -end - -Map.FindUnitsInCircle = function(player, location, radius) - return Map.FindActorsInCircle(location, radius, function(a) return Map.__FilterByTrait(a, player, "Mobile") end) -end - -Map.FindUnitsInBox = function(player, topLeft, bottomRight) - return Map.FindActorsInBox(topLeft, bottomRight, function(a) return Map.__FilterByTrait(a, player, "Mobile") end) -end - -Map.FindStructuresInCircle = function(player, location, radius) - return Map.FindActorsInCircle(location, radius, function(a) return Map.__FilterByTrait(a, player, "Building") end) -end - -Map.FindStructuresInBox = function(player, topLeft, bottomRight) - return Map.FindActorsInBox(topLeft, bottomRight, function(a) return Map.__FilterByTrait(a, player, "Building") end) -end - -Map.FindIdleUnitsInCircle = function(player, location, radius) - return Map.FindActorsInCircle(location, radius, function(a) return Map.__FilterByTraitAndIdle(a, player, "Mobile") end) -end - -Map.FindIdleUnitsInBox = function(player, topLeft, bottomRight) - return Map.FindActorsInBox(topLeft, bottomRight, function(a) return Map.__FilterByTraitAndIdle(a, player, "Mobile") end) -end - -Map.ExpandFootprint = function(cells, allowDiagonal) - return Utils.EnumerableToTable(Internal.ExpandFootprint(cells, allowDiagonal)) -end - -Map.CenterOfCell = function(position) - return Internal.CenterOfCell(position) -end - -CPos.New = function(x, y) - return OpenRA.New("CPos", { { x, "Int32" }, { y, "Int32" } }) -end - -WPos.New = function(x, y, z) - if z == nil then - z = 0 - end - return OpenRA.New("WPos", { { x, "Int32" }, { y, "Int32" }, { z, "Int32" } }) -end - -WPos.FromCPos = function(location) - return WPos.New(location.X * 1024, location.Y * 1024, 0) -end - -CVec.New = function(x, y) - return OpenRA.New("CVec", { { x, "Int32" }, { y, "Int32" } }) -end - -WVec.New = function(x, y, z) - if z == nil then - z = 0 - end - return OpenRA.New("WVec", { { x, "Int32" }, { y, "Int32" }, { z, "Int32" } }) -end - -WRange.New = function(r) - return OpenRA.New("WRange", { { r, "Int32" } }) -end - -WRange.FromCells = function(cells) - return WRange.New(cells * 1024) -end diff --git a/mods/common/lua/media.lua b/mods/common/lua/media.lua deleted file mode 100644 index 7400551f46..0000000000 --- a/mods/common/lua/media.lua +++ /dev/null @@ -1,20 +0,0 @@ -Media = { } - -Media.PlaySpeechNotification = function(notification, player) - Internal.PlaySpeechNotification(player, notification) -end - -Media.PlaySoundNotification = function(notification, player) - Internal.PlaySoundNotification(player, notification) -end - -Media.PlayRandomMusic = function() - Internal.PlayRandomMusic() -end - -Media.PlayMovieFullscreen = function(movie, onComplete) - if onComplete == nil then - onComplete = function() end - end - Internal.PlayMovieFullscreen(movie, onComplete) -end \ No newline at end of file diff --git a/mods/common/lua/mission.lua b/mods/common/lua/mission.lua deleted file mode 100644 index ae942766ea..0000000000 --- a/mods/common/lua/mission.lua +++ /dev/null @@ -1,37 +0,0 @@ -Mission = { } - -Mission.MissionOver = function(winners, losers, setWinStates) - World:SetLocalPauseState(true) - World:set_PauseStateLocked(true) - if winners then - for i, player in ipairs(winners) do - Media.PlaySpeechNotification("Win", player) - if setWinStates then - OpenRA.SetWinState(player, "Won") - end - end - end - if losers then - for i, player in ipairs(losers) do - Media.PlaySpeechNotification("Lose", player) - if setWinStates then - OpenRA.SetWinState(player, "Lost") - end - end - end - Mission.MissionIsOver = true -end - -Mission.GetGroundAttackersOf = function(player) - return Utils.Where(Actor.ActorsWithTrait("AttackBase"), function(actor) - return not Actor.IsDead(actor) and Actor.IsInWorld(actor) and Actor.Owner(actor) == player and Actor.HasTrait(actor, "Mobile") - end) -end - -Mission.TickTakeOre = function(player) - OpenRA.TakeOre(player, 0.01 * OpenRA.GetOreCapacity(player) / 25) -end - -Mission.RequiredUnitsAreDestroyed = function(player) - return Internal.RequiredUnitsAreDestroyed(player) -end \ No newline at end of file diff --git a/mods/common/lua/openra.lua b/mods/common/lua/openra.lua deleted file mode 100644 index 5d1fe6096e..0000000000 --- a/mods/common/lua/openra.lua +++ /dev/null @@ -1,83 +0,0 @@ -print = Internal.Debug - -OpenRA = { } - -OpenRA.New = function(className, args) - if args == nil then - args = { } - end - return Internal.New(className, args) -end - -OpenRA.RunAfterDelay = function(delay, func) - if func == nil then error("No function specified", 2) end - Internal.RunAfterDelay(delay, func) -end - -OpenRA.SetViewportCenterPosition = function(position) - WorldRenderer.Viewport:Center(position) -end - -OpenRA.GetViewportCenterPosition = function() - return WorldRenderer.Viewport.CenterPosition -end - -OpenRA.GetDifficulty = function() - return World.LobbyInfo.GlobalSettings.Difficulty -end - -OpenRA.IsSinglePlayer = function() - return World.LobbyInfo:get_IsSinglePlayer() -end - -OpenRA.GetPlayer = function(internalName) - return Utils.EnumerableFirstOrNil(World.Players, function(p) return p.InternalName == internalName end) -end - -OpenRA.GetPlayers = function(func) - return Utils.EnumerableWhere(World.Players, func) -end - -OpenRA.SetWinState = function(player, winState) - Internal.SetWinState(player, winState) -end - -OpenRA.GetRandomInteger = function(low, high) - if high <= low then - return low - else - return Internal.GetRandomInteger(low, high) - end -end - -OpenRA.TakeOre = function(player, amount) - Actor.Trait(player.PlayerActor, "PlayerResources"):TakeResources(amount) -end - -OpenRA.TakeCash = function(player, amount) - Actor.Trait(player.PlayerActor, "PlayerResources"):TakeCash(amount) -end - -OpenRA.GiveOre = function(player, amount) - Actor.Trait(player.PlayerActor, "PlayerResources"):GiveResources(amount) -end - -OpenRA.GiveCash = function(player, amount) - Actor.Trait(player.PlayerActor, "PlayerResources"):GiveCash(amount) -end - -OpenRA.CanGiveOre = function(player, amount) - return Actor.Trait(player.PlayerActor, "PlayerResources"):CanGiveResources(amount) -end - -OpenRA.GetOreCapacity = function(player) - return Actor.Trait(player.PlayerActor, "PlayerResources").ResourceCapacity -end - -OpenRA.GetOre = function(player) - return Actor.Trait(player.PlayerActor, "PlayerResources").Resources -end - -OpenRA.GetCash = function(player) - return Actor.Trait(player.PlayerActor, "PlayerResources").Cash -end diff --git a/mods/common/lua/production.lua b/mods/common/lua/production.lua deleted file mode 100644 index 09290015d3..0000000000 --- a/mods/common/lua/production.lua +++ /dev/null @@ -1,94 +0,0 @@ -Production = { } -Production.EventHandlers = { } - -Production.BuildWithSharedQueue = function(player, unit, amount) - Internal.BuildWithSharedQueue(player, unit, amount or 1) -end - -Production.BuildWithPerFactoryQueue = function(factory, unit, amount) - Internal.BuildWithPerFactoryQueue(factory, unit, amount or 1) -end - -Production.Build = function(factory, unit, amount) - if Actor.HasTrait(factory, "ProductionQueue") then - Production.BuildWithPerFactoryQueue(factory, unit, amount) - elseif Actor.HasTrait(factory, "Production") then - Production.SetPrimaryBuilding(factory) - Production.BuildWithSharedQueue(Actor.Owner(factory), unit, amount) - else - error("Production.Build: not a factory") - end -end - -Production.SharedQueueIsBusy = function(player, category) - return Internal.SharedQueueIsBusy(player, category) -end - -Production.PerFactoryQueueIsBusy = function(factory) - return Internal.PerFactoryQueueIsBusy(factory) -end - -Production.SetRallyPoint = function(factory, location) - local srp = Actor.Trait(factory, "RallyPoint") - if srp ~= nil then - srp.Location = location.Location - end -end - -Production.SetPrimaryBuilding = function(factory) - local pb = Actor.TraitOrDefault(factory, "PrimaryBuilding") - if pb ~= nil then - pb:SetPrimaryProducer(factory, true) - end -end - -Production.BuildTeamFromTemplate = function(player, template, func) - local factories = { } - Utils.Do(template, function(t) table.insert(factories, t[1]) end) - - if Utils.Any(factories, Actor.IsDead) then - return - end - - if Utils.Any(factories, function(fact) return Production.EventHandlers[fact] end) then - OpenRA.RunAfterDelay(Utils.Seconds(10), function() Production.BuildTeamFromTemplate(player, template, func) end) - return - end - - local team = Team.New({ }) - local teamSize = 0 - Utils.Do(template, function(t) teamSize = teamSize + #t[2] end) - - local eventHandler = function(unit) - Team.Add(team, unit) - - if #team.Actors >= teamSize then - func(team) - Utils.Do(factories, function(factory) - Production.EventHandlers[factory] = nil - end) - end - end - - Utils.Do(factories, function(factory) - Production.EventHandlers[factory] = eventHandler - end) - - Utils.Do(template, function(t) - Utils.Do(t[2], function(unit) - Production.Build(t[1], unit) - end) - end) -end - -Production.EventHandlers.Setup = function(player) - Utils.Do(Actor.ActorsWithTrait("Production"), function(factory) - if Actor.Owner(factory) == player then - Actor.OnProduced(factory, function(fact, unit) - if Production.EventHandlers[fact] then - Production.EventHandlers[fact](unit) - end - end) - end - end) -end diff --git a/mods/common/lua/reinforcements.lua b/mods/common/lua/reinforcements.lua deleted file mode 100644 index 7325acf014..0000000000 --- a/mods/common/lua/reinforcements.lua +++ /dev/null @@ -1,82 +0,0 @@ -Reinforcements = { } - -Reinforcements.Insert = function(owner, transportName, passengerNames, enterPath, exitPath) - local facing = { Map.GetFacing(CPos.op_Subtraction(enterPath[2], enterPath[1]), 0), "Int32" } - local center = WPos.op_Addition(Map.CenterOfCell(enterPath[1]), WVec.New(0, 0, Rules.InitialAltitude(transportName))) - local transport = Actor.Create(transportName, { Owner = owner, Location = enterPath[1], CenterPosition = center, Facing = facing }) - local cargo = Actor.Trait(transport, "Cargo") - local passengers = { } - - for i, passengerName in ipairs(passengerNames) do - local passenger = Actor.Create(passengerName, { AddToWorld = false, Owner = owner }) - passengers[i] = passenger - cargo:Load(transport, passenger) - end - - Utils.Do(Utils.Skip(enterPath, 1), function(l) Actor.ScriptedMove(transport, l) end) - Actor.AfterMove(transport) - Actor.UnloadCargo(transport, true) - Actor.Wait(transport, 25) - Utils.Do(exitPath, function(l) Actor.ScriptedMove(transport, l) end) - Actor.RemoveSelf(transport) - return transport, passengers -end - -Reinforcements.Extract = function(owner, transportName, passengerNames, enterPath, exitPath) - local facing = { Map.GetFacing(CPos.op_Subtraction(enterPath[2], enterPath[1]), 0), "Int32" } - local center = WPos.op_Addition(Map.CenterOfCell(enterPath[1]), WVec.New(0, 0, Rules.InitialAltitude(transportName))) - local transport = Actor.Create(transportName, { Owner = owner, Location = enterPath[1], CenterPosition = center, Facing = facing }) - local cargo = Actor.Trait(transport, "Cargo") - - Utils.Do(Utils.Skip(enterPath, 1), function(l) Actor.ScriptedMove(transport, l) end) - Actor.AfterMove(transport) - Actor.WaitFor(transport, function() - return Utils.All(passengerNames, function(passenger) return cargo.Passengers:Contains(passenger) end) - end) - - Actor.Wait(transport, 125) - Utils.Do(exitPath, function(l) Actor.ScriptedMove(transport, l) end) - Actor.RemoveSelf(transport) - return transport -end - -Reinforcements.Reinforce = function(owner, reinforcementNames, enterLocation, rallyPointLocation, interval, onCreateFunc) - local facing = { Map.GetFacing(CPos.op_Subtraction(rallyPointLocation, enterLocation), 0), "Int32" } - local reinforcements = { } - for i, reinforcementName in ipairs(reinforcementNames) do - local reinforcement = Actor.Create(reinforcementName, { AddToWorld = false, Owner = owner, Location = enterLocation, Facing = facing }) - reinforcements[i] = reinforcement - OpenRA.RunAfterDelay((i - 1) * interval, function() - World:Add(reinforcement) - Actor.MoveNear(reinforcement, rallyPointLocation, 2) - if onCreateFunc ~= nil then - onCreateFunc(reinforcement) - end - end) - end - return reinforcements -end - -Reinforcements.ReinforceWithCargo = function(owner, actorName, path, cargoNames, actionFunc) - local facing = { Map.GetFacing(CPos.op_Subtraction(path[2].Location, path[1].Location), 0), "Int32" } - local center = WPos.op_Addition(path[1].CenterPosition, WVec.New(0, 0, Rules.InitialAltitude(actorName))) - local actor = Actor.Create(actorName, { Owner = owner, Location = path[1].Location, CenterPosition = center, Facing = facing }) - local cargo = Actor.TraitOrDefault(actor, "Cargo") - local team = Team.New({}) - if cargo ~= nil and cargoNames ~= nil and #cargoNames > 0 then - local passengers = { } - - for i, cargoName in ipairs(cargoNames) do - local passenger = Actor.Create(cargoName, { AddToWorld = false, Owner = owner }) - Team.Add(team, passenger) - passengers[i] = passenger - cargo:Load(actor, passenger) - end - - end - - Utils.Do(Utils.Skip(path, 1), function(waypoint) Actor.ScriptedMove(actor, waypoint.Location) end) - - if actionFunc then actionFunc(actor, team) end - return actor, team -end diff --git a/mods/common/lua/rules.lua b/mods/common/lua/rules.lua deleted file mode 100644 index fe9f0fe86f..0000000000 --- a/mods/common/lua/rules.lua +++ /dev/null @@ -1,21 +0,0 @@ -Rules = { } - -Rules.HasTraitInfo = function(actorType, className) - return Internal.HasTraitInfo(actorType, className) -end - -Rules.TraitInfoOrDefault = function(actorType, className) - return Internal.TraitInfoOrDefault(actorType, className) -end - -Rules.TraitInfo = function(actorType, className) - return Internal.TraitInfo(actorType, className) -end - -Rules.InitialAltitude = function(actorType) - local ai = Rules.TraitInfoOrDefault(actorType, "AircraftInfo") - if ai ~= nil then - return ai.CruiseAltitude.Range - end - return 0 -end \ No newline at end of file diff --git a/mods/common/lua/supportpowers.lua b/mods/common/lua/supportpowers.lua deleted file mode 100644 index ac620f0120..0000000000 --- a/mods/common/lua/supportpowers.lua +++ /dev/null @@ -1,44 +0,0 @@ -SupportPowers = { } - -SupportPowers.Airstrike = function(owner, planeName, enterLocation, bombLocation) - local facing = { Map.GetFacing(CPos.op_Subtraction(bombLocation, enterLocation), 0), "Int32" } - local center = WPos.op_Addition(Map.CenterOfCell(enterLocation), WVec.New(0, 0, Rules.InitialAltitude(planeName))) - local plane = Actor.Create(planeName, { Location = enterLocation, Owner = owner, Facing = facing, CenterPosition = center }) - local bombLoc = Map.CenterOfCell(bombLocation) - Actor.Trait(plane, "AttackBomber"):SetTarget(bombLoc) - Actor.Fly(plane, bombLoc) - Actor.FlyOffMap(plane) - Actor.RemoveSelf(plane) - return plane -end - -SupportPowers.Paradrop = function(owner, planeName, passengerNames, enterLocation, dropLocation) - local facing = { Map.GetFacing(CPos.op_Subtraction(dropLocation, enterLocation), 0), "Int32" } - local center = WPos.op_Addition(Map.CenterOfCell(enterLocation), WVec.New(0, 0, Rules.InitialAltitude(planeName))) - local plane = Actor.Create(planeName, { Location = enterLocation, Owner = owner, Facing = facing, CenterPosition = center }) - Actor.Fly(plane, Map.CenterOfCell(dropLocation)) - Actor.Trait(plane, "ParaDrop"):SetLZ(dropLocation, true) - Actor.FlyOffMap(plane) - Actor.RemoveSelf(plane) - local cargo = Actor.Trait(plane, "Cargo") - local passengers = { } - for i, passengerName in ipairs(passengerNames) do - local passenger = Actor.Create(passengerName, { AddToWorld = false, Owner = owner }) - passengers[i] = passenger - cargo:Load(plane, passenger) - end - return plane, passengers -end - -SupportPowers.Chronoshift = function(unitLocationPairs, chronosphere, duration, killCargo) - duration = duration or -1 - killCargo = killCargo or true - Utils.Do(unitLocationPairs, function(pair) - local unit = pair[1] - local cell = pair[2] - local cs = Actor.TraitOrDefault(unit, "Chronoshiftable") - if cs ~= nil and cs:CanChronoshiftTo(unit, cell) then - cs:Teleport(unit, cell, duration, killCargo, chronosphere) - end - end) -end diff --git a/mods/common/lua/team.lua b/mods/common/lua/team.lua deleted file mode 100644 index 863e904019..0000000000 --- a/mods/common/lua/team.lua +++ /dev/null @@ -1,73 +0,0 @@ -Team = { } - -Team.New = function(actors) - local team = { } - team.Actors = actors - team.OnAllKilled = { } - team.OnAnyKilled = { } - team.OnAllRemovedFromWorld = { } - team.OnAnyRemovedFromWorld = { } - Team.Do(team, function(actor) Team.AddActorEventHandlers(team, actor) end) - return team -end - -Team.Add = function(team, actor) - table.insert(team.Actors, actor) - Team.AddActorEventHandlers(team, actor) -end - -Team.AddActorEventHandlers = function(team, actor) - Actor.OnKilled(actor, function() - Team.InvokeHandlers(team.OnAnyKilled) - if Team.AllAreDead(team) then Team.InvokeHandlers(team.OnAllKilled) end - end) - - Actor.OnRemovedFromWorld(actor, function() - Team.InvokeHandlers(team.OnAnyRemovedFromWorld) - if not Team.AnyAreInWorld(team) then Team.InvokeHandlers(team.OnAllRemovedFromWorld) end - end) -end - -Team.InvokeHandlers = function(event) - Utils.Do(event, function(handler) handler() end) -end - -Team.AllAreDead = function(team) - return Utils.All(team.Actors, Actor.IsDead) -end - -Team.AnyAreDead = function(team) - return Utils.Any(team.Actors, Actor.IsDead) -end - -Team.AllAreInWorld = function(team) - return Utils.All(team.Actors, Actor.IsInWorld) -end - -Team.AnyAreInWorld = function(team) - return Utils.Any(team.Actors, Actor.IsInWorld) -end - -Team.AddEventHandler = function(event, func) - table.insert(event, func) -end - -Team.Contains = function(team, actor) - return Utils.Any(team.Actors, function(a) return a == actor end) -end - -Team.Do = function(team, func) - Utils.Do(team.Actors, function(actor) - if not Actor.IsDead(actor) then - func(actor) - end - end) -end - -Team.Patrol = function(team, waypoints, wait, loop) - Team.Do(team, function(a) Actor.Patrol(a, waypoints, wait, loop) end) -end - -Team.PatrolUntil = function(team, waypoints, wait, func) - Team.Do(team, function(a) Actor.PatrolUntil(a, waypoints, wait, func) end) -end diff --git a/mods/common/lua/utils.lua b/mods/common/lua/utils.lua deleted file mode 100644 index 03f3ef0031..0000000000 --- a/mods/common/lua/utils.lua +++ /dev/null @@ -1,94 +0,0 @@ -Utils = { } - -Utils.Enumerate = function(netEnumerable) - local enum = netEnumerable:GetEnumerator() - return function() - if enum:MoveNext() then - return enum:get_Current() - end - end -end - -Utils.EnumerableFirstOrNil = function(netEnumerable, func) - for item in Utils.Enumerate(netEnumerable) do - if func(item) then - return item - end - end - return nil -end - -Utils.EnumerableWhere = function(netEnumerable, func) - local ret = { } - for item in Utils.Enumerate(netEnumerable) do - if func(item) then - table.insert(ret, item) - end - end - return ret -end - -Utils.EnumerableToTable = function(netEnumerable, func) - local ret = { } - for item in Utils.Enumerate(netEnumerable) do - table.insert(ret, item) - end - return ret -end - -Utils.Where = function(array, func) - local ret = { } - for i, item in ipairs(array) do - if func(item) then - table.insert(ret, item) - end - end - return ret -end - -Utils.All = function(array, func) - for i, item in ipairs(array) do - if not func(item) then - return false - end - end - return true -end - -Utils.Any = function(array, func) - for i, item in ipairs(array) do - if func(item) then - return true - end - end - return false -end - -Utils.Do = function(array, func) - for i, item in ipairs(array) do - func(item) - end -end - -Utils.Skip = function(array, n) - local ret = { } - for i, item in ipairs(array) do - if i > n then - table.insert(ret, item) - end - end - return ret -end - -Utils.TableToArray = function(luaTable) - return Internal.TableToArray(luaTable) -end - -Utils.Seconds = function(seconds) - local TicksPerSecond = 25 - return seconds * TicksPerSecond -end - -Utils.Minutes = function(minutes) - return Utils.Seconds(minutes * 60) -end diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml index 293fd183e8..1d35613ab1 100644 --- a/mods/d2k/mod.yaml +++ b/mods/d2k/mod.yaml @@ -91,7 +91,6 @@ ChromeLayout: ./mods/ra/chrome/musicplayer.yaml ./mods/d2k/chrome/tooltips.yaml ./mods/ra/chrome/assetbrowser.yaml - ./mods/ra/chrome/irc.yaml ./mods/ra/chrome/missionbrowser.yaml ./mods/ra/chrome/confirmation-dialogs.yaml @@ -153,28 +152,28 @@ ChromeMetrics: Fonts: Regular: - Font:./FreeSans.ttf + Font:./mods/common/FreeSans.ttf Size:14 Bold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:14 Title: Font:./mods/d2k/Dune2k.ttf Size:32 MediumBold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:18 BigBold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:24 Small: - Font:./FreeSans.ttf + Font:./mods/common/FreeSans.ttf Size:12 Tiny: - Font:./FreeSans.ttf + Font:./mods/common/FreeSans.ttf Size:10 TinyBold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:10 LuaScripts: diff --git a/mods/d2k/rules/defaults.yaml b/mods/d2k/rules/defaults.yaml index f0db34c4c1..661906e392 100644 --- a/mods/d2k/rules/defaults.yaml +++ b/mods/d2k/rules/defaults.yaml @@ -36,7 +36,6 @@ BodyOrientation: UpdatesPlayerStatistics: Huntable: - LuaScriptEvents: Demolishable: ScriptTriggers: GainsStatUpgrades: @@ -86,7 +85,6 @@ BodyOrientation: UpdatesPlayerStatistics: Huntable: - LuaScriptEvents: Demolishable: ScriptTriggers: GainsStatUpgrades: @@ -113,7 +111,6 @@ Tooltip: Name: Wreck BodyOrientation: - LuaScriptEvents: TargetableUnit: TargetTypes: Ground RequiresForceFire: yes @@ -144,7 +141,6 @@ ProximityCaptor: Types: Husk BodyOrientation: - LuaScriptEvents: ScriptTriggers: ^AircraftHusk: @@ -211,7 +207,6 @@ BodyOrientation: UpdatesPlayerStatistics: Huntable: - LuaScriptEvents: ScriptTriggers: DeathSounds: Parachutable: @@ -247,7 +242,6 @@ UpdatesPlayerStatistics: Huntable: AttackMove: - LuaScriptEvents: ScriptTriggers: GainsStatUpgrades: SelfHealing@ELITE: @@ -306,7 +300,6 @@ UpdatesPlayerStatistics: WithCrumbleOverlay: Huntable: - LuaScriptEvents: Demolishable: DamagedWithoutFoundation: ThrowsShrapnel: diff --git a/mods/modchooser/mod.yaml b/mods/modchooser/mod.yaml index 0d2981b346..4be6107424 100644 --- a/mods/modchooser/mod.yaml +++ b/mods/modchooser/mod.yaml @@ -31,22 +31,22 @@ ChromeMetrics: Fonts: Regular: - Font:./FreeSans.ttf + Font:./mods/common/FreeSans.ttf Size:14 Bold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:14 BigBold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:24 MediumBold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:18 Tiny: - Font:./FreeSans.ttf + Font:./mods/common/FreeSans.ttf Size:10 TinyBold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:10 LobbyDefaults: diff --git a/mods/ra/chrome/irc.yaml b/mods/ra/chrome/irc.yaml deleted file mode 100644 index 7926b90704..0000000000 --- a/mods/ra/chrome/irc.yaml +++ /dev/null @@ -1,69 +0,0 @@ -Container@SERVERBROWSER_IRC: - Logic: IrcLogic - Width: 700 - Height: 250 - Children: - Container@IRC_CONTAINER: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Children: - ScrollPanel@HISTORY_PANEL: - Width: 565 - Height: PARENT_BOTTOM - 30 - ItemSpacing: 5 - Label@HISTORY_TEMPLATE: - X: 5 - Width: 530 - Height: 25 - WordWrap: True - TextField@INPUT_BOX: - Y: PARENT_BOTTOM - 25 - Width: 565 - Height: 25 - ScrollPanel@NICKNAME_PANEL: - X: 570 - Width: 130 - Height: PARENT_BOTTOM - 30 - Label@NICKNAME_TEMPLATE: - X: 5 - Button@DISCONNECT_BUTTON: - X: 570 - Y: PARENT_BOTTOM - 25 - Width: 130 - Height: 25 - Text: Disconnect - Font: Bold - Background@IRC_CONNECT_BG: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Background: scrollpanel-bg - Children: - Label@GLOBAL_CHAT_LABEL: - Y: PARENT_BOTTOM / 4 - Width: PARENT_RIGHT - Align: Center - Text: Global Chat - Font: Bold - Label@NICKNAME_LABEL: - X: 200 - Y: PARENT_BOTTOM / 4 + 35 - Text: Nickname: - TextField@NICKNAME_BOX: - X: 270 - Y: PARENT_BOTTOM / 4 + 25 - Width: 150 - Height: 25 - Checkbox@CONNECT_AUTOMATICALLY_CHECKBOX: - X: 270 - Y: PARENT_BOTTOM / 4 + 75 - Height: 20 - Width: 180 - Text: Connect Automatically - Button@CONNECT_BUTTON: - X: 430 - Y: PARENT_BOTTOM / 4 + 25 - Width: 100 - Height: 25 - Text: Connect - Font: Bold - diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index 1231ab89f2..6d631ef7ba 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -104,7 +104,6 @@ ChromeLayout: ./mods/ra/chrome/musicplayer.yaml ./mods/ra/chrome/tooltips.yaml ./mods/ra/chrome/assetbrowser.yaml - ./mods/ra/chrome/irc.yaml ./mods/ra/chrome/missionbrowser.yaml ./mods/ra/chrome/confirmation-dialogs.yaml @@ -169,28 +168,28 @@ ChromeMetrics: Fonts: Regular: - Font:./FreeSans.ttf + Font:./mods/common/FreeSans.ttf Size:14 Bold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:14 Title: Font:./mods/ra/ZoodRangmah.ttf Size:48 MediumBold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:18 BigBold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:24 Small: - Font:./FreeSans.ttf + Font:./mods/common/FreeSans.ttf Size:12 Tiny: - Font:./FreeSans.ttf + Font:./mods/common/FreeSans.ttf Size:10 TinyBold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:10 LuaScripts: diff --git a/mods/ra/rules/defaults.yaml b/mods/ra/rules/defaults.yaml index 2ca4addc2f..51c9356b1d 100644 --- a/mods/ra/rules/defaults.yaml +++ b/mods/ra/rules/defaults.yaml @@ -46,7 +46,6 @@ EjectInAir: false AllowUnsuitableCell: false Huntable: - LuaScriptEvents: Capturable: Type: vehicle CaptureThreshold: 1 @@ -117,7 +116,6 @@ EjectInAir: false AllowUnsuitableCell: false Huntable: - LuaScriptEvents: Capturable: Type: vehicle CaptureThreshold: 1 @@ -199,7 +197,6 @@ Upgrades: hospitalheal Prerequisites: hosp Huntable: - LuaScriptEvents: ScriptTriggers: DeathSounds@NORMAL: DeathTypes: 1, 2, 3, 4 @@ -259,7 +256,6 @@ Tooltip: GenericName: Ship Huntable: - LuaScriptEvents: ScriptTriggers: GainsStatUpgrades: SelfHealing@ELITE: @@ -311,7 +307,6 @@ Tooltip: GenericName: Plane Huntable: - LuaScriptEvents: ScriptTriggers: GainsStatUpgrades: SelfHealing@ELITE: @@ -383,7 +378,6 @@ GpsDot: String: Structure Huntable: - LuaScriptEvents: Demolishable: ScriptTriggers: UpgradeManager: @@ -435,7 +429,6 @@ Guardable: BodyOrientation: FrozenUnderFog: - LuaScriptEvents: ScriptTriggers: ^TechBuilding: @@ -544,7 +537,6 @@ BodyOrientation: FrozenUnderFog: StartsRevealed: true - LuaScriptEvents: ScriptTriggers: ^Husk: @@ -563,7 +555,6 @@ BelowUnits: BodyOrientation: Chronoshiftable: - LuaScriptEvents: TargetableUnit: TargetTypes: Ground RequiresForceFire: true @@ -621,7 +612,6 @@ Type: Concrete AutoTargetIgnore: BodyOrientation: - LuaScriptEvents: ScriptTriggers: ^Rock: @@ -643,7 +633,6 @@ BodyOrientation: FrozenUnderFog: StartsRevealed: true - LuaScriptEvents: ScriptTriggers: ^DesertCivBuilding: diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml index e345c84989..f8ff1b45d4 100644 --- a/mods/ts/mod.yaml +++ b/mods/ts/mod.yaml @@ -133,7 +133,6 @@ ChromeLayout: ./mods/ra/chrome/musicplayer.yaml ./mods/ra/chrome/tooltips.yaml ./mods/ra/chrome/assetbrowser.yaml - ./mods/ra/chrome/irc.yaml ./mods/ra/chrome/missionbrowser.yaml ./mods/ra/chrome/confirmation-dialogs.yaml @@ -197,25 +196,25 @@ ChromeMetrics: Fonts: Regular: - Font:./FreeSans.ttf + Font:./mods/common/FreeSans.ttf Size:14 Bold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:14 Title: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:32 BigBold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:24 Small: - Font:./FreeSans.ttf + Font:./mods/common/FreeSans.ttf Size:12 Tiny: - Font:./FreeSans.ttf + Font:./mods/common/FreeSans.ttf Size:10 TinyBold: - Font:./FreeSansBold.ttf + Font:./mods/common/FreeSansBold.ttf Size:10 LuaScripts: diff --git a/mods/ts/rules/defaults.yaml b/mods/ts/rules/defaults.yaml index ec4f85a01c..b2bf081521 100644 --- a/mods/ts/rules/defaults.yaml +++ b/mods/ts/rules/defaults.yaml @@ -40,7 +40,6 @@ Range: 3 BodyOrientation: Huntable: - LuaScriptEvents: Demolishable: ScriptTriggers: WithMakeAnimation: @@ -84,7 +83,6 @@ SellSounds: cashturn.aud UpdatesPlayerStatistics: BodyOrientation: - LuaScriptEvents: Demolishable: ScriptTriggers: UpgradeManager: @@ -158,7 +156,6 @@ Guardable: BodyOrientation: Huntable: - LuaScriptEvents: ScriptTriggers: DeathSounds@NORMAL: DeathTypes: 1, 2, 3 @@ -255,7 +252,6 @@ BodyOrientation: CameraPitch: 90 Huntable: - LuaScriptEvents: ScriptTriggers: Explodes: Weapon: UnitExplodeSmall @@ -328,7 +324,6 @@ BodyOrientation: CameraPitch: 90 Huntable: - LuaScriptEvents: ScriptTriggers: Explodes: Weapon: UnitExplodeSmall @@ -388,7 +383,6 @@ BodyOrientation: CameraPitch: 90 Huntable: - LuaScriptEvents: ScriptTriggers: Guard: Guardable: @@ -408,7 +402,6 @@ BodyOrientation: FrozenUnderFog: StartsRevealed: true - LuaScriptEvents: SeedsResource: ResourceType: Tiberium Interval: 55 diff --git a/packaging/package-all.sh b/packaging/package-all.sh index 9877f6a26d..3944fc59e4 100755 --- a/packaging/package-all.sh +++ b/packaging/package-all.sh @@ -31,11 +31,9 @@ markdown Lua-API.md > Lua-API.html # List of files that are packaged on all platforms FILES=('OpenRA.Game.exe' 'OpenRA.Editor.exe' 'OpenRA.Utility.exe' 'OpenRA.CrashDialog.exe' \ -'OpenRA.Renderer.Sdl2.dll' 'OpenRA.Renderer.Null.dll' 'OpenRA.Irc.dll' \ -'FreeSans.ttf' 'FreeSansBold.ttf' 'lua' \ -'glsl' 'mods/common' 'mods/ra' 'mods/cnc' 'mods/d2k' 'mods/modchooser' \ -'AUTHORS' 'COPYING' \ -'README.html' 'CONTRIBUTING.html' 'DOCUMENTATION.html' 'CHANGELOG.html' \ +'OpenRA.Renderer.Sdl2.dll' 'OpenRA.Renderer.Null.dll' \ + 'lua' 'glsl' 'mods/common' 'mods/ra' 'mods/cnc' 'mods/d2k' 'mods/modchooser' \ +'AUTHORS' 'COPYING' 'README.html' 'CONTRIBUTING.html' 'DOCUMENTATION.html' 'CHANGELOG.html' \ 'global mix database.dat' 'GeoLite2-Country.mmdb') echo "Copying files..." @@ -58,11 +56,7 @@ cp thirdparty/SDL2-CS* packaging/built # Mono.NAT for UPnP support cp thirdparty/Mono.Nat.dll packaging/built -# (legacy) Lua -cp thirdparty/KopiLua.dll packaging/built -cp thirdparty/NLua.dll packaging/built - -# Eluant (new lua) +# Eluant (Lua integration) cp thirdparty/Eluant* packaging/built # GeoIP database access diff --git a/packaging/windows/OpenRA.nsi b/packaging/windows/OpenRA.nsi index 6e015620ec..9b5dfebb9f 100644 --- a/packaging/windows/OpenRA.nsi +++ b/packaging/windows/OpenRA.nsi @@ -70,7 +70,6 @@ Section "Game" GAME File "${SRCDIR}\OpenRA.CrashDialog.exe" File "${SRCDIR}\OpenRA.Renderer.Null.dll" File "${SRCDIR}\OpenRA.Renderer.Sdl2.dll" - File "${SRCDIR}\OpenRA.Irc.dll" File "${SRCDIR}\ICSharpCode.SharpZipLib.dll" File "${SRCDIR}\FuzzyLogicLibrary.dll" File "${SRCDIR}\Mono.Nat.dll" @@ -80,7 +79,6 @@ Section "Game" GAME File "${SRCDIR}\CHANGELOG.html" File "${SRCDIR}\CONTRIBUTING.html" File "${SRCDIR}\DOCUMENTATION.html" - File "${SRCDIR}\*.ttf" File "${SRCDIR}\OpenRA.ico" File "${SRCDIR}\SharpFont.dll" File "${SRCDIR}\SDL2-CS.dll" @@ -90,8 +88,6 @@ Section "Game" GAME File "${SRCDIR}\Newtonsoft.Json.dll" File "${SRCDIR}\RestSharp.dll" File "${SRCDIR}\GeoLite2-Country.mmdb" - File "${SRCDIR}\KopiLua.dll" - File "${SRCDIR}\NLua.dll" File "${SRCDIR}\eluant.dll" File "${DEPSDIR}\soft_oal.dll" File "${DEPSDIR}\SDL2.dll" @@ -192,7 +188,6 @@ Function ${UN}Clean Delete $INSTDIR\OpenRA.Editor.exe Delete $INSTDIR\OpenRA.Renderer.Null.dll Delete $INSTDIR\OpenRA.Renderer.Sdl2.dll - Delete $INSTDIR\OpenRA.Irc.dll Delete $INSTDIR\ICSharpCode.SharpZipLib.dll Delete $INSTDIR\FuzzyLogicLibrary.dll Delete $INSTDIR\Mono.Nat.dll @@ -204,7 +199,6 @@ Function ${UN}Clean Delete $INSTDIR\CONTRIBUTING.html Delete $INSTDIR\DOCUMENTATION.html Delete $INSTDIR\OpenRA.ico - Delete $INSTDIR\*.ttf Delete "$INSTDIR\global mix database.dat" Delete $INSTDIR\MaxMind.Db.dll Delete $INSTDIR\MaxMind.GeoIP2.dll @@ -212,8 +206,6 @@ Function ${UN}Clean Delete $INSTDIR\RestSharp.dll Delete $INSTDIR\GeoLite2-Country.mmdb Delete $INSTDIR\KopiLua.dll - Delete $INSTDIR\NLua.dll - Delete $INSTDIR\SDL2-CS.dll Delete $INSTDIR\soft_oal.dll Delete $INSTDIR\SDL2.dll Delete $INSTDIR\lua51.dll diff --git a/thirdparty/KopiLua.dll b/thirdparty/KopiLua.dll deleted file mode 100644 index 5b7b8daa0a..0000000000 Binary files a/thirdparty/KopiLua.dll and /dev/null differ diff --git a/thirdparty/NLua.dll b/thirdparty/NLua.dll deleted file mode 100644 index c243e85849..0000000000 Binary files a/thirdparty/NLua.dll and /dev/null differ