public static void SaveGroups() { if (FileHandler.FolderExists(GroupsPath)) { FileHandler.WriteToFile(GroupsFilePath, LunaXmlSerializer.SerializeToXml(Groups.Values.ToList())); } }
public static void GenerateNewModFile() { var defaultModFile = new ModControlStructure(); defaultModFile.SetDefaultAllowedParts(); FileHandler.WriteToFile(ServerContext.ModFilePath, LunaXmlSerializer.SerializeToXml(defaultModFile)); }
public static void GenerateNewModFile() { ModControlStructure defaultModFile = new ModControlStructure(); //defaultModFile.AllowedParts = new List<string>(DefaultAllowedParts); //defaultModFile.AllowedResources = new List<string>(DefaultAllowedResources); ModControl = defaultModFile; FileHandler.WriteToFile(ServerContext.ModFilePath, LunaXmlSerializer.SerializeToXml(defaultModFile)); }
public static void SendHandshakeReply(ClientStructure client, HandshakeReply enumResponse, string reason) { var msgData = ServerContext.ServerMessageFactory.CreateNewMessageData <HandshakeReplyMsgData>(); msgData.Response = enumResponse; msgData.Reason = reason; if (enumResponse == HandshakeReply.HandshookSuccessfully) { msgData.ModControl = GeneralSettings.SettingsStore.ModControl; msgData.ServerStartTime = TimeContext.StartTime.Ticks; if (GeneralSettings.SettingsStore.ModControl) { msgData.ModFileData = LunaXmlSerializer.SerializeToXml(ModFileSystem.ModControl); } } MessageQueuer.SendToClient <HandshakeSrvMsg>(client, msgData); }
public static void GenerateNewModFile() { FileHandler.WriteToFile(ServerContext.ModFilePath, LunaXmlSerializer.SerializeToXml(new ModControlStructure())); }