Unstable 0.16.0.0

This commit is contained in:
Markus Isberg
2022-01-14 01:28:24 +09:00
parent d9baeaa2e1
commit 7d6421a548
237 changed files with 6430 additions and 2205 deletions
@@ -97,7 +97,7 @@ namespace Barotrauma.Networking
private readonly SerializableProperty property;
private readonly string typeString;
private readonly object parentObject;
public string Name
{
get { return property.Name; }
@@ -214,7 +214,7 @@ namespace Barotrauma.Networking
public void Write(IWriteMessage msg, object overrideValue = null)
{
if (overrideValue == null) overrideValue = property.GetValue(parentObject);
if (overrideValue == null) { overrideValue = Value; }
switch (typeString)
{
case "float":
@@ -314,6 +314,7 @@ namespace Barotrauma.Networking
{
NetPropertyData netPropertyData = new NetPropertyData(this, property, typeName);
UInt32 key = ToolBox.StringToUInt32Hash(property.Name, md5);
if (key == 0) { key++; } //0 is reserved to indicate the end of the netproperties section of a message
if (netProperties.ContainsKey(key)){ throw new Exception("Hashing collision in ServerSettings.netProperties: " + netProperties[key] + " has same key as " + property.Name + " (" + key.ToString() + ")"); }
netProperties.Add(key, netPropertyData);
}
@@ -717,13 +718,6 @@ namespace Barotrauma.Networking
set;
}
[Serialize("", true)]
public string CampaignSubmarines
{
get;
set;
}
private YesNoMaybe traitorsEnabled;
[Serialize(YesNoMaybe.No, true)]
public YesNoMaybe TraitorsEnabled
@@ -1067,7 +1061,6 @@ namespace Barotrauma.Networking
}
#if SERVER
MultiPlayerCampaign.UpdateCampaignSubs();
SelectNonHiddenSubmarine();
#endif
}