Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Tortellio committed Mar 11, 2020
0 parents commit c36c7f5
Show file tree
Hide file tree
Showing 24 changed files with 313 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
52 changes: 52 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Prerequisites
*.d

# Object files
*.o
*.ko
*.obj
*.elf

# Linker output
*.ilk
*.map
*.exp

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# Debug files
*.dSYM/
*.su
*.idb
*.pdb

# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
Binary file added .vs/DisableLockpick/v16/.suo
Binary file not shown.
Empty file.
Binary file not shown.
15 changes: 15 additions & 0 deletions Config.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using Rocket.API;

namespace Tortellio.DisableLockpick
{
public class Config : IRocketPluginConfiguration
{
public bool EnablePlugin;
public string BypassPermission;
public void LoadDefaults()
{
EnablePlugin = true;
BypassPermission = "disablelockpick.bypass";
}
}
}
52 changes: 52 additions & 0 deletions DisableLockpick.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using System;
using Rocket.Core.Plugins;
using Rocket.Unturned.Player;
using SDG.Unturned;
using UnityEngine;
using Logger = Rocket.Core.Logging.Logger;
using System.Linq;
using Rocket.API;
using Rocket.Unturned.Chat;

namespace Tortellio.DisableLockpick
{
public class DisableLockpick : RocketPlugin<Config>
{
public static DisableLockpick Instance;
public static string PluginName = "DisableLockpick";
public static string PluginVersion = " 1.0.0";
public bool loaded = false;
protected override void Load()
{
Instance = this;
Logger.Log("DisableLockpick has been loaded!", ConsoleColor.Yellow);
Logger.Log(PluginName + PluginVersion, ConsoleColor.Yellow);
Logger.Log("Made by Tortellio", ConsoleColor.Yellow);

if (!Instance.Configuration.Instance.EnablePlugin)
{
Logger.Log("DisableLockpick is disabled in configuration.. unloading!");
Unload();
return;
}
VehicleManager.onVehicleLockpicked += OnLockpicked;
}
protected override void Unload()
{
Instance = null;
Logger.Log("DisableLockpick has been unloaded!");
Logger.Log("Visit Tortellio Discord for more! https://discord.gg/pzQwsew", ConsoleColor.Yellow);

VehicleManager.onVehicleLockpicked -= OnLockpicked;
}

public void OnLockpicked(InteractableVehicle vehicle, Player player, ref bool allow)
{
if (!Configuration.Instance.EnablePlugin) { return; }
UnturnedPlayer stealer = UnturnedPlayer.FromPlayer(player);
if (stealer.HasPermission(Configuration.Instance.BypassPermission)) { allow = true; return; }
UnturnedChat.Say(UnturnedPlayer.FromPlayer(player), "Lockpick is disabled", Color.red, "https://i.imgur.com/FeIvao9.png");
allow = false;
}
}
}
76 changes: 76 additions & 0 deletions DisableLockpick.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?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>{8DC70FAB-FAE5-4404-A80F-A5E0529FE3E6}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Tortellio</RootNamespace>
<AssemblyName>DisableLockpick</AssemblyName>
<TargetFrameworkVersion>v4.6.1</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>..\..\..\Libraries\Unity\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>..\..\..\Libraries\Unity\Assembly-CSharp-firstpass.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rocket.API">
<HintPath>..\..\..\Libraries\Rocket\Rocket.API.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rocket.Core">
<HintPath>..\..\..\Libraries\Rocket\Rocket.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rocket.Unturned">
<HintPath>..\..\..\Libraries\Rocket\Rocket.Unturned.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>..\..\..\Libraries\Unity\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\..\..\Libraries\Unity\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Config.cs" />
<Compile Include="DisableLockpick.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
25 changes: 25 additions & 0 deletions DisableLockpick.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29613.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DisableLockpick", "DisableLockpick.csproj", "{8DC70FAB-FAE5-4404-A80F-A5E0529FE3E6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8DC70FAB-FAE5-4404-A80F-A5E0529FE3E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8DC70FAB-FAE5-4404-A80F-A5E0529FE3E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8DC70FAB-FAE5-4404-A80F-A5E0529FE3E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8DC70FAB-FAE5-4404-A80F-A5E0529FE3E6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9F7771A1-C1AC-4F35-96FD-FD0C2BF845E0}
EndGlobalSection
EndGlobal
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Irfan Miftah

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
36 changes: 36 additions & 0 deletions Properties/AssemblyInfo.cs
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;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DisableLockpick")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DisableLockpick")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("8dc70fab-fae5-4404-a80f-a5e0529fe3e6")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Binary file not shown.
Binary file added obj/Debug/ModeCycle.csprojAssemblyReference.cache
Binary file not shown.
Binary file added obj/Debug/PurgeVehicle.csprojAssemblyReference.cache
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 5 additions & 0 deletions obj/Release/DisableLockpick.csproj.FileListAbsolute.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\DisableLockpick\bin\Release\DisableLockpick.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\DisableLockpick\bin\Release\DisableLockpick.pdb
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\DisableLockpick\obj\Release\DisableLockpick.csprojAssemblyReference.cache
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\DisableLockpick\obj\Release\DisableLockpick.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\DisableLockpick\obj\Release\DisableLockpick.pdb
Binary file not shown.
15 changes: 15 additions & 0 deletions obj/Release/ModeCycle.csproj.FileListAbsolute.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\bin\Release\ModeCycle.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\bin\Release\ModeCycle.pdb
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\obj\Release\ModeCycle.csprojAssemblyReference.cache
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\obj\Release\ModeCycle.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\obj\Release\ModeCycle.pdb
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\ModeCycle\obj\Release\ModeCycle.csprojAssemblyReference.cache
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\ModeCycle\obj\Release\ModeCycle.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\ModeCycle\obj\Release\ModeCycle.pdb
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\ModeCycle\bin\Release\ModeCycle.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\ModeCycle\bin\Release\ModeCycle.pdb
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\ModeCycle - Copy\bin\Release\DisableLockpick.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\ModeCycle - Copy\bin\Release\DisableLockpick.pdb
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\ModeCycle - Copy\obj\Release\ModeCycle.csprojAssemblyReference.cache
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\ModeCycle - Copy\obj\Release\DisableLockpick.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\ModeCycle - Copy\obj\Release\DisableLockpick.pdb
Binary file not shown.
Binary file not shown.
Empty file.
14 changes: 14 additions & 0 deletions obj/Release/PurgeVehicle.csproj.FileListAbsolute.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\bin\Release\PurgeVehicle.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\bin\Release\PurgeVehicle.pdb
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\bin\Release\Assembly-CSharp-firstpass.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\bin\Release\Assembly-CSharp.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\bin\Release\Rocket.API.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\bin\Release\Rocket.Core.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\bin\Release\Rocket.Unturned.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\bin\Release\UnityEngine.CoreModule.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\bin\Release\UnityEngine.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\bin\Release\UnityEngine.PhysicsModule.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\obj\Release\PurgeVehicle.csprojAssemblyReference.cache
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\obj\Release\PurgeVehicle.csproj.CopyComplete
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\obj\Release\PurgeVehicle.dll
D:\PROGRAMMING\Games\Unturned\Plugins\Source RAW\PurgeVehicle\PurgeVehicle\obj\Release\PurgeVehicle.pdb
Binary file not shown.

0 comments on commit c36c7f5

Please sign in to comment.