public void PatchServerLua() { LuaFilePatcher tmpPatcher = new LuaFilePatcher(AvailableCommandDefinitions); List <string> patchedLines = tmpPatcher.PatchServerLua(File.ReadAllLines(Path.Combine(ManagerSettings.AvorionFolder, "data", "scripts", "server", Constants.ServerLuaFileName)).ToList()); File.WriteAllLines(Path.Combine(ManagerSettings.AvorionFolder, "data", "scripts", "server", Constants.ServerLuaFileName), patchedLines); }
public void CleanServerLua() { List <string> cleanedLines = LuaFilePatcher.RemoveAsmPatches(File.ReadAllLines(Path.Combine(ManagerSettings.AvorionFolder, "data", "scripts", "server", Constants.ServerLuaFileName)).ToList()); File.WriteAllLines(Path.Combine(ManagerSettings.AvorionFolder, "data", "scripts", "server", Constants.ServerLuaFileName), cleanedLines); }