Skip to content

Commit ce2dc86

Browse files
MartiMarti
authored andcommitted
Add project files.
1 parent b52bc72 commit ce2dc86

24 files changed

+2389
-0
lines changed

MyPlugin.sln

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.8.34330.188
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyPlugin", "MyPlugin\MyPlugin.csproj", "{5CAC4C14-AC05-4369-A588-5BDF77503AEF}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Debug|x64 = Debug|x64
12+
Release|Any CPU = Release|Any CPU
13+
Release|x64 = Release|x64
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{5CAC4C14-AC05-4369-A588-5BDF77503AEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17+
{5CAC4C14-AC05-4369-A588-5BDF77503AEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{5CAC4C14-AC05-4369-A588-5BDF77503AEF}.Debug|x64.ActiveCfg = Debug|x64
19+
{5CAC4C14-AC05-4369-A588-5BDF77503AEF}.Debug|x64.Build.0 = Debug|x64
20+
{5CAC4C14-AC05-4369-A588-5BDF77503AEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
21+
{5CAC4C14-AC05-4369-A588-5BDF77503AEF}.Release|Any CPU.Build.0 = Release|Any CPU
22+
{5CAC4C14-AC05-4369-A588-5BDF77503AEF}.Release|x64.ActiveCfg = Release|x64
23+
{5CAC4C14-AC05-4369-A588-5BDF77503AEF}.Release|x64.Build.0 = Release|x64
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {6100CDDF-5A02-441A-A65C-48D089F1ECC3}
30+
EndGlobalSection
31+
EndGlobal

MyPlugin.zip

23.1 MB
Binary file not shown.

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/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/Commands/Clipboard.cs

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
using CommandSystem;
2+
using Exiled.API.Features.Pickups;
3+
using System;
4+
5+
namespace MyPlugin.Commands
6+
{
7+
using System;
8+
using System.Linq;
9+
using CommandSystem;
10+
11+
using Exiled.API.Features;
12+
using Exiled.API.Features.Pickups;
13+
using MapEditorReborn.API.Features;
14+
using MapEditorReborn.API.Features.Objects;
15+
using UnityEngine;
16+
17+
/// <summary>
18+
/// This is an example of how commands should be made.
19+
/// </summary>
20+
[CommandHandler(typeof(ClientCommandHandler))]
21+
public class Clipboard : ICommand
22+
{
23+
/// <inheritdoc/>
24+
public string Command { get; } = "clipboard";
25+
26+
/// <inheritdoc/>
27+
public string[] Aliases { get; } = new[] { "cb" };
28+
29+
/// <inheritdoc/>
30+
public string Description { get; } = "Animace clipboard";
31+
32+
/// <inheritdoc/>
33+
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
34+
{
35+
//This serves only purpose for .me / .m registration and it does nothing
36+
//.me is meant to be alone normal command but I do not yet know how to do that
37+
//next update I will change this
38+
39+
40+
Player player = Player.Get(sender);
41+
/*
42+
43+
44+
if (player == null)
45+
{
46+
response = "This command must be from the game level.";
47+
return false;
48+
}
49+
50+
if (MyPlugin.Instance.SchematicsToDestroyCommand.TryGetValue(player, out SchematicObject schematic))
51+
{
52+
//player.Broadcast(1, "You picked up test item whooo");
53+
if (schematic != null)
54+
{
55+
schematic.Destroy();
56+
}
57+
58+
}
59+
60+
SchematicObject mySchematicsVar = ObjectSpawner.SpawnSchematic("Clipboard", player.Position, player.Rotation, new Vector3(1, 1, 1), null, false);
61+
mySchematicsVar.transform.parent = player.Transform;
62+
MyPlugin.Instance.SchematicsToDestroyCommand[player] = mySchematicsVar;
63+
/O
64+
This will have all the arguments and I can check what the fuck is happening
65+
string myarguments = string.Join(" ", arguments);
66+
if (myarguments == "suspicous stew") { }
67+
O/
68+
//------------>
69+
70+
71+
//-Return true if the command was executed successfully; otherwise, false.-
72+
//------------<
73+
*/
74+
response = $"{player.Nickname} run alone .me";
75+
return true;
76+
}
77+
}
78+
}

0 commit comments

Comments
 (0)