Skip to content

Commit 4098f58

Browse files
committed
Update to Synapse 2.8.3
1 parent 4effb3c commit 4098f58

11 files changed

+46
-50
lines changed

Scp079Rework/Commands/DeathCommand.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using System.Linq;
2-
using Synapse.Api;
1+
using Synapse.Api;
32
using Synapse.Command;
3+
using System.Linq;
44
using UnityEngine;
55

66
namespace Scp079Rework.Commands

Scp079Rework/Commands/ScpCommand.cs

+14-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
using System.Collections.Generic;
2-
using System.Linq;
1+
using Synapse;
32
using Synapse.Api;
43
using Synapse.Command;
4+
using System.Linq;
55
using UnityEngine;
66

77
namespace Scp079Rework.Commands
@@ -31,31 +31,27 @@ public CommandResult Execute(CommandContext context)
3131
State = CommandResultState.Error
3232
};
3333

34-
var cams = Map.Get.Cameras;
35-
var scpCams = new List<Synapse.Api.Camera>();
36-
37-
foreach (var scp in Team.SCP.GetPlayers())
38-
if (scp.RoleType != RoleType.Scp079)
39-
scpCams.Add(cams.OrderBy(x => Vector3.Distance(x.GameObject.transform.position, scp.Position)).FirstOrDefault());
40-
41-
if(scpCams.Count > 0)
34+
var scps = Server.Get.GetPlayers(x => x.TeamID == (int)Team.SCP && x.RoleType != RoleType.Scp079);
35+
if(scps.Count > 0)
4236
{
43-
var cam = cams[UnityEngine.Random.Range(0, cams.Count)];
37+
var scp = scps[Random.Range(0, scps.Count)];
38+
var cams = Map.Get.Cameras.OrderBy(x => Vector3.Distance(x.GameObject.transform.position, scp.Position)).ToList();
39+
cams = cams.Take(5).ToList();
40+
var cam = cams[Random.Range(0, cams.Count)];
41+
4442
context.Player.Scp079Controller.Camera = cam;
4543
return new CommandResult
4644
{
4745
Message = "You camera was switched near a other Scp",
4846
State = CommandResultState.Ok
4947
};
5048
}
51-
else
49+
50+
return new CommandResult
5251
{
53-
return new CommandResult
54-
{
55-
Message = "No Scp near a camera was found!",
56-
State = CommandResultState.Error
57-
};
58-
}
52+
Message = "No Scp near a camera was found!",
53+
State = CommandResultState.Error
54+
};
5955
}
6056
}
6157
}

Scp079Rework/Handlers/CommandHandler.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
using System.Collections.Generic;
1+
using System;
2+
using System.Collections.Generic;
23
using System.Linq;
34
using System.Reflection;
4-
using System;
55

66
namespace Scp079Rework.Handlers
77
{

Scp079Rework/Handlers/EventHandlers.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
using Event = Synapse.Api.Events.EventHandler;
2-
using UnityEngine;
1+
using System;
32
using System.Linq;
4-
using System;
3+
using UnityEngine;
4+
using Event = Synapse.Api.Events.EventHandler;
55

66
namespace Scp079Rework.Handlers
77
{

Scp079Rework/Plugin/PluginClass.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using System;
2-
using System.IO;
3-
using System.Reflection;
4-
using Scp079Rework.Handlers;
1+
using Scp079Rework.Handlers;
52
using Synapse.Api.Plugin;
63
using Synapse.Translation;
4+
using System;
5+
using System.IO;
6+
using System.Reflection;
77

88
namespace Scp079Rework
99
{
@@ -13,9 +13,9 @@ namespace Scp079Rework
1313
Description = "A Plugin which gives Scp-079 a lot of new Features",
1414
LoadPriority = 10,
1515
SynapseMajor = 2,
16-
SynapseMinor = 7,
17-
SynapsePatch = 1,
18-
Version = "v.2.2.0"
16+
SynapseMinor = 8,
17+
SynapsePatch = 3,
18+
Version = "v.2.2.1"
1919
)]
2020
public class PluginClass : AbstractPlugin
2121
{

Scp079Rework/Plugin/PluginConfig.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using Synapse.Config;
2-
using System.ComponentModel;
32
using System.Collections.Generic;
3+
using System.ComponentModel;
44
using UnityEngine;
55

66
namespace Scp079Rework

Scp079Rework/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
3333
// indem Sie "*" wie unten gezeigt eingeben:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
35+
[assembly: AssemblyVersion("2.2.1.0")]
36+
[assembly: AssemblyFileVersion("2.2.1.0")]

Scp079Rework/Scp079Rework.csproj

+10-10
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@
3131
<WarningLevel>4</WarningLevel>
3232
</PropertyGroup>
3333
<ItemGroup>
34-
<Reference Include="0Harmony, Version=2.1.1.0, Culture=neutral, processorArchitecture=MSIL">
35-
<HintPath>..\packages\Lib.Harmony.2.1.1\lib\net472\0Harmony.dll</HintPath>
34+
<Reference Include="0Harmony, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
35+
<HintPath>..\packages\Lib.Harmony.2.2.0\lib\net472\0Harmony.dll</HintPath>
3636
</Reference>
3737
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
38-
<HintPath>..\packages\SynapseSL.2.7.1\lib\net472\Assembly-CSharp.dll</HintPath>
38+
<HintPath>..\packages\SynapseSL.2.8.3-pre1\lib\net472\Assembly-CSharp.dll</HintPath>
3939
</Reference>
4040
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
41-
<HintPath>..\packages\SynapseSL.2.7.1\lib\net472\Assembly-CSharp-firstpass.dll</HintPath>
41+
<HintPath>..\packages\SynapseSL.2.8.3-pre1\lib\net472\Assembly-CSharp-firstpass.dll</HintPath>
4242
</Reference>
4343
<Reference Include="LiteDB, Version=5.0.11.0, Culture=neutral, PublicKeyToken=4ee40123013c9f27, processorArchitecture=MSIL">
4444
<HintPath>..\packages\LiteDB.5.0.11\lib\net45\LiteDB.dll</HintPath>
4545
</Reference>
4646
<Reference Include="Mirror, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
47-
<HintPath>..\packages\SynapseSL.2.7.1\lib\net472\Mirror.dll</HintPath>
47+
<HintPath>..\packages\SynapseSL.2.8.3-pre1\lib\net472\Mirror.dll</HintPath>
4848
</Reference>
49-
<Reference Include="Synapse, Version=2.7.1.0, Culture=neutral, processorArchitecture=MSIL">
50-
<HintPath>..\packages\SynapseSL.2.7.1\lib\net472\Synapse.dll</HintPath>
49+
<Reference Include="Synapse, Version=2.8.1.0, Culture=neutral, processorArchitecture=MSIL">
50+
<HintPath>..\packages\SynapseSL.2.8.3-pre1\lib\net472\Synapse.dll</HintPath>
5151
</Reference>
5252
<Reference Include="System" />
5353
<Reference Include="System.Core" />
@@ -62,13 +62,13 @@
6262
<Reference Include="System.Net.Http" />
6363
<Reference Include="System.Xml" />
6464
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
65-
<HintPath>..\packages\SynapseSL.2.7.1\lib\net472\UnityEngine.dll</HintPath>
65+
<HintPath>..\packages\SynapseSL.2.8.3-pre1\lib\net472\UnityEngine.dll</HintPath>
6666
</Reference>
6767
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
68-
<HintPath>..\packages\SynapseSL.2.7.1\lib\net472\UnityEngine.CoreModule.dll</HintPath>
68+
<HintPath>..\packages\SynapseSL.2.8.3-pre1\lib\net472\UnityEngine.CoreModule.dll</HintPath>
6969
</Reference>
7070
<Reference Include="UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
71-
<HintPath>..\packages\SynapseSL.2.7.1\lib\net472\UnityEngine.PhysicsModule.dll</HintPath>
71+
<HintPath>..\packages\SynapseSL.2.8.3-pre1\lib\net472\UnityEngine.PhysicsModule.dll</HintPath>
7272
</Reference>
7373
<Reference Include="YamlDotNet, Version=11.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
7474
<HintPath>..\packages\YamlDotNet.11.2.1\lib\net45\YamlDotNet.dll</HintPath>

Scp079Rework/Scp079Robot.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using System.Collections.Generic;
2-
using Synapse.Api;
1+
using Synapse.Api;
2+
using System.Collections.Generic;
33

44
namespace Scp079Rework
55
{

Scp079Rework/Scp079SynapseCommand.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using Synapse.Command;
22
using System;
3-
using System.Linq;
43
using System.Collections.Generic;
4+
using System.Linq;
55
using UnityEngine;
66
using CommandHandler = Scp079Rework.Handlers.CommandHandler;
77

Scp079Rework/packages.config

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Lib.Harmony" version="2.1.1" targetFramework="net472" />
3+
<package id="Lib.Harmony" version="2.2.0" targetFramework="net472" />
44
<package id="LiteDB" version="5.0.11" targetFramework="net472" />
5-
<package id="SynapseSL" version="2.7.1" targetFramework="net472" />
5+
<package id="SynapseSL" version="2.8.3-pre1" targetFramework="net472" />
66
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0-rc.2.21480.5" targetFramework="net472" />
77
<package id="YamlDotNet" version="11.2.1" targetFramework="net472" />
88
</packages>

0 commit comments

Comments
 (0)