Skip to content

Commit f31ce8e

Browse files
committed
Update to Synapse 2.8.3
1 parent 2eb763a commit f31ce8e

File tree

6 files changed

+31
-24
lines changed

6 files changed

+31
-24
lines changed

Scp035/EventHandlers.cs

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using System.Collections.Generic;
2-
using System.Linq;
3-
using MEC;
1+
using MEC;
42
using Synapse;
53
using Synapse.Api;
64
using Synapse.Api.Items;
5+
using System.Collections.Generic;
6+
using System.Linq;
77

88
namespace Scp035
99
{
@@ -16,6 +16,16 @@ public EventHandlers()
1616
Server.Get.Events.Round.RoundStartEvent += Start;
1717
Server.Get.Events.Round.RoundRestartEvent += Restart;
1818
Server.Get.Events.Player.PlayerDeathEvent += Death;
19+
Server.Get.Events.Player.PlayerSetClassEvent += Player_PlayerSetClassEvent;
20+
}
21+
22+
private void Player_PlayerSetClassEvent(Synapse.Api.Events.SynapseEventArguments.PlayerSetClassEventArgs ev)
23+
{
24+
if (ev.Player.RoleID == 35 && ev.Player.CustomRole is Scp035PlayerScript p && p._target != null)
25+
{
26+
ev.Position = p._target.Position;
27+
ev.Rotation = p._target.transform.rotation.eulerAngles.y;
28+
}
1929
}
2030

2131
private void Death(Synapse.Api.Events.SynapseEventArguments.PlayerDeathEventArgs ev)

Scp035/PluginClass.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ namespace Scp035
1010
Description = "Adds the Role Scp035 to the Game",
1111
LoadPriority = 1,
1212
SynapseMajor = 2,
13-
SynapseMinor = 5,
13+
SynapseMinor = 8,
1414
SynapsePatch = 3,
15-
Version = "v.1.1.1"
15+
Version = "v.1.1.2"
1616
)]
1717
public class PluginClass : AbstractPlugin
1818
{

Scp035/PluginConfig.cs

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

55
namespace Scp035
66
{

Scp035/Scp035.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.0-dev4\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.0-dev4\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.0-dev4\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.0.0, Culture=neutral, processorArchitecture=MSIL">
50-
<HintPath>..\packages\SynapseSL.2.7.0-dev4\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.0-dev4\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.0-dev4\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.0-dev4\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>

Scp035/Scp035PlayerScript.cs

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
using MEC;
2-
using Synapse.Api;
1+
using Synapse.Api;
32
using Synapse.Api.Enum;
43
using System.Collections.Generic;
54

65
namespace Scp035
76
{
87
public class Scp035PlayerScript : Synapse.Api.Roles.Role
98
{
10-
private readonly Player _target;
9+
internal readonly Player _target;
1110

1211
public Scp035PlayerScript() { }
1312
public Scp035PlayerScript(Player target) => _target = target;
@@ -35,8 +34,6 @@ public override void Spawn()
3534
item.PickUp(Player);
3635
}
3736

38-
Timing.CallDelayed(0.2f, () => Player.Position = _target.Position);
39-
4037
foreach (var type in (AmmoType[])System.Enum.GetValues(typeof(AmmoType)))
4138
Player.AmmoBox[type] = _target.AmmoBox[type];
4239

Scp035/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.0-dev4" targetFramework="net472" />
5+
<package id="SynapseSL" version="2.8.3-pre1" targetFramework="net472" />
66
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net472" />
77
<package id="YamlDotNet" version="11.2.1" targetFramework="net472" />
88
</packages>

0 commit comments

Comments
 (0)