Fix for 188

This commit is contained in:
Brant Martin
2018-10-23 16:23:52 -04:00
parent 65bb71aabf
commit 3b17eb4750
5 changed files with 14 additions and 10 deletions

View File

@@ -10,7 +10,7 @@ namespace Torch.Mod
[MySessionComponentDescriptor(MyUpdateOrder.AfterSimulation)]
public class TorchModCore : MySessionComponentBase
{
public const long MOD_ID = 1406994352;
public const ulong MOD_ID = 1406994352;
private static bool _init;
public override void UpdateAfterSimulation()

View File

@@ -143,8 +143,8 @@ namespace Torch.Server.ViewModels
[Torch.Views.Display(Description = "Enables in game scripts.", Name = "Enable Ingame Scripts", GroupName = "Others")]
public bool EnableIngameScripts { get => _settings.EnableIngameScripts; set => SetValue(ref _settings.EnableIngameScripts, value); }
[Torch.Views.Display(Description = "", Name = "Flora Density", GroupName = "Environment")]
public int FloraDensity { get => _settings.FloraDensity; set => SetValue(ref _settings.FloraDensity, value); }
[Torch.Views.Display(Description = "", Name = "Flora Density Multiplier", GroupName = "Environment")]
public float FloraDensityMultiplier { get => _settings.FloraDensityMultiplier; set => SetValue(ref _settings.FloraDensityMultiplier, value); }
[Torch.Views.Display(Description = "Enables tool shake feature.", Name = "Enable Tool Shake", GroupName = "Players")]
[DefaultValue(false)]
@@ -165,9 +165,6 @@ namespace Torch.Server.ViewModels
[Torch.Views.Display(Description = "Enables random encounters in the world.", Name = "Enable Encounters", GroupName = "NPCs")]
public bool EnableEncounters { get => _settings.EnableEncounters; set => SetValue(ref _settings.EnableEncounters, value); }
[Torch.Views.Display(Description = "", Name = "Enable Flora", GroupName = "Environment")]
public bool EnableFlora { get => _settings.EnableFlora; set => SetValue(ref _settings.EnableFlora, value); }
[Torch.Views.Display(Description = "Enables possibility of converting grid to station.", Name = "Enable Convert to Station", GroupName = "Others")]
public bool EnableConvertToStation { get => _settings.EnableConvertToStation; set => SetValue(ref _settings.EnableConvertToStation, value); }

View File

@@ -343,5 +343,8 @@ namespace Torch.Collections
/// <inheritdoc/>
bool ICollection.IsSynchronized => true;
/// <inheritdoc/>
int ICollection.Count => Count;
}
}

View File

@@ -13,6 +13,7 @@ using Torch.Utils;
using VRage;
using VRage.Library.Collections;
using VRage.Network;
using VRageMath;
namespace Torch.Managers
{
@@ -150,7 +151,10 @@ namespace Torch.Managers
//this value is unused, but removing this line corrupts the rest of the stream
var blockedNetworkId = stream.ReadNetworkId();
var eventId = (uint)stream.ReadUInt16();
bool flag = stream.ReadBool();
Vector3D? position = new Vector3D?();
if (flag)
position = new Vector3D?(stream.ReadVector3D());
CallSite site;
object obj;

View File

@@ -277,7 +277,7 @@ namespace Torch
MyObjectBuilder_Checkpoint checkpoint = MyLocalCache.LoadCheckpoint(sessionPath, out checkpointSize);
if (MySession.IsCompatibleVersion(checkpoint))
{
if (MyWorkshop.DownloadWorldModsBlocking(checkpoint.Mods).Success)
if (MyWorkshop.DownloadWorldModsBlocking(checkpoint.Mods, null).Success)
{
// MySpaceAnalytics.Instance.SetEntry(MyGameEntryEnum.Load);
MySession.Load(sessionPath, checkpoint, checkpointSize);