Skip to content

Commit 3b17eb4

Browse files
committed
Fix for 188
1 parent 65bb71a commit 3b17eb4

5 files changed

Lines changed: 14 additions & 10 deletions

File tree

‎Torch.Mod/TorchModCore.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Torch.Mod
1010
[MySessionComponentDescriptor(MyUpdateOrder.AfterSimulation)]
1111
public class TorchModCore : MySessionComponentBase
1212
{
13-
public const long MOD_ID = 1406994352;
13+
public const ulong MOD_ID = 1406994352;
1414
private static bool _init;
1515

1616
public override void UpdateAfterSimulation()

‎Torch.Server/ViewModels/SessionSettingsViewModel.cs‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ public class SessionSettingsViewModel : ViewModel
143143
[Torch.Views.Display(Description = "Enables in game scripts.", Name = "Enable Ingame Scripts", GroupName = "Others")]
144144
public bool EnableIngameScripts { get => _settings.EnableIngameScripts; set => SetValue(ref _settings.EnableIngameScripts, value); }
145145

146-
[Torch.Views.Display(Description = "", Name = "Flora Density", GroupName = "Environment")]
147-
public int FloraDensity { get => _settings.FloraDensity; set => SetValue(ref _settings.FloraDensity, value); }
146+
[Torch.Views.Display(Description = "", Name = "Flora Density Multiplier", GroupName = "Environment")]
147+
public float FloraDensityMultiplier { get => _settings.FloraDensityMultiplier; set => SetValue(ref _settings.FloraDensityMultiplier, value); }
148148

149149
[Torch.Views.Display(Description = "Enables tool shake feature.", Name = "Enable Tool Shake", GroupName = "Players")]
150150
[DefaultValue(false)]
@@ -164,10 +164,7 @@ public class SessionSettingsViewModel : ViewModel
164164

165165
[Torch.Views.Display(Description = "Enables random encounters in the world.", Name = "Enable Encounters", GroupName = "NPCs")]
166166
public bool EnableEncounters { get => _settings.EnableEncounters; set => SetValue(ref _settings.EnableEncounters, value); }
167-
168-
[Torch.Views.Display(Description = "", Name = "Enable Flora", GroupName = "Environment")]
169-
public bool EnableFlora { get => _settings.EnableFlora; set => SetValue(ref _settings.EnableFlora, value); }
170-
167+
171168
[Torch.Views.Display(Description = "Enables possibility of converting grid to station.", Name = "Enable Convert to Station", GroupName = "Others")]
172169
public bool EnableConvertToStation { get => _settings.EnableConvertToStation; set => SetValue(ref _settings.EnableConvertToStation, value); }
173170

‎Torch/Collections/MtObservableCollectionBase.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,5 +343,8 @@ public IEnumerator<TV> GetEnumerator()
343343

344344
/// <inheritdoc/>
345345
bool ICollection.IsSynchronized => true;
346+
347+
/// <inheritdoc/>
348+
int ICollection.Count => Count;
346349
}
347350
}

‎Torch/Managers/NetworkManager/NetworkManager.cs‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using VRage;
1414
using VRage.Library.Collections;
1515
using VRage.Network;
16+
using VRageMath;
1617

1718
namespace Torch.Managers
1819
{
@@ -116,7 +117,7 @@ public override void Detach()
116117
}
117118

118119
#region Network Intercept
119-
120+
120121
//TODO: Change this to a method patch so I don't have to try to keep up with Keen.
121122
/// <summary>
122123
/// This is the main body of the network intercept system. When messages come in from clients, they are processed here
@@ -150,7 +151,10 @@ private void OnEvent(MyPacket packet)
150151
//this value is unused, but removing this line corrupts the rest of the stream
151152
var blockedNetworkId = stream.ReadNetworkId();
152153
var eventId = (uint)stream.ReadUInt16();
153-
154+
bool flag = stream.ReadBool();
155+
Vector3D? position = new Vector3D?();
156+
if (flag)
157+
position = new Vector3D?(stream.ReadVector3D());
154158

155159
CallSite site;
156160
object obj;

‎Torch/VRageGame.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ private void DoLoadSession(string sessionPath)
277277
MyObjectBuilder_Checkpoint checkpoint = MyLocalCache.LoadCheckpoint(sessionPath, out checkpointSize);
278278
if (MySession.IsCompatibleVersion(checkpoint))
279279
{
280-
if (MyWorkshop.DownloadWorldModsBlocking(checkpoint.Mods).Success)
280+
if (MyWorkshop.DownloadWorldModsBlocking(checkpoint.Mods, null).Success)
281281
{
282282
// MySpaceAnalytics.Instance.SetEntry(MyGameEntryEnum.Load);
283283
MySession.Load(sessionPath, checkpoint, checkpointSize);

0 commit comments

Comments
 (0)