mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Rcon Command Changes
- moved the rcon commands to the gamedata files, so they can be extended.
This commit is contained in:
parent
f3ff807cd0
commit
e7100e6323
18 changed files with 266 additions and 152 deletions
|
|
@ -43,6 +43,7 @@ namespace ServerManagerTool.Utils
|
|||
data.Branches.AddRange(fileData.Branches);
|
||||
data.Events.AddRange(fileData.Events);
|
||||
data.OfficialMods.AddRange(fileData.OfficialMods);
|
||||
data.RconInputModes.AddRange(fileData.RconInputModes);
|
||||
|
||||
if (fileData.PlayerAdditionalLevels > 0 && fileData.PlayerAdditionalLevels > data.PlayerAdditionalLevels)
|
||||
data.PlayerAdditionalLevels = fileData.PlayerAdditionalLevels;
|
||||
|
|
@ -137,6 +138,9 @@ namespace ServerManagerTool.Utils
|
|||
[DataMember(IsRequired = false)]
|
||||
public List<OfficialModItem> OfficialMods = new List<OfficialModItem>();
|
||||
|
||||
[DataMember(IsRequired = false)]
|
||||
public List<RconInputModeItem> RconInputModes = new List<RconInputModeItem>();
|
||||
|
||||
public static MainGameData Load(string file, bool isUserData)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(file) || !File.Exists(file))
|
||||
|
|
@ -157,6 +161,7 @@ namespace ServerManagerTool.Utils
|
|||
data.Branches.ForEach(c => c.IsUserData = isUserData);
|
||||
data.Events.ForEach(c => c.IsUserData = isUserData);
|
||||
data.OfficialMods.ForEach(c => c.IsUserData = isUserData);
|
||||
data.RconInputModes.ForEach(c => c.IsUserData = isUserData);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
|
@ -300,4 +305,15 @@ namespace ServerManagerTool.Utils
|
|||
|
||||
public bool IsUserData = false;
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
public class RconInputModeItem
|
||||
{
|
||||
[DataMember]
|
||||
public string Command = string.Empty;
|
||||
[DataMember]
|
||||
public string Description = string.Empty;
|
||||
|
||||
public bool IsUserData = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue