Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Commit 6fccb2a

Browse files
committed
Updated for SE 1.79
1 parent e136916 commit 6fccb2a

File tree

5 files changed

+17
-29
lines changed

5 files changed

+17
-29
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
//2390
1+
//2391
22
//
33
// This code was generated by a tool. Any changes made manually will be lost
44
// the next time this code is regenerated.
55
//
66

77
using System.Reflection;
88

9-
[assembly: AssemblyFileVersion("1.11.2.2390")]
10-
[assembly: AssemblyVersion("1.11.2.2390")]
9+
[assembly: AssemblyFileVersion("1.12.0.2391")]
10+
[assembly: AssemblyVersion("1.12.0.2391")]

EssentialsPlugin/AssemblyFileVersion.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929

3030
using System.Reflection;
3131

32-
[assembly: AssemblyFileVersion("1.11.2.<#= revisionNumber #>")]
33-
[assembly: AssemblyVersion("1.11.2.<#= revisionNumber #>")]
32+
[assembly: AssemblyFileVersion("1.12.0.<#= revisionNumber #>")]
33+
[assembly: AssemblyVersion("1.12.0.<#= revisionNumber #>")]

EssentialsPlugin/ChatHandlers/Utility/HandleUtilityExportServer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
namespace EssentialsPlugin.ChatHandlers
1717
{
18+
using VRage.FileSystem;
1819
using VRage.Library.Utils;
1920

2021
public class HandleUtilityExportServer : ChatHandlerBase

EssentialsPlugin/Settings/PluginSettings.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.IO;
66
using System.Linq;
77
using System.Xml.Serialization;
8-
using VRage.Common.Utils;
98
using System.ComponentModel;
109
using System.Reflection;
1110

@@ -16,8 +15,7 @@
1615

1716
namespace EssentialsPlugin
1817
{
19-
using NLog;
20-
using VRage.Library.Utils;
18+
using VRage.FileSystem;
2119

2220
[Serializable]
2321
public class PluginSettings

EssentialsPlugin/Utility/Player.cs

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,22 @@
1313
using Sandbox.Common.ObjectBuilders.Definitions;
1414

1515
using VRageMath;
16-
using VRage.Common.Utils;
1716

1817
using SEModAPIInternal.API.Entity;
1918
using SEModAPIInternal.API.Entity.Sector.SectorObject;
2019
using SEModAPIInternal.API.Entity.Sector.SectorObject.CubeGrid;
2120
using SEModAPIInternal.API.Entity.Sector.SectorObject.CubeGrid.CubeBlock;
2221

2322
using SEModAPIInternal.API.Common;
24-
using SEModAPIInternal.Support;
2523

2624
using EssentialsPlugin.UtilityClasses;
2725

2826
namespace EssentialsPlugin.Utility
2927
{
30-
using NLog;
31-
using VRage.Library.Utils;
28+
using VRage.FileSystem;
3229

3330
public static class Player
3431
{
35-
private static readonly Logger Log = LogManager.GetLogger( "PluginLog" );
3632
public static MyObjectBuilder_Character FindCharacter( string userName )
3733
{
3834
HashSet<IMyEntity> entities = new HashSet<IMyEntity>();
@@ -147,7 +143,7 @@ public static bool Move(string userName, Vector3D position)
147143
MyObjectBuilder_Character charEntity = FindCharacter(userName);
148144
if(charEntity == null)
149145
{
150-
Log.Info(string.Format("Unable to find CharacterEntity of '{0}'", userName));
146+
Essentials.Log.Info(string.Format("Unable to find CharacterEntity of '{0}'", userName));
151147
return false;
152148
}
153149

@@ -187,7 +183,7 @@ public static bool Move(string userName, Vector3D position)
187183

188184
if (gridEntity.IsLoading)
189185
{
190-
Log.Info(string.Format("Failed to load cockpit entity: {0}", gridEntity.EntityId));
186+
Essentials.Log.Info( "Failed to load cockpit entity: {0}", gridEntity.EntityId );
191187
return false;
192188
}
193189

@@ -264,9 +260,7 @@ internal static Object InvokeEntityMethod(Object gameEntity, string methodName,
264260
}
265261
catch (Exception ex)
266262
{
267-
Log.Info( "Failed to invoke entity method '{0}' on type '{1}': {2}", methodName, gameEntity.GetType().FullName, ex.Message );
268-
269-
Log.Error(ex);
263+
Essentials.Log.Error( ex );
270264
return null;
271265
}
272266
}
@@ -299,9 +293,7 @@ internal static MethodInfo GetEntityMethod(Object gameEntity, string methodName)
299293
}
300294
catch (Exception ex)
301295
{
302-
Log.Info("Failed to get entity method '" + methodName + "': " + ex.Message);
303-
304-
Log.Error(ex);
296+
Essentials.Log.Error(ex);
305297
return null;
306298
}
307299
}
@@ -337,9 +329,7 @@ internal static MethodInfo GetEntityMethod(Object gameEntity, string methodName,
337329
}
338330
catch (Exception ex)
339331
{
340-
Log.Info( "Failed to get entity method '{0}': {1}", methodName, ex.Message );
341-
342-
Log.Error(ex);
332+
Essentials.Log.Error(ex);
343333
return null;
344334
}
345335
}
@@ -384,7 +374,6 @@ public override int GetHashCode()
384374

385375
public class Players
386376
{
387-
private static readonly Logger Log = LogManager.GetLogger( "PluginLog" );
388377
private static volatile bool m_checking = false;
389378
private static Players m_instance;
390379
public static Players Instance
@@ -432,7 +421,7 @@ private static void Load()
432421
catch (Exception ex)
433422
{
434423
m_instance = new Players();
435-
Log.Error( ex );
424+
Essentials.Log.Error( ex );
436425
}
437426
}
438427

@@ -459,7 +448,7 @@ private void Save()
459448
}
460449
catch (Exception ex)
461450
{
462-
Log.Error( "Error saving player logins: {0}", ex );
451+
Essentials.Log.Error( "Error saving player logins: {0}", ex );
463452
}
464453
}
465454

@@ -580,7 +569,7 @@ public static void ProcessServerLogsForLogins(bool restart = false)
580569
string[] files = Directory.GetFiles(logPath, "SpaceEngineersDedicated_*.log");
581570
List<PlayerItem> playerItems = new List<PlayerItem>();
582571

583-
Log.Info(string.Format("Checking {0} log files for logins", files.Length));
572+
Essentials.Log.Info("Checking {0} log files for logins", files.Length);
584573
DateTime start = DateTime.Now;
585574
Parallel.ForEach(files, currentFile =>
586575
{
@@ -604,7 +593,7 @@ public static void ProcessServerLogsForLogins(bool restart = false)
604593
});
605594

606595
Instance.UpdatePlayers(playerItems);
607-
Log.Info( "Completed checking logs in {0}s: {2} ({1}) steamIds", (DateTime.Now - start).TotalSeconds, playerItems.Count, Instance.PlayerLogins.Count );
596+
Essentials.Log.Info( "Completed checking logs in {0}s: {2} ({1}) steamIds", (DateTime.Now - start).TotalSeconds, playerItems.Count, Instance.PlayerLogins.Count );
608597
}));
609598
}
610599
finally

0 commit comments

Comments
 (0)