-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95e19d7
commit 1be5e23
Showing
100 changed files
with
34,678 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Exiled.API.Interfaces; | ||
|
||
namespace FlashbangGun | ||
{ | ||
public class FlashbangGunConfig : IConfig | ||
{ | ||
public bool IsEnabled { get; set; } = true; | ||
|
||
public bool Debug { get; set; } = false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Exiled.API.Enums; | ||
using Exiled.API.Features; | ||
using Exiled.API.Features.Items; | ||
using Exiled.Events.EventArgs; | ||
using Exiled.Events.EventArgs.Player; | ||
using PlayerRoles; | ||
using UnityEngine; | ||
|
||
namespace FlashbangGun | ||
{ | ||
public class EventHandlers | ||
{ | ||
private readonly FlashbangGun _plugin; | ||
|
||
public EventHandlers(FlashbangGun plugin) => _plugin = plugin; | ||
|
||
public void OnShooting(ShootingEventArgs ev) | ||
{ | ||
// you can change weapon type from there | ||
if (ev.Player.CurrentItem?.Type == ItemType.GunCom45) | ||
{ | ||
ev.IsAllowed = false; | ||
|
||
// you can change to frag grenade if you want | ||
ev.Player.ThrowGrenade(ProjectileType.Flashbang); | ||
|
||
if (_plugin.Config.Debug) | ||
{ | ||
Log.Info($"{ev.Player.Nickname} this guy fired the flashbang gun."); | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{15B0B09C-DE11-490A-AB4B-E52B453931A7}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Flashbang45</RootNamespace> | ||
<AssemblyName>Flashbang45</AssemblyName> | ||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Assembly-CSharp"> | ||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Assembly-CSharp.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Assembly-CSharp-firstpass"> | ||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Assembly-CSharp-Publicized, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\EXILED.8.9.11\lib\net48\Assembly-CSharp-Publicized.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="CommandSystem.Core, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\EXILED.8.9.11\lib\net48\CommandSystem.Core.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Exiled.API, Version=8.9.11.0, Culture=neutral, processorArchitecture=AMD64"> | ||
<HintPath>..\packages\EXILED.8.9.11\lib\net48\Exiled.API.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Exiled.CreditTags, Version=8.9.11.0, Culture=neutral, processorArchitecture=AMD64"> | ||
<HintPath>..\packages\EXILED.8.9.11\lib\net48\Exiled.CreditTags.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Exiled.CustomItems, Version=8.9.11.0, Culture=neutral, processorArchitecture=AMD64"> | ||
<HintPath>..\packages\EXILED.8.9.11\lib\net48\Exiled.CustomItems.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Exiled.CustomRoles, Version=8.9.11.0, Culture=neutral, processorArchitecture=AMD64"> | ||
<HintPath>..\packages\EXILED.8.9.11\lib\net48\Exiled.CustomRoles.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Exiled.Events, Version=8.9.11.0, Culture=neutral, processorArchitecture=AMD64"> | ||
<HintPath>..\packages\EXILED.8.9.11\lib\net48\Exiled.Events.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Exiled.Loader, Version=8.9.11.0, Culture=neutral, processorArchitecture=AMD64"> | ||
<HintPath>..\packages\EXILED.8.9.11\lib\net48\Exiled.Loader.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Exiled.Permissions, Version=8.9.11.0, Culture=neutral, processorArchitecture=AMD64"> | ||
<HintPath>..\packages\EXILED.8.9.11\lib\net48\Exiled.Permissions.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Mirror"> | ||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Mirror.dll</HintPath> | ||
</Reference> | ||
<Reference Include="NorthwoodLib, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\EXILED.8.9.11\lib\net48\NorthwoodLib.dll</HintPath> | ||
</Reference> | ||
<Reference Include="PluginAPI, Version=13.1.3.0, Culture=neutral, processorArchitecture=AMD64"> | ||
<HintPath>..\packages\EXILED.8.9.11\lib\net48\PluginAPI.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Drawing" /> | ||
<Reference Include="System.Management" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="Unity.ProBuilder.KdTree"> | ||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Unity.ProBuilder.KdTree.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnityEngine"> | ||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\UnityEngine.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnityEngine.CoreModule"> | ||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\UnityEngine.CoreModule.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnityEngine.PhysicsModule"> | ||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnityEngine.TextCoreFontEngineModule"> | ||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\UnityEngine.TextCoreFontEngineModule.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnityEngine.TextCoreTextEngineModule"> | ||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\UnityEngine.TextCoreTextEngineModule.dll</HintPath> | ||
</Reference> | ||
<Reference Include="YamlDotNet, Version=11.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\EXILED.8.9.11\lib\net48\YamlDotNet.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Flashbang45.cs" /> | ||
<Compile Include="Config.cs" /> | ||
<Compile Include="EventHandlers.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Exiled.API.Features; | ||
using System; | ||
using Player = Exiled.Events.Handlers.Player; | ||
|
||
namespace FlashbangGun | ||
{ | ||
public class FlashbangGun : Plugin<FlashbangGunConfig> | ||
{ | ||
public override string Name => "FlashbangGun"; | ||
public override string Author => "thecroshel"; | ||
public override string Prefix => "flashgun"; | ||
public override Version Version => new Version(1, 0, 0); | ||
public override Version RequiredExiledVersion => new Version(8, 9, 11); | ||
|
||
private EventHandlers _eventHandlers; | ||
|
||
public override void OnEnabled() | ||
{ | ||
if (!Config.IsEnabled) return; | ||
|
||
_eventHandlers = new EventHandlers(this); | ||
Player.Shooting += _eventHandlers.OnShooting; | ||
|
||
base.OnEnabled(); | ||
} | ||
|
||
public override void OnDisabled() | ||
{ | ||
Player.Shooting -= _eventHandlers.OnShooting; | ||
|
||
_eventHandlers = null; | ||
base.OnDisabled(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// Bir bütünleştirilmiş koda ilişkin Genel Bilgiler aşağıdaki öznitelikler kümesiyle | ||
// denetlenir. Bütünleştirilmiş kod ile ilişkili bilgileri değiştirmek için | ||
// bu öznitelik değerlerini değiştirin. | ||
[assembly: AssemblyTitle("Flashbang45")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("Flashbang45")] | ||
[assembly: AssemblyCopyright("Copyright © 2024")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// ComVisible özniteliğinin false olarak ayarlanması bu bütünleştirilmiş koddaki türleri | ||
// COM bileşenleri için görünmez yapar. Bu bütünleştirilmiş koddaki bir türe | ||
// erişmeniz gerekirse ComVisible özniteliğini o türde true olarak ayarlayın. | ||
[assembly: ComVisible(false)] | ||
|
||
// Bu proje COM'un kullanımına sunulursa, aşağıdaki GUID tür kitaplığının kimliği içindir | ||
[assembly: Guid("15b0b09c-de11-490a-ab4b-e52b453931a7")] | ||
|
||
// Bir derlemenin sürüm bilgileri aşağıdaki dört değerden oluşur: | ||
// | ||
// Ana Sürüm | ||
// İkincil Sürüm | ||
// Yapı Numarası | ||
// Düzeltme | ||
// | ||
// Tüm değerleri belirtebilir veya varsayılan Derleme ve Düzeltme Numaralarını kullanmak için | ||
// aşağıda gösterildiği gibi '*' kullanabilirsiniz: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.