Skip to content

Commit

Permalink
Update to EXILED 8
Browse files Browse the repository at this point in the history
  • Loading branch information
joker-119 committed Sep 1, 2023
1 parent 037aa4f commit decb441
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 195 deletions.
179 changes: 25 additions & 154 deletions AdminTools/AdminTools.csproj
Original file line number Diff line number Diff line change
@@ -1,166 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{560DA2C9-E7A1-42C5-BBD4-5B3C28591593}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AdminTools</RootNamespace>
<AssemblyName>AdminTools</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<LangVersion>default</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AssemblyName>$(ProjectName)</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
<AssemblyVersion>7.0.0</AssemblyVersion>
<FileVersion>7.0.0</FileVersion>
</PropertyGroup>

<Import Project="../../Plugin.props" />

<ItemGroup>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.6.0.0-beta.20\lib\net48\Assembly-CSharp-Publicized.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\References\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="CommandSystem.Core, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.6.0.0-beta.20\lib\net48\CommandSystem.Core.dll</HintPath>
</Reference>
<Reference Include="Exiled.API, Version=6.0.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.6.0.0-beta.20\lib\net48\Exiled.API.dll</HintPath>
</Reference>
<Reference Include="Exiled.CreditTags, Version=6.0.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.6.0.0-beta.20\lib\net48\Exiled.CreditTags.dll</HintPath>
</Reference>
<Reference Include="Exiled.CustomItems, Version=6.0.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.6.0.0-beta.20\lib\net48\Exiled.CustomItems.dll</HintPath>
</Reference>
<Reference Include="Exiled.CustomRoles, Version=6.0.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.6.0.0-beta.20\lib\net48\Exiled.CustomRoles.dll</HintPath>
</Reference>
<Reference Include="Exiled.Events, Version=6.0.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.6.0.0-beta.20\lib\net48\Exiled.Events.dll</HintPath>
</Reference>
<Reference Include="Exiled.Loader, Version=6.0.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.6.0.0-beta.20\lib\net48\Exiled.Loader.dll</HintPath>
</Reference>
<Reference Include="Exiled.Permissions, Version=6.0.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.6.0.0-beta.20\lib\net48\Exiled.Permissions.dll</HintPath>
</Reference>
<Reference Include="Exiled.Updater, Version=3.1.1.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.6.0.0-beta.20\lib\net48\Exiled.Updater.dll</HintPath>
</Reference>
<Reference Include="Mirror, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(EXILED_REFERENCES)\Mirror.dll</HintPath>
</Reference>
<Reference Include="NorthwoodLib, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.6.0.0-beta.20\lib\net48\NorthwoodLib.dll</HintPath>
</Reference>
<Reference Include="PluginAPI, Version=12.0.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>..\packages\EXILED.6.0.0-beta.20\lib\net48\PluginAPI.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(EXILED_REFERENCES)\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AnimationModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(EXILED_REFERENCES)\UnityEngine.AnimationModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(EXILED_REFERENCES)\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(EXILED_REFERENCES)\UnityEngine.PhysicsModule.dll</HintPath>
</Reference>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>$(ProjectName)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

<ItemGroup>
<Compile Include="Commands\AdminBroadcast\AdminBroadcast.cs" />
<Compile Include="Commands\Ahp\Ahp.cs" />
<Compile Include="Commands\Ball\Ball.cs" />
<Compile Include="Commands\BreakDoors\BreakDoors.cs" />
<Compile Include="Commands\Configuration\Configuration.cs" />
<Compile Include="Commands\Configuration\Reload.cs" />
<Compile Include="Commands\DropItem\DropItem.cs" />
<Compile Include="Commands\DropSize\DropSize.cs" />
<Compile Include="Commands\Enums\Enums.cs" />
<Compile Include="Commands\Explode\Explode.cs" />
<Compile Include="Commands\Ghost\Ghost.cs" />
<Compile Include="Commands\Grenade\Grenade.cs" />
<Compile Include="Commands\HintBroadcast\HintBroadcast.cs" />
<Compile Include="Commands\Hp\Hp.cs" />
<Compile Include="Commands\Jail\Jail.cs" />
<Compile Include="Commands\Position\Position.cs" />
<Compile Include="Commands\PryGates\PryGates.cs" />
<Compile Include="Commands\RandomTeleport\RandomTeleport.cs" />
<Compile Include="Commands\Regeneration\Regeneration.cs" />
<Compile Include="Commands\SpawnRagdoll\SpawnRagdoll.cs" />
<Compile Include="Commands\Scale\Scale.cs" />
<Compile Include="Commands\Broadcast\Message.cs" />
<Compile Include="Commands\Size\Size.cs" />
<Compile Include="Commands\SpawnWorkbench\SpawnWorkbench.cs" />
<Compile Include="Commands\Tags\Hide.cs" />
<Compile Include="Commands\Tags\Show.cs" />
<Compile Include="Commands\Tags\Tags.cs" />
<Compile Include="Commands\Id\ID.cs" />
<Compile Include="Commands\InstantKill\InstantKill.cs" />
<Compile Include="Commands\Inventory\Drop.cs" />
<Compile Include="Commands\Inventory\Inventory.cs" />
<Compile Include="Commands\Inventory\See.cs" />
<Compile Include="Commands\Kill\Kill.cs" />
<Compile Include="Commands\Mute\All.cs" />
<Compile Include="Commands\Mute\ICom.cs" />
<Compile Include="Commands\Mute\Mute.cs" />
<Compile Include="Commands\Mute\RoundStart.cs" />
<Compile Include="Commands\Rocket\Rocket.cs" />
<Compile Include="Commands\Strip\Strip.cs" />
<Compile Include="Commands\TargetGhost\TargetGhost.cs" />
<Compile Include="Commands\TeleportX\TeleportX.cs" />
<Compile Include="Commands\Tutorial\Tutorial.cs" />
<Compile Include="Commands\Unmute\All.cs" />
<Compile Include="Commands\Unmute\ICom.cs" />
<Compile Include="Commands\Unmute\Unmute.cs" />
<Compile Include="Commands\Unmute\RoundStart.cs" />
<Compile Include="Commands\Kick\Kick.cs" />
<Compile Include="Components\RegenerationComponent.cs" />
<Compile Include="Config.cs" />
<Compile Include="Enums.cs" />
<Compile Include="EventHandlers.cs" />
<Compile Include="Extensions.cs" />
<Compile Include="Components\InstantKillComponent.cs" />
<Compile Include="Jailed.cs" />
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<PackageReference Include="EXILED" Version="$(ExiledVersion)" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="Lib.Harmony" Version="$(HarmonyVersion)" />
<PackageReference Include="StyleCop.Analyzers" Version="$(StyleCopVersion)" IncludeAssets="All" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<None Include="packages.config" />
<Reference Include="Assembly-CSharp-firstpass" HintPath="$(SCPSL_Data)\Managed\Assembly-CSharp-firstpass.dll" Private="false" />
<Reference Include="Mirror" HintPath="$(SCPSL_Data)\Managed\Mirror.dll" Private="false" />
<Reference Include="UnityEngine" HintPath="$(SCPSL_Data)\Managed\UnityEngine.dll" Private="false" />
<Reference Include="UnityEngine.CoreModule" HintPath="$(SCPSL_Data)\Managed\UnityEngine.CoreModule.dll" Private="false" />
<Reference Include="UnityEngine.PhysicsModule" HintPath="$(SCPSL_Data)\Managed\UnityEngine.PhysicsModule.dll" Private="false" />
<Reference Include="Pooling" HintPath="$(SCPSL_Data)\Managed\Pooling.dll" Private="false" />
<Reference Include="YamlDotNet" HintPath="$(SCPSL_Data)\Managed\YamlDotNet.dll" Private="false" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
2 changes: 1 addition & 1 deletion AdminTools/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public class Config : IConfig
public bool Debug { get; set; }

[Description("Should the tutorial class be in God Mode? Default: true")]
public bool GodTuts { get; set; } = true;
public bool GodTuts { get; set; } = false;
}
}
9 changes: 5 additions & 4 deletions AdminTools/EventHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
namespace AdminTools
{
using Exiled.API.Extensions;
using Exiled.API.Features.Doors;
using Exiled.API.Features.Items;
using Exiled.API.Features.Roles;
using Exiled.Events.EventArgs.Player;
Expand All @@ -39,8 +40,8 @@ public class EventHandlers

public void OnDoorOpen(InteractingDoorEventArgs ev)
{
if (Plugin.PryGateHubs.Contains(ev.Player))
ev.Door.TryPryOpen();
if (Plugin.PryGateHubs.Contains(ev.Player) && ev.Door is Gate gate)
gate.TryPry();
}

public static string FormatArguments(ArraySegment<string> sentence, int index)
Expand Down Expand Up @@ -329,8 +330,8 @@ public void OnWaitingForPlayers()

public void OnPlayerInteractingDoor(InteractingDoorEventArgs ev)
{
if (BreakDoorsList.Contains(ev.Player))
ev.Door.BreakDoor();
if (BreakDoorsList.Contains(ev.Player) && ev.Door is BreakableDoor breakable)
breakable.Break();
}
}
}
2 changes: 1 addition & 1 deletion AdminTools/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class Plugin : Plugin<Config>
public override string Author { get; } = "Originally by Joker119. Modifications by KoukoCocoa & Thomasjosif";
public override string Name { get; } = "Admin Tools";
public override string Prefix { get; } = "AT";
public override Version RequiredExiledVersion { get; } = new(6, 0, 0);
public override Version RequiredExiledVersion { get; } = new(8, 0, 0);

public EventHandlers EventHandlers;
public static System.Random NumGen = new();
Expand Down
35 changes: 0 additions & 35 deletions AdminTools/Properties/AssemblyInfo.cs

This file was deleted.

0 comments on commit decb441

Please sign in to comment.