Skip to content

Commit ac51e64

Browse files
committed
Revert "Updated to Exiled 9.6.0 which is not using beta."
This reverts commit cecf689.
1 parent cecf689 commit ac51e64

File tree

10 files changed

+167
-30
lines changed

10 files changed

+167
-30
lines changed

MyPlugin/API/API.cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
//Some useless shit for custom items
2+
namespace MyPlugin.API
3+
{
4+
using System.Collections.Generic;
5+
6+
using Exiled.API.Features;
7+
8+
public class API
9+
{
10+
internal static Dictionary<Player, ExemptionType> ExemptPlayers { get; } = new();
11+
12+
public static void ExemptPlayer(Player player, ExemptionType type)
13+
{
14+
if (ExemptPlayers.ContainsKey(player))
15+
ExemptPlayers[player] |= type;
16+
else
17+
ExemptPlayers[player] = type;
18+
}
19+
20+
public static void UnExemptPlayer(Player player, ExemptionType type)
21+
{
22+
if (ExemptPlayers.TryGetValue(player, out ExemptionType exemptionType) && exemptionType != type)
23+
ExemptPlayers[player] &= type;
24+
else if (ExemptPlayers.ContainsKey(player))
25+
ExemptPlayers.Remove(player);
26+
}
27+
}
28+
}

MyPlugin/API/EffectExtension.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace MyPlugin.API;
2+
3+
public static class EffectExtension
4+
{
5+
//public
6+
}

MyPlugin/API/ExcemptionType.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//Some useless shit for custom items
2+
namespace MyPlugin.API
3+
{
4+
using System;
5+
6+
[Flags]
7+
public enum ExemptionType
8+
{
9+
RoundStart,
10+
Respawn,
11+
Revive,
12+
}
13+
}

MyPlugin/API/ICustomRole.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//Some useless shit for custom items
2+
namespace MyPlugin.API
3+
{
4+
public interface ICustomRole
5+
{
6+
public StartTeam StartTeam { get; set; }
7+
8+
public int Chance { get; set; }
9+
}
10+
}

MyPlugin/API/StartTeam.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//Some useless shit for custom items
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace MyPlugin.API
9+
{
10+
using System;
11+
12+
[Flags]
13+
public enum StartTeam
14+
{
15+
ClassD = 1,
16+
Scientist = 2,
17+
Guard = 4,
18+
Ntf = 8,
19+
Chaos = 16,
20+
Scp = 32,
21+
Revived = 64,
22+
Escape = 128,
23+
Other = 256,
24+
}
25+
}

MyPlugin/Command/Me.cs

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
using System.IO;
55
using CommandSystem;
66
using Exiled.API.Features;
7-
using ProjectMER.Features.Objects;
8-
using ProjectMER.Features;
9-
using ProjectMER.Features.Serializable.Schematics;
7+
using MapEditorReborn.API.Features;
8+
using MapEditorReborn.API.Features.Objects;
109

1110
namespace MyPlugin.Command
1211
{
@@ -58,31 +57,35 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
5857
return false;
5958
}
6059

61-
var argumentsProvided = string.Join(" ", arguments);
60+
var myArguments = string.Join(" ", arguments);
6261
var laterArgumentUsage = string.Join(" ", arguments);
6362

64-
MapUtils.GetSchematicDataByName(argumentsProvided);
63+
MapUtils.GetSchematicDataByName(myArguments);
6564

6665
foreach (var permissionCheckInDictionary in MyPlugin.Instance.Config.emotes.Permission)
6766
{
68-
var permission = permissionCheckInDictionary.Any(permission =>
69-
argumentsProvided.Contains(permission.Key)
70-
&& player.Role.Type == permission.Value
71-
|| argumentsProvided.Contains("NONE")
72-
);
73-
if (!permission)
67+
var exitLoop = false;
68+
69+
foreach (var permission in permissionCheckInDictionary)
70+
{
71+
if (!(myArguments.Contains(permission.Key) && player.Role.Type == permission.Value ||
72+
myArguments.Contains("NONE"))) continue;
73+
74+
exitLoop = true;
75+
break;
76+
}
77+
78+
if (!exitLoop)
7479
{
7580
response = MyPlugin.Instance.Config.emotes.NoPermission;
7681
return false;
7782
}
7883
}
79-
80-
81-
var spawnedSchematic = ObjectSpawner.SpawnSchematic(argumentsProvided, player.Position, player.Rotation, player.Scale);
82-
//var mySchematicsVar = ObjectSpawner.SpawnSchematic(myArguments, player.Position, player.Rotation, player.Scale, null!, false);
83-
spawnedSchematic.transform.parent = player.Transform;
8484

85-
MyPlugin.Instance.SchematicsToDestroyCommand[player] = spawnedSchematic;
85+
var mySchematicsVar = ObjectSpawner.SpawnSchematic(myArguments, player.Position, player.Rotation, player.Scale, null!, false);
86+
mySchematicsVar.transform.parent = player.Transform;
87+
88+
MyPlugin.Instance.SchematicsToDestroyCommand[player] = mySchematicsVar;
8689

8790
response = $"{MyPlugin.Instance.Config.emotes.PlayedAnimation}\n{laterArgumentUsage}";
8891
return true;

MyPlugin/MyPlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
using Exiled.CustomRoles;
1212
using Exiled.API.Enums;
1313
using System.ComponentModel;
14+
using MapEditorReborn.API.Features.Objects;
1415
using System.Runtime.InteropServices;
1516
using Exiled.Events;
1617
//using MyPlugin.CustomThings;
1718
using Exiled.Events.EventArgs.Player;
1819
using MyPlugin.EventHandlers;
19-
using ProjectMER.Features.Objects;
2020

2121
namespace MyPlugin
2222
{

MyPlugin/MyPlugin.csproj

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,53 @@
5050
<ErrorReport>prompt</ErrorReport>
5151
</PropertyGroup>
5252
<ItemGroup>
53+
<Reference Include="0Harmony, Version=2.2.2.0, Culture=neutral, processorArchitecture=MSIL">
54+
<HintPath>..\packages\Lib.Harmony.2.2.2\lib\net48\0Harmony.dll</HintPath>
55+
</Reference>
56+
<Reference Include="Assembly-CSharp">
57+
<HintPath>..\..\..\Downloads\Dev (7)\Assembly-CSharp-Publicized.dll</HintPath>
58+
</Reference>
59+
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
60+
<HintPath>..\packages\ExMod.Exiled.9.6.0-beta4\lib\net48\Assembly-CSharp-Publicized.dll</HintPath>
61+
</Reference>
5362
<Reference Include="Assembly-CSharp-firstpass">
54-
<HintPath>..\..\..\..\Downloads\Dependency\SCPSL\Assembly-CSharp-firstpass.dll</HintPath>
63+
<HintPath>..\..\..\Downloads\Dev (7)\Assembly-CSharp-firstpass.dll</HintPath>
64+
</Reference>
65+
<Reference Include="CommandSystem.Core, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
66+
<HintPath>..\packages\ExMod.Exiled.9.6.0-beta4\lib\net48\CommandSystem.Core.dll</HintPath>
67+
</Reference>
68+
<Reference Include="Exiled.API, Version=9.6.0.0, Culture=neutral, processorArchitecture=Amd64">
69+
<HintPath>..\packages\ExMod.Exiled.9.6.0-beta4\lib\net48\Exiled.API.dll</HintPath>
70+
</Reference>
71+
<Reference Include="Exiled.CreditTags, Version=9.6.0.0, Culture=neutral, processorArchitecture=Amd64">
72+
<HintPath>..\packages\ExMod.Exiled.9.6.0-beta4\lib\net48\Exiled.CreditTags.dll</HintPath>
73+
</Reference>
74+
<Reference Include="Exiled.CustomItems, Version=9.6.0.0, Culture=neutral, processorArchitecture=Amd64">
75+
<HintPath>..\packages\ExMod.Exiled.9.6.0-beta4\lib\net48\Exiled.CustomItems.dll</HintPath>
76+
</Reference>
77+
<Reference Include="Exiled.CustomRoles, Version=9.6.0.0, Culture=neutral, processorArchitecture=Amd64">
78+
<HintPath>..\packages\ExMod.Exiled.9.6.0-beta4\lib\net48\Exiled.CustomRoles.dll</HintPath>
79+
</Reference>
80+
<Reference Include="Exiled.Events, Version=9.6.0.0, Culture=neutral, processorArchitecture=Amd64">
81+
<HintPath>..\packages\ExMod.Exiled.9.6.0-beta4\lib\net48\Exiled.Events.dll</HintPath>
82+
</Reference>
83+
<Reference Include="Exiled.Loader, Version=9.6.0.0, Culture=neutral, processorArchitecture=Amd64">
84+
<HintPath>..\packages\ExMod.Exiled.9.6.0-beta4\lib\net48\Exiled.Loader.dll</HintPath>
85+
</Reference>
86+
<Reference Include="Exiled.Permissions, Version=9.6.0.0, Culture=neutral, processorArchitecture=Amd64">
87+
<HintPath>..\packages\ExMod.Exiled.9.6.0-beta4\lib\net48\Exiled.Permissions.dll</HintPath>
88+
</Reference>
89+
<Reference Include="LabApi, Version=0.4.0.0, Culture=neutral, processorArchitecture=Amd64">
90+
<HintPath>..\packages\ExMod.Exiled.9.6.0-beta4\lib\net48\LabApi.dll</HintPath>
91+
</Reference>
92+
<Reference Include="MapEditorReborn">
93+
<HintPath>..\..\..\Downloads\MapEditorReborn (3).dll</HintPath>
5594
</Reference>
5695
<Reference Include="Mirror">
57-
<HintPath>..\..\..\..\Downloads\Dependency\SCPSL\Mirror.dll</HintPath>
96+
<HintPath>..\..\..\Downloads\Dev (7)\Mirror.dll</HintPath>
5897
</Reference>
59-
<Reference Include="ProjectMER">
60-
<HintPath>..\..\..\..\Downloads\ProjectMER.dll</HintPath>
98+
<Reference Include="NorthwoodLib, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL">
99+
<HintPath>..\packages\ExMod.Exiled.9.6.0-beta4\lib\net48\NorthwoodLib.dll</HintPath>
61100
</Reference>
62101
<Reference Include="System" />
63102
<Reference Include="System.Core" />
@@ -68,32 +107,36 @@
68107
<Reference Include="System.Net.Http" />
69108
<Reference Include="System.Xml" />
70109
<Reference Include="UnityEngine">
71-
<HintPath>..\..\..\..\Downloads\ScriptedEvents\Dev (8)\UnityEngine.dll</HintPath>
110+
<HintPath>..\..\..\Downloads\Dev (7)\UnityEngine.dll</HintPath>
72111
</Reference>
73112
<Reference Include="UnityEngine.CoreModule">
74-
<HintPath>..\..\..\..\Downloads\Dependency\SCPSL\UnityEngine.CoreModule.dll</HintPath>
113+
<HintPath>..\..\..\Downloads\Dev (7)\UnityEngine.CoreModule.dll</HintPath>
75114
</Reference>
76115
<Reference Include="UnityEngine.PhysicsModule">
77-
<HintPath>..\..\..\..\Downloads\Dev (5)\UnityEngine.PhysicsModule.dll</HintPath>
116+
<HintPath>..\..\..\Downloads\Dev (7)\UnityEngine.PhysicsModule.dll</HintPath>
117+
</Reference>
118+
<Reference Include="YamlDotNet, Version=11.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
119+
<HintPath>..\packages\ExMod.Exiled.9.6.0-beta4\lib\net48\YamlDotNet.dll</HintPath>
78120
</Reference>
79121
</ItemGroup>
80122
<ItemGroup>
123+
<Compile Include="API\API.cs" />
124+
<Compile Include="API\EffectExtension.cs" />
125+
<Compile Include="API\ExcemptionType.cs" />
81126
<Compile Include="Command\Me.cs" />
82127
<Compile Include="Config.cs" />
83128
<Compile Include="CustomThings\Hints.cs" />
84129
<Compile Include="EventHandlers\playerEv.cs" />
85130
<Compile Include="MyPlugin.cs" />
86131
<Compile Include="Properties\AssemblyInfo.cs" />
132+
<Compile Include="API\ICustomRole.cs" />
87133
<Compile Include="Roles\Saskyc.cs" />
134+
<Compile Include="API\StartTeam.cs" />
88135
<Compile Include="Roles\SCP035.cs" />
89136
</ItemGroup>
90137
<ItemGroup>
91138
<None Include="App.config" />
92-
</ItemGroup>
93-
<ItemGroup>
94-
<PackageReference Include="ExMod.Exiled">
95-
<Version>9.6.0</Version>
96-
</PackageReference>
139+
<None Include="packages.config" />
97140
</ItemGroup>
98141
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
99142
</Project>

MyPlugin/Roles/SCP035.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using MEC;
66
using PlayerRoles;
77
using Exiled.API.Enums;
8+
using MyPlugin.API;
89
using Exiled.CustomItems.API.Features;
910

1011
namespace MyPlugin.Roles
@@ -14,6 +15,8 @@ public class SCP035 : CustomRole
1415
{
1516
//public int Chance { get; set; } = 0;
1617

18+
public StartTeam StartTeam { get; set; } = StartTeam.Scp;
19+
1720
public override uint Id { get; set; } = 129;
1821

1922
public override RoleTypeId Role { get; set; } = RoleTypeId.None;

MyPlugin/packages.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="ExMod.Exiled" version="9.6.0-beta4" targetFramework="net48" />
4+
<package id="Lib.Harmony" version="2.2.2" targetFramework="net48" />
5+
<package id="RueI" version="2.1.0" targetFramework="net48" />
6+
</packages>

0 commit comments

Comments
 (0)