Compare commits
5 Commits
v1.0.39-ma
...
v1.0.43-ma
Author | SHA1 | Date | |
---|---|---|---|
![]() |
92db8994ef | ||
![]() |
aee36661fd | ||
![]() |
feda84fac8 | ||
![]() |
2503cd6372 | ||
![]() |
f321034eeb |
@@ -1,4 +1,3 @@
|
||||
[](https://discord.gg/trK6sYdcNE)
|
||||
[](https://ci.appveyor.com/project/zznty/torch/branch/master)
|
||||
|
||||
# What is Torch?
|
||||
@@ -17,6 +16,10 @@ Torch is the successor to SE Server Extender and gives server admins the tools t
|
||||
* .NET 6.0 runtime
|
||||
* Additional options & features
|
||||
|
||||
### Discord
|
||||
|
||||
If you have any questions or issues please join our [discord](https://discord.gg/UyYFSe3TyQ)
|
||||
|
||||
### Installation
|
||||
|
||||
* Unzip the Torch release into its own directory and run the executable. It will automatically download the SE DS and generate the other necessary files.
|
||||
|
@@ -140,12 +140,6 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="TorchService.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Update="TorchServiceInstaller.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Remove="ServerManager.cs" />
|
||||
<Compile Remove="ViewModels\SessionSettingsViewModel1.cs" />
|
||||
<Compile Remove="Views\WorldSelectControl.xaml.cs" />
|
||||
|
@@ -144,22 +144,17 @@ namespace Torch.Server.Views
|
||||
{
|
||||
//var w = new RoleEditor(_instanceManager.DedicatedConfig.SelectedWorld);
|
||||
//w.Show();
|
||||
var d = new RoleEditor();
|
||||
var w = _instanceManager.DedicatedConfig.SelectedWorld;
|
||||
|
||||
if(w.Checkpoint.PromotedUsers == null) {
|
||||
w.Checkpoint.PromotedUsers = new VRage.Serialization.SerializableDictionary<ulong, MyPromoteLevel>();
|
||||
}
|
||||
|
||||
if (w == null)
|
||||
if (w is null)
|
||||
{
|
||||
MessageBox.Show("A world is not selected.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (w.Checkpoint.PromotedUsers == null)
|
||||
w.Checkpoint.PromotedUsers = new SerializableDictionary<ulong, MyPromoteLevel>();
|
||||
d.Edit(w.Checkpoint.PromotedUsers.Dictionary);
|
||||
w.Checkpoint.PromotedUsers ??= new();
|
||||
|
||||
new RoleEditor().Edit(w.Checkpoint.PromotedUsers.Dictionary);
|
||||
_instanceManager.DedicatedConfig.Administrators = w.Checkpoint.PromotedUsers.Dictionary.Where(k => k.Value >= MyPromoteLevel.Admin).Select(k => k.Key.ToString()).ToList();
|
||||
}
|
||||
}
|
||||
|
@@ -103,27 +103,27 @@ namespace Torch.Patches
|
||||
private static bool PrefixWriteLine(MyLog __instance, string msg)
|
||||
{
|
||||
if (__instance.LogEnabled && _log.IsDebugEnabled)
|
||||
_log.Debug($"{" ".PadRight(3 * GetIndentByCurrentThread())}{msg}");
|
||||
_log.Debug($"{string.Empty.PadRight(3 * GetIndentByCurrentThread(), ' ')}{msg}");
|
||||
return false;
|
||||
}
|
||||
|
||||
private static bool PrefixWriteLineConsole(MyLog __instance, string msg)
|
||||
{
|
||||
if (__instance.LogEnabled && _log.IsInfoEnabled)
|
||||
_log.Info($"{" ".PadRight(3 * GetIndentByCurrentThread())}{msg}");
|
||||
_log.Info($"{string.Empty.PadRight(3 * GetIndentByCurrentThread(), ' ')}{msg}");
|
||||
return false;
|
||||
}
|
||||
|
||||
private static bool PrefixAppendToClosedLog(MyLog __instance, string text)
|
||||
{
|
||||
if (__instance.LogEnabled && _log.IsDebugEnabled)
|
||||
_log.Debug($"{" ".PadRight(3 * GetIndentByCurrentThread())}{text}");
|
||||
_log.Debug($"{string.Empty.PadRight(3 * GetIndentByCurrentThread(), ' ')}{text}");
|
||||
return false;
|
||||
}
|
||||
private static bool PrefixWriteLineOptions(MyLog __instance, string message, LoggingOptions option)
|
||||
{
|
||||
if (__instance.LogEnabled && __instance.LogFlag(option) && _log.IsDebugEnabled)
|
||||
_log.Info($"{" ".PadRight(3 * GetIndentByCurrentThread())}{message}");
|
||||
_log.Info($"{string.Empty.PadRight(3 * GetIndentByCurrentThread(), ' ')}{message}");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace Torch.Patches
|
||||
return false;
|
||||
|
||||
// ReSharper disable once TemplateIsNotCompileTimeConstantProblem
|
||||
_log.Log(new(LogLevelFor(severity), _log.Name, $"{" ".PadRight(3 * GetIndentByCurrentThread())}{string.Format(format, args)}"));
|
||||
_log.Log(new(LogLevelFor(severity), _log.Name, $"{string.Empty.PadRight(3 * GetIndentByCurrentThread(), ' ')}{string.Format(format, args)}"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
@@ -12,7 +11,6 @@ using System.Reflection.Emit;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using ProtoBuf;
|
||||
using Torch.Managers.PatchManager;
|
||||
using Torch.Managers.PatchManager.MSIL;
|
||||
using Torch.Utils;
|
||||
@@ -42,10 +40,14 @@ namespace Torch.Patches
|
||||
context.GetPattern(Register2Method).AddTranspiler(nameof(RegisterTranspiler));
|
||||
}
|
||||
|
||||
private static void WhitelistCtorPrefix(MyScriptCompiler scriptCompiler)
|
||||
private static void WhitelistCtorPrefix(MyScriptCompiler scriptCompiler, MyScriptWhitelist __instance)
|
||||
{
|
||||
var basePath = new FileInfo(typeof(object).Assembly.Location).DirectoryName!;
|
||||
|
||||
scriptCompiler.AddReferencedAssemblies(
|
||||
typeof(ValueType).Assembly.Location,
|
||||
Path.Combine(basePath, "netstandard.dll"),
|
||||
Path.Combine(basePath, "mscorlib.dll"),
|
||||
Path.Combine(basePath, "System.Runtime.dll"),
|
||||
typeof(LinkedList<>).Assembly.Location,
|
||||
typeof(Regex).Assembly.Location,
|
||||
typeof(Enumerable).Assembly.Location,
|
||||
@@ -55,6 +57,7 @@ namespace Torch.Patches
|
||||
typeof(TypeConverter).Assembly.Location,
|
||||
typeof(System.Diagnostics.TraceSource).Assembly.Location,
|
||||
typeof(ProtoBuf.Meta.RuntimeTypeModel).Assembly.Location,
|
||||
typeof(ProtoBuf.ProtoMemberAttribute).Assembly.Location,
|
||||
Path.Combine(MyFileSystem.ExePath, "Sandbox.Game.dll"),
|
||||
Path.Combine(MyFileSystem.ExePath, "Sandbox.Common.dll"),
|
||||
Path.Combine(MyFileSystem.ExePath, "Sandbox.Graphics.dll"),
|
||||
@@ -73,6 +76,9 @@ namespace Torch.Patches
|
||||
MyModWatchdog.Init(updateThread);
|
||||
MyScriptCompiler.Static.AddImplicitIngameNamespacesFromTypes(referencedTypes);
|
||||
MyScriptCompiler.Static.AddConditionalCompilationSymbols(symbols);
|
||||
using var batch = MyScriptCompiler.Static.Whitelist.OpenBatch();
|
||||
// Dict and queue in different assemblies, microsoft being microsoft
|
||||
batch.AllowNamespaceOfTypes(MyWhitelistTarget.ModApi, typeof(ConcurrentQueue<>));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -122,31 +122,6 @@
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="Views\CollectionEditor.xaml.cs">
|
||||
<DependentUpon>CollectionEditor.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Views\DictionaryEditor.xaml.cs">
|
||||
<DependentUpon>DictionaryEditor.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Views\EmbeddedCollectionEditor.xaml.cs">
|
||||
<DependentUpon>EmbeddedCollectionEditor.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Views\FlagsEditor.xaml.cs">
|
||||
<DependentUpon>FlagsEditor.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Views\ObjectCollectionEditor.xaml.cs">
|
||||
<DependentUpon>ObjectCollectionEditor.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Views\ObjectEditor.xaml.cs">
|
||||
<DependentUpon>ObjectEditor.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Views\PropertyGrid.xaml.cs">
|
||||
<DependentUpon>PropertyGrid.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="..\Versioning\AssemblyVersion.cs" Link="Properties/AssemblyVersion.cs" />
|
||||
<Compile Remove="Commands\Permissions\PermissionManager.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Torch.API\Torch.API.csproj" />
|
||||
</ItemGroup>
|
||||
|
Reference in New Issue
Block a user