Skip to content

Commit e654d25

Browse files
Merge pull request Exiled-Team#66 from louis1706/Fix-Jail-Effect-+-Remove-Delayed-stuff
multiple fix
2 parents 73737da + abb630e commit e654d25

25 files changed

Lines changed: 387 additions & 227 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Bug report
33
about: Create a report to help us improve
44
title: ''
55
labels: requires testing
6-
assignees: joker-119
6+
assignees:
77

88
---
99

@@ -21,12 +21,12 @@ Steps to reproduce the behavior:
2121
A clear and concise description of what you expected to happen.
2222

2323
**Server logs**
24-
Please include a pastebin of your localadmin log file (or both MA_log and SCP_log files if you use MultiAdmin) from the time in which the bug occured
24+
Please include a pastebin of your LocalAdminLogs `SCP Secret Laboratory/LocalAdminLogs/YourFile` file from the time in which the bug occured
2525

2626
**EXILED Version ("latest" is not a version):**
2727

2828

29-
**Results of `show plugins` command in console:**
29+
**Results of `pluginmanager show` command in console:**
3030

3131

3232
**Additional context**

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*.user
77
*.userosscache
88
*.sln.docstates
9-
9+
*MigrationBackup/
1010
# User-specific files (MonoDevelop/Xamarin Studio)
1111
*.userprefs
1212

AdminTools/AdminTools.csproj

Lines changed: 120 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,132 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
3-
<Project Sdk="Microsoft.NET.Sdk">
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{560DA2C9-E7A1-42C5-BBD4-5B3C28591593}</ProjectGuid>
58
<OutputType>Library</OutputType>
6-
<AssemblyName>$(ProjectName)</AssemblyName>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>AdminTools</RootNamespace>
11+
<AssemblyName>AdminTools</AssemblyName>
12+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<LangVersion>default</LangVersion>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<PlatformTarget>x64</PlatformTarget>
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>true</Optimize>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<PlatformTarget>x64</PlatformTarget>
29+
<DebugType>pdbonly</DebugType>
30+
<Optimize>true</Optimize>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DefineConstants>TRACE</DefineConstants>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
735
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
8-
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
9-
<AssemblyVersion>7.0.1</AssemblyVersion>
10-
<FileVersion>7.0.1</FileVersion>
1136
</PropertyGroup>
12-
13-
<Import Project="../../Plugin.props" />
14-
1537
<ItemGroup>
16-
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
17-
<_Parameter1>$(ProjectName)</_Parameter1>
18-
</AssemblyAttribute>
38+
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
39+
<HintPath>..\..\References\Assembly-CSharp-firstpass.dll</HintPath>
40+
</Reference>
41+
<Reference Include="Mirror, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
42+
<HintPath>$(EXILED_REFERENCES)\Mirror.dll</HintPath>
43+
</Reference>
44+
<Reference Include="System" />
45+
<Reference Include="System.Core" />
46+
<Reference Include="System.Data" />
47+
<Reference Include="System.Xml" />
48+
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
49+
<HintPath>$(EXILED_REFERENCES)\UnityEngine.dll</HintPath>
50+
</Reference>
51+
<Reference Include="UnityEngine.AnimationModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
52+
<HintPath>$(EXILED_REFERENCES)\UnityEngine.AnimationModule.dll</HintPath>
53+
</Reference>
54+
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
55+
<HintPath>$(EXILED_REFERENCES)\UnityEngine.CoreModule.dll</HintPath>
56+
</Reference>
57+
<Reference Include="UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
58+
<HintPath>$(EXILED_REFERENCES)\UnityEngine.PhysicsModule.dll</HintPath>
59+
</Reference>
1960
</ItemGroup>
20-
2161
<ItemGroup>
22-
<PackageReference Include="EXILED" Version="$(ExiledVersion)" />
23-
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
24-
<PackageReference Include="Lib.Harmony" Version="$(HarmonyVersion)" />
25-
<PackageReference Include="StyleCop.Analyzers" Version="$(StyleCopVersion)" IncludeAssets="All" PrivateAssets="All" />
62+
<Compile Include="Commands\AdminBroadcast\AdminBroadcast.cs" />
63+
<Compile Include="Commands\Ahp\Ahp.cs" />
64+
<Compile Include="Commands\Ball\Ball.cs" />
65+
<Compile Include="Commands\BreakDoors\BreakDoors.cs" />
66+
<Compile Include="Commands\Configuration\Configuration.cs" />
67+
<Compile Include="Commands\Configuration\Reload.cs" />
68+
<Compile Include="Commands\DropItem\DropItem.cs" />
69+
<Compile Include="Commands\DropSize\DropSize.cs" />
70+
<Compile Include="Commands\Enums\Enums.cs" />
71+
<Compile Include="Commands\Explode\Explode.cs" />
72+
<Compile Include="Commands\FakeSync\FakeSpawnCommand.cs" />
73+
<Compile Include="Commands\Ghost\Ghost.cs" />
74+
<Compile Include="Commands\Grenade\Grenade.cs" />
75+
<Compile Include="Commands\HintBroadcast\HintBroadcast.cs" />
76+
<Compile Include="Commands\Hp\Hp.cs" />
77+
<Compile Include="Commands\Jail\Jail.cs" />
78+
<Compile Include="Commands\Position\Position.cs" />
79+
<Compile Include="Commands\PryGates\PryGates.cs" />
80+
<Compile Include="Commands\RandomTeleport\RandomTeleport.cs" />
81+
<Compile Include="Commands\Regeneration\Regeneration.cs" />
82+
<Compile Include="Commands\SpawnRagdoll\SpawnRagdoll.cs" />
83+
<Compile Include="Commands\Scale\Scale.cs" />
84+
<Compile Include="Commands\Broadcast\Message.cs" />
85+
<Compile Include="Commands\Size\Size.cs" />
86+
<Compile Include="Commands\SpawnWorkbench\SpawnWorkbench.cs" />
87+
<Compile Include="Commands\Tags\Hide.cs" />
88+
<Compile Include="Commands\Tags\Show.cs" />
89+
<Compile Include="Commands\Tags\Tags.cs" />
90+
<Compile Include="Commands\Id\ID.cs" />
91+
<Compile Include="Commands\InstantKill\InstantKill.cs" />
92+
<Compile Include="Commands\Inventory\Drop.cs" />
93+
<Compile Include="Commands\Inventory\Inventory.cs" />
94+
<Compile Include="Commands\Inventory\See.cs" />
95+
<Compile Include="Commands\Kill\Kill.cs" />
96+
<Compile Include="Commands\Mute\All.cs" />
97+
<Compile Include="Commands\Mute\ICom.cs" />
98+
<Compile Include="Commands\Mute\Mute.cs" />
99+
<Compile Include="Commands\Mute\RoundStart.cs" />
100+
<Compile Include="Commands\Rocket\Rocket.cs" />
101+
<Compile Include="Commands\Strip\Strip.cs" />
102+
<Compile Include="Commands\TargetGhost\TargetGhost.cs" />
103+
<Compile Include="Commands\TeleportX\TeleportX.cs" />
104+
<Compile Include="Commands\Tutorial\Tutorial.cs" />
105+
<Compile Include="Commands\Unmute\All.cs" />
106+
<Compile Include="Commands\Unmute\ICom.cs" />
107+
<Compile Include="Commands\Unmute\Unmute.cs" />
108+
<Compile Include="Commands\Unmute\RoundStart.cs" />
109+
<Compile Include="Commands\Kick\Kick.cs" />
110+
<Compile Include="Components\RegenerationComponent.cs" />
111+
<Compile Include="Config.cs" />
112+
<Compile Include="Enums.cs" />
113+
<Compile Include="EventHandlers.cs" />
114+
<Compile Include="Components\InstantKillComponent.cs" />
115+
<Compile Include="Jailed.cs" />
116+
<Compile Include="Main.cs" />
117+
<Compile Include="Properties\AssemblyInfo.cs" />
26118
</ItemGroup>
27-
28119
<ItemGroup>
29-
<Reference Include="Assembly-CSharp-firstpass" HintPath="$(SCPSL_Data)\Managed\Assembly-CSharp-firstpass.dll" Private="false" />
30-
<Reference Include="Mirror" HintPath="$(SCPSL_Data)\Managed\Mirror.dll" Private="false" />
31-
<Reference Include="UnityEngine" HintPath="$(SCPSL_Data)\Managed\UnityEngine.dll" Private="false" />
32-
<Reference Include="UnityEngine.CoreModule" HintPath="$(SCPSL_Data)\Managed\UnityEngine.CoreModule.dll" Private="false" />
33-
<Reference Include="UnityEngine.PhysicsModule" HintPath="$(SCPSL_Data)\Managed\UnityEngine.PhysicsModule.dll" Private="false" />
34-
<Reference Include="Pooling" HintPath="$(SCPSL_Data)\Managed\Pooling.dll" Private="false" />
35-
<Reference Include="YamlDotNet" HintPath="$(SCPSL_Data)\Managed\YamlDotNet.dll" Private="false" />
120+
<PackageReference Include="EXILED">
121+
<Version>8.4.3</Version>
122+
</PackageReference>
36123
</ItemGroup>
124+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
125+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
126+
Other similar extension points exist, see Microsoft.Common.targets.
127+
<Target Name="BeforeBuild">
128+
</Target>
129+
<Target Name="AfterBuild">
130+
</Target>
131+
-->
37132
</Project>

AdminTools/Commands/Ball/Ball.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
namespace AdminTools.Commands.Ball
77
{
88
using System.Collections.Generic;
9+
using Exiled.API.Enums;
910
using Exiled.API.Features.Items;
11+
using Exiled.API.Features.Pickups;
12+
using Exiled.API.Features.Pickups.Projectiles;
1013
using PlayerRoles;
1114

1215
[CommandHandler(typeof(RemoteAdminCommandHandler))]
@@ -72,11 +75,11 @@ protected override bool ExecuteParent(ArraySegment<string> arguments, ICommandSe
7275
response = players.Count == 1
7376
? $"{players[0].Nickname} has received a bouncing ball!"
7477
: $"The balls are bouncing for {players.Count} players!";
75-
if (players.Count > 1)
76-
Cassie.Message("pitch_1.5 xmas_bouncyballs", true, false);
78+
79+
Cassie.Message("pitch_1.5 xmas_bouncyballs");
7780

7881
foreach (Player p in players)
79-
((ExplosiveGrenade)Item.Create(ItemType.SCP018)).SpawnActive(p.Position, p);
82+
Projectile.CreateAndSpawn(ProjectileType.Scp018, p.Position, p.Transform.rotation);
8083
return true;
8184
}
8285
}

AdminTools/Commands/Broadcast/Message.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ protected override bool ExecuteParent(ArraySegment<string> arguments, ICommandSe
258258
return false;
259259
}
260260

261-
Player plyr = Player.List.ToList()[Plugin.NumGen.Next(0, Player.List.Count())];
261+
Player plyr = Player.List.ToList()[Main.NumGen.Next(0, Player.List.Count())];
262262
if (plyr.ReferenceHub.queryProcessor._ipAddress != "127.0.0.1")
263263
plyr.Broadcast(me, EventHandlers.FormatArguments(arguments, 2));
264264
response = $"Message sent to {plyr.Nickname}";
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;
3+
using Exiled.Permissions.Extensions;
4+
using System;
5+
6+
namespace AdminTools.Commands.FakeSync
7+
{
8+
using CustomPlayerEffects;
9+
using Exiled.API.Extensions;
10+
using PlayerRoles;
11+
12+
[CommandHandler(typeof(RemoteAdminCommandHandler))]
13+
[CommandHandler(typeof(GameConsoleCommandHandler))]
14+
public class FakeSpawnCommand : ParentCommand
15+
{
16+
public FakeSpawnCommand() => LoadGeneratedCommands();
17+
18+
public override string Command { get; } = "fakesync";
19+
20+
public override string[] Aliases { get; } = new string[] { };
21+
22+
public override string Description { get; } = "Sets everyone or a user to be invisible";
23+
24+
public override void LoadGeneratedCommands() { }
25+
26+
protected override bool ExecuteParent(ArraySegment<string> arguments, ICommandSender sender, out string response)
27+
{
28+
if (!((CommandSender)sender).CheckPermission("at.ghost"))
29+
{
30+
response = "You do not have permission to use this command";
31+
return false;
32+
}
33+
34+
if (!Enum.TryParse(arguments.At(1), out RoleTypeId roletype))
35+
{
36+
response = "Usage:\nghost ((player id / name) or (all / *))" +
37+
"\nghost clear";
38+
return false;
39+
}
40+
41+
switch (arguments.At(0))
42+
{
43+
case "clear":
44+
foreach (Player pl in Player.List)
45+
pl.ChangeAppearance(roletype, Player.List, true, 0);
46+
47+
response = "Everyone is no longer invisible";
48+
return true;
49+
case "*":
50+
case "all":
51+
foreach (Player pl in Player.List)
52+
pl.EnableEffect<Invisible>();
53+
54+
response = "Everyone is now invisible";
55+
return true;
56+
default:
57+
Player ply = Player.Get(arguments.At(0));
58+
if (ply == null)
59+
{
60+
response = $"Player not found: {arguments.At(0)}";
61+
return false;
62+
}
63+
64+
if (!ply.IsEffectActive<Invisible>())
65+
{
66+
ply.EnableEffect<Invisible>();
67+
response = $"Player {ply.Nickname} is now invisible";
68+
}
69+
else
70+
{
71+
ply.DisableEffect<Invisible>();
72+
response = $"Player {ply.Nickname} is no longer invisible";
73+
}
74+
return true;
75+
}
76+
}
77+
}
78+
}

AdminTools/Commands/Grenade/Grenade.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ protected override bool ExecuteParent(ArraySegment<string> arguments, ICommandSe
3535

3636
if (arguments.Count < 2 || arguments.Count > 3)
3737
{
38-
response = "Usage: grenade ((player id / name) or (all / *)) (GrenadeType) (grenade time)";
38+
response = "Usage: grenade ((player id / name) or (all / *)) (ProjectileType) (grenade time)";
3939
return false;
4040
}
4141

4242
if (!Enum.TryParse(arguments.At(1), true, out ProjectileType type))
4343
{
44-
response = $"Invalid value for grenade type: {arguments.At(1)}";
44+
response = $"Invalid value for projectile type: {arguments.At(1)}\n{string.Join(", ",Enum.GetNames(typeof(ProjectileType)))}.";
4545
return false;
4646
}
4747

@@ -54,10 +54,7 @@ protected override bool ExecuteParent(ArraySegment<string> arguments, ICommandSe
5454
switch (arguments.At(0))
5555
{
5656
case "*":
57-
case "all":
58-
if (type == ProjectileType.Scp018)
59-
Cassie.Message("pitch_1.5 xmas_bouncyballs", true, false);
60-
57+
case "all":
6158
foreach (Player player in Player.List)
6259
{
6360
if (player.Role != RoleTypeId.Spectator)

AdminTools/Commands/HintBroadcast/HintBroadcast.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ protected override bool ExecuteParent(ArraySegment<string> arguments, ICommandSe
258258
return false;
259259
}
260260

261-
Player plyr = Player.List.ToList()[Plugin.NumGen.Next(0, Player.List.Count())];
261+
Player plyr = Player.List.ToList()[Main.NumGen.Next(0, Player.List.Count())];
262262
plyr.ShowHint(EventHandlers.FormatArguments(arguments, 2), me);
263263
response = $"Hint sent to {plyr.Nickname}";
264264
return true;

AdminTools/Commands/InstantKill/InstantKill.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected override bool ExecuteParent(ArraySegment<string> arguments, ICommandSe
4747
return false;
4848
}
4949

50-
foreach (Player ply in Plugin.IkHubs.Keys)
50+
foreach (Player ply in Main.IkHubs.Keys)
5151
if (ply.ReferenceHub.TryGetComponent(out InstantKillComponent ikCom))
5252
UnityEngine.Object.Destroy(ikCom);
5353

@@ -60,14 +60,14 @@ protected override bool ExecuteParent(ArraySegment<string> arguments, ICommandSe
6060
return false;
6161
}
6262

63-
StringBuilder playerLister = StringBuilderPool.Shared.Rent(Plugin.IkHubs.Count != 0 ? "Players with instant killing on:\n" : "No players currently online have instant killing on");
64-
if (Plugin.IkHubs.Count == 0)
63+
StringBuilder playerLister = StringBuilderPool.Shared.Rent(Main.IkHubs.Count != 0 ? "Players with instant killing on:\n" : "No players currently online have instant killing on");
64+
if (Main.IkHubs.Count == 0)
6565
{
6666
response = playerLister.ToString();
6767
return true;
6868
}
6969

70-
foreach (Player ply in Plugin.IkHubs.Keys)
70+
foreach (Player ply in Main.IkHubs.Keys)
7171
{
7272
playerLister.Append(ply.Nickname);
7373
playerLister.Append(", ");
@@ -93,7 +93,7 @@ protected override bool ExecuteParent(ArraySegment<string> arguments, ICommandSe
9393

9494
if (pl.ReferenceHub.TryGetComponent(out InstantKillComponent ikComponent))
9595
{
96-
Plugin.IkHubs.Remove(pl);
96+
Main.IkHubs.Remove(pl);
9797
UnityEngine.Object.Destroy(ikComponent);
9898
response = $"Instant killing is off for {pl.Nickname} now";
9999
}

0 commit comments

Comments
 (0)