Skip to content

Commit

Permalink
Update to Synapse 2.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
GrafDimenzio committed Feb 12, 2022
1 parent 4effb3c commit 4098f58
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 50 deletions.
4 changes: 2 additions & 2 deletions Scp079Rework/Commands/DeathCommand.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Linq;
using Synapse.Api;
using Synapse.Api;
using Synapse.Command;
using System.Linq;
using UnityEngine;

namespace Scp079Rework.Commands
Expand Down
32 changes: 14 additions & 18 deletions Scp079Rework/Commands/ScpCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using Synapse;
using Synapse.Api;
using Synapse.Command;
using System.Linq;
using UnityEngine;

namespace Scp079Rework.Commands
Expand Down Expand Up @@ -31,31 +31,27 @@ public CommandResult Execute(CommandContext context)
State = CommandResultState.Error
};

var cams = Map.Get.Cameras;
var scpCams = new List<Synapse.Api.Camera>();

foreach (var scp in Team.SCP.GetPlayers())
if (scp.RoleType != RoleType.Scp079)
scpCams.Add(cams.OrderBy(x => Vector3.Distance(x.GameObject.transform.position, scp.Position)).FirstOrDefault());

if(scpCams.Count > 0)
var scps = Server.Get.GetPlayers(x => x.TeamID == (int)Team.SCP && x.RoleType != RoleType.Scp079);
if(scps.Count > 0)
{
var cam = cams[UnityEngine.Random.Range(0, cams.Count)];
var scp = scps[Random.Range(0, scps.Count)];
var cams = Map.Get.Cameras.OrderBy(x => Vector3.Distance(x.GameObject.transform.position, scp.Position)).ToList();
cams = cams.Take(5).ToList();
var cam = cams[Random.Range(0, cams.Count)];

context.Player.Scp079Controller.Camera = cam;
return new CommandResult
{
Message = "You camera was switched near a other Scp",
State = CommandResultState.Ok
};
}
else

return new CommandResult
{
return new CommandResult
{
Message = "No Scp near a camera was found!",
State = CommandResultState.Error
};
}
Message = "No Scp near a camera was found!",
State = CommandResultState.Error
};
}
}
}
4 changes: 2 additions & 2 deletions Scp079Rework/Handlers/CommandHandler.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System;

namespace Scp079Rework.Handlers
{
Expand Down
6 changes: 3 additions & 3 deletions Scp079Rework/Handlers/EventHandlers.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Event = Synapse.Api.Events.EventHandler;
using UnityEngine;
using System;
using System.Linq;
using System;
using UnityEngine;
using Event = Synapse.Api.Events.EventHandler;

namespace Scp079Rework.Handlers
{
Expand Down
14 changes: 7 additions & 7 deletions Scp079Rework/Plugin/PluginClass.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using System.IO;
using System.Reflection;
using Scp079Rework.Handlers;
using Scp079Rework.Handlers;
using Synapse.Api.Plugin;
using Synapse.Translation;
using System;
using System.IO;
using System.Reflection;

namespace Scp079Rework
{
Expand All @@ -13,9 +13,9 @@ namespace Scp079Rework
Description = "A Plugin which gives Scp-079 a lot of new Features",
LoadPriority = 10,
SynapseMajor = 2,
SynapseMinor = 7,
SynapsePatch = 1,
Version = "v.2.2.0"
SynapseMinor = 8,
SynapsePatch = 3,
Version = "v.2.2.1"
)]
public class PluginClass : AbstractPlugin
{
Expand Down
2 changes: 1 addition & 1 deletion Scp079Rework/Plugin/PluginConfig.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Synapse.Config;
using System.ComponentModel;
using System.Collections.Generic;
using System.ComponentModel;
using UnityEngine;

namespace Scp079Rework
Expand Down
4 changes: 2 additions & 2 deletions Scp079Rework/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("2.2.1.0")]
[assembly: AssemblyFileVersion("2.2.1.0")]
20 changes: 10 additions & 10 deletions Scp079Rework/Scp079Rework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony, Version=2.1.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Lib.Harmony.2.1.1\lib\net472\0Harmony.dll</HintPath>
<Reference Include="0Harmony, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Lib.Harmony.2.2.0\lib\net472\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SynapseSL.2.7.1\lib\net472\Assembly-CSharp.dll</HintPath>
<HintPath>..\packages\SynapseSL.2.8.3-pre1\lib\net472\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SynapseSL.2.7.1\lib\net472\Assembly-CSharp-firstpass.dll</HintPath>
<HintPath>..\packages\SynapseSL.2.8.3-pre1\lib\net472\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="LiteDB, Version=5.0.11.0, Culture=neutral, PublicKeyToken=4ee40123013c9f27, processorArchitecture=MSIL">
<HintPath>..\packages\LiteDB.5.0.11\lib\net45\LiteDB.dll</HintPath>
</Reference>
<Reference Include="Mirror, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SynapseSL.2.7.1\lib\net472\Mirror.dll</HintPath>
<HintPath>..\packages\SynapseSL.2.8.3-pre1\lib\net472\Mirror.dll</HintPath>
</Reference>
<Reference Include="Synapse, Version=2.7.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SynapseSL.2.7.1\lib\net472\Synapse.dll</HintPath>
<Reference Include="Synapse, Version=2.8.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SynapseSL.2.8.3-pre1\lib\net472\Synapse.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -62,13 +62,13 @@
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SynapseSL.2.7.1\lib\net472\UnityEngine.dll</HintPath>
<HintPath>..\packages\SynapseSL.2.8.3-pre1\lib\net472\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SynapseSL.2.7.1\lib\net472\UnityEngine.CoreModule.dll</HintPath>
<HintPath>..\packages\SynapseSL.2.8.3-pre1\lib\net472\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SynapseSL.2.7.1\lib\net472\UnityEngine.PhysicsModule.dll</HintPath>
<HintPath>..\packages\SynapseSL.2.8.3-pre1\lib\net472\UnityEngine.PhysicsModule.dll</HintPath>
</Reference>
<Reference Include="YamlDotNet, Version=11.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
<HintPath>..\packages\YamlDotNet.11.2.1\lib\net45\YamlDotNet.dll</HintPath>
Expand Down
4 changes: 2 additions & 2 deletions Scp079Rework/Scp079Robot.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Collections.Generic;
using Synapse.Api;
using Synapse.Api;
using System.Collections.Generic;

namespace Scp079Rework
{
Expand Down
2 changes: 1 addition & 1 deletion Scp079Rework/Scp079SynapseCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Synapse.Command;
using System;
using System.Linq;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using CommandHandler = Scp079Rework.Handlers.CommandHandler;

Expand Down
4 changes: 2 additions & 2 deletions Scp079Rework/packages.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Lib.Harmony" version="2.1.1" targetFramework="net472" />
<package id="Lib.Harmony" version="2.2.0" targetFramework="net472" />
<package id="LiteDB" version="5.0.11" targetFramework="net472" />
<package id="SynapseSL" version="2.7.1" targetFramework="net472" />
<package id="SynapseSL" version="2.8.3-pre1" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0-rc.2.21480.5" targetFramework="net472" />
<package id="YamlDotNet" version="11.2.1" targetFramework="net472" />
</packages>

0 comments on commit 4098f58

Please sign in to comment.