Skip to content

Commit

Permalink
Smol fix to ConsoleCommand Handler. Fix for TeamRespawn event. Fix fo…
Browse files Browse the repository at this point in the history
…r SM version string being visible. Fix for exiled_debug config value. Fix installer.
  • Loading branch information
joker-119 committed Jan 19, 2020
1 parent fe2c1c5 commit 35cd0b2
Show file tree
Hide file tree
Showing 8 changed files with 272 additions and 91 deletions.
347 changes: 261 additions & 86 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,86 +1,261 @@
/.idea/.idea.EXILED/.idea/.name
/.idea/.idea.EXILED/.idea/vcs.xml
/.idea/.idea.EXILED/.idea/contentModel.xml
/EXILED_Main/.idea/.idea.ModuleLoader.dir/.idea/contentModel.xml
/.idea/.idea.EXILED/.idea/discord.xml
/EXILED_Main/.idea/.idea.ModuleLoader.dir/.idea/discord.xml
/EXILED.sln.DotSettings.user
/.idea/.idea.EXILED/.idea/indexLayout.xml
/EXILED_Main/.idea/.idea.ModuleLoader.dir/.idea/indexLayout.xml
/.idea/.idea.EXILED/.idea/modules.xml
/EXILED_Main/.idea/.idea.ModuleLoader.dir/.idea/modules.xml
/.idea/.idea.EXILED/riderModule.iml
/EXILED_Main/.idea/.idea.ModuleLoader.dir/.idea/projectSettingsUpdater.xml
/.idea/.idea.EXILED/.idea/projectSettingsUpdater.xml
/EXILED_Main/.idea/.idea.ModuleLoader.dir/riderModule.iml
/EXILED_Main/.idea/.idea.ModuleLoader.dir/.idea/workspace.xml
/.idea/.idea.EXILED/.idea/.gitignore
/bin/EXILED/0Harmony.dll
/bin/EXILED/Assembly-CSharp-firstpass.dll
/bin/EXILED/Assembly-CSharp_publicized.dll
/bin/EXILED/BouncyCastle.Crypto.dll
/bin/EXILED/DissonanceVoip.dll
/bin/EXILED/EXILED.dll
/EXILED_Main/obj/Debug/EXILED.dll
/bin/EXILED/EXILED.pdb
/EXILED_Main/obj/Debug/EXILED.pdb
/EXILED_Events/obj/Debug/EXILED_Events.csproj.CopyComplete
/EXILED_Events/obj/Debug/EXILED_Events.csproj.FileListAbsolute.txt
/bin/EXILED/EXILED_Events.dll
/EXILED_Events/obj/Debug/EXILED_Events.dll
/bin/EXILED/EXILED_Events.pdb
/EXILED_Events/obj/Debug/EXILED_Events.pdb
/EXILED_Main/obj/Debug/EXILED_Main.csproj.CopyComplete
/EXILED_Main/obj/Debug/EXILED_Main.csproj.FileListAbsolute.txt
/bin/EXILED/Facepunch.Steamworks.Win64.dll
/bin/EXILED/Mirror.Authenticators.dll
/bin/EXILED/Mirror.Components.dll
/bin/EXILED/Mirror.dll
/bin/EXILED/Mono.Nat.dll
/bin/EXILED/Newtonsoft.Json.dll
/bin/EXILED/System.Diagnostics.StackTrace.dll
/bin/EXILED/System.Globalization.Extensions.dll
/bin/EXILED/Unity.TextMeshPro.dll
/bin/EXILED/UnityEngine.AIModule.dll
/bin/EXILED/UnityEngine.AndroidJNIModule.dll
/bin/EXILED/UnityEngine.AnimationModule.dll
/bin/EXILED/UnityEngine.AssetBundleModule.dll
/bin/EXILED/UnityEngine.AudioModule.dll
/bin/EXILED/UnityEngine.CoreModule.dll
/bin/EXILED/UnityEngine.DirectorModule.dll
/bin/EXILED/UnityEngine.dll
/bin/EXILED/UnityEngine.GridModule.dll
/bin/EXILED/UnityEngine.IMGUIModule.dll
/bin/EXILED/UnityEngine.InputLegacyModule.dll
/bin/EXILED/UnityEngine.InputModule.dll
/bin/EXILED/UnityEngine.Networking.dll
/bin/EXILED/UnityEngine.ParticleSystemModule.dll
/bin/EXILED/UnityEngine.Physics2DModule.dll
/bin/EXILED/UnityEngine.PhysicsModule.dll
/bin/EXILED/UnityEngine.ScreenCaptureModule.dll
/bin/EXILED/UnityEngine.SharedInternalsModule.dll
/bin/EXILED/UnityEngine.SubsystemsModule.dll
/bin/EXILED/UnityEngine.TerrainModule.dll
/bin/EXILED/UnityEngine.TerrainPhysicsModule.dll
/bin/EXILED/UnityEngine.TextCoreModule.dll
/bin/EXILED/UnityEngine.TextRenderingModule.dll
/bin/EXILED/UnityEngine.TilemapModule.dll
/bin/EXILED/UnityEngine.UI.dll
/bin/EXILED/UnityEngine.UIElementsModule.dll
/bin/EXILED/UnityEngine.UIModule.dll
/bin/EXILED/UnityEngine.UNETModule.dll
/bin/EXILED/UnityEngine.UnityAnalyticsModule.dll
/bin/EXILED/UnityEngine.UnityWebRequestAudioModule.dll
/bin/EXILED/UnityEngine.UnityWebRequestModule.dll
/bin/EXILED/UnityEngine.UnityWebRequestWWWModule.dll
/bin/EXILED/UnityEngine.VFXModule.dll
/bin/EXILED/UnityEngine.VideoModule.dll
/bin/EXILED/UnityEngine.VRModule.dll
/bin/EXILED/UnityEngine.XRModule.dll
/bin/EXILED/zxing.unity.dll
/EXILED_Installer/bin/Debug/EXILED.tar.gz
/EXILED_Installer/obj/Debug/EXILED_Installer.csproj.FileListAbsolute.txt
/EXILED_Installer/bin/Debug/EXILED_Installer.exe
/EXILED_Installer/obj/Debug/EXILED_Installer.exe
/EXILED_Installer/bin/Debug/EXILED_Installer.pdb
/EXILED_Installer/obj/Debug/EXILED_Installer.pdb
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/

# Visual Studio 2015 cache/options directory
.vs/
.vscode/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# DNX
project.lock.json
project.fragment.lock.json
artifacts/

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb

# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding add-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
#*.pubxml
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets

# Microsoft Azure Build Output
csx/
*.build.csdef

# Microsoft Azure Emulator
ecf/
rcf/

# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/

# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs

# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

# Node.js Tools for Visual Studio
.ntvs_analysis.dat

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe
paket-files/

# FAKE - F# Make
.fake/

# JetBrains Rider
.idea/
*.sln.iml

# CodeRush
.cr/

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
5 changes: 4 additions & 1 deletion EXILED_Events/Patches/GameConsoleQueryOverride.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ public static bool Prefix(RemoteAdmin.QueryProcessor __instance, ref string quer
{
ReferenceHub hub = ReferenceHub.GetHub(__instance.gameObject);
Events.InvokeConsoleCommand(hub, query, encrypted, out string returnMessage, out string color);
__instance.GCT.SendToClient(__instance.connectionToClient, returnMessage, color);
if (color == null)
color = "white";
if (!string.IsNullOrEmpty(returnMessage))
__instance.GCT.SendToClient(__instance.connectionToClient, returnMessage, color);
return false;
}
catch (Exception e)
Expand Down
2 changes: 1 addition & 1 deletion EXILED_Events/Patches/RespawnEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static bool Prefix(MTFRespawn __instance)
int r = EventPlugin.Gen.Next(100);
int maxRespawn = 15;
List<GameObject> toRespawn = players.Take(maxRespawn).ToList();
bool isChaos = r > 50;
bool isChaos = __instance.nextWaveIsCI;
Plugin.Debug($"Respawn: pre-vent list: {toRespawn.Count}");
Events.InvokeTeamRespawn(ref isChaos, ref maxRespawn, ref toRespawn);

Expand Down
Binary file not shown.
4 changes: 3 additions & 1 deletion EXILED_Installer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ public static void Main(string[] args)
Console.WriteLine("Extraction complete, moving files..");
string installPath = Path.Combine(args[0], "SCPSL_Data");
string path2 = Path.Combine(installPath, "Managed");
string fileName = Path.Combine(path2, "Assembly-CSharp.dll");
if (!Directory.Exists(args[0]))
throw new ArgumentException("The provided Managed folder does not exist.");
File.Move(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Assembly-CSharp.dll"), path2);
File.Delete(fileName);
File.Move(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Assembly-CSharp.dll"), fileName);

Console.WriteLine("Installation complete.");
}
Expand Down
1 change: 1 addition & 0 deletions EXILED_Main/MainLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public static void EntryPointForLoader()
if (!File.Exists(path))
File.Create(path).Close();
Plugin.Config = new YamlConfig(path);
Plugin.debug = Plugin.Config.GetBool("exiled_debug", false);

CustomNetworkManager.Modded = true;
Timing.RunCoroutine(PluginManager.LoadPlugins());
Expand Down
2 changes: 1 addition & 1 deletion EXILED_Main/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace EXILED
{
public abstract class Plugin
{
private static bool debug = ConfigFile.ServerConfig.GetBool("exiled_debug", false);
internal static bool debug = false;
public static YamlConfig Config;
public abstract string getName { get; }
public abstract void OnEnable();
Expand Down
Loading

0 comments on commit 35cd0b2

Please sign in to comment.