Skip to content

Commit

Permalink
update project
Browse files Browse the repository at this point in the history
  • Loading branch information
RestoreMonarchy committed May 11, 2024
1 parent 2732923 commit 4550b47
Show file tree
Hide file tree
Showing 22 changed files with 169 additions and 170 deletions.
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
20 changes: 17 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ mono_crash.*
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/

# Visual Studio 2015/2017 cache/options directory
.vs/
Expand Down Expand Up @@ -60,6 +63,9 @@ project.lock.json
project.fragment.lock.json
artifacts/

# ASP.NET Scaffolding
ScaffoldingReadMe.txt

# StyleCop
StyleCopReport.xml

Expand Down Expand Up @@ -126,9 +132,6 @@ _ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding add-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

Expand All @@ -139,6 +142,11 @@ _TeamCity*
.axoCover/*
!.axoCover/settings.json

# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info

# Visual Studio code coverage results
*.coverage
*.coveragexml
Expand Down Expand Up @@ -347,3 +355,9 @@ healthchecksdb

# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/

# Fody - auto-generated XML schema
FodyWeavers.xsd
36 changes: 0 additions & 36 deletions Properties/AssemblyInfo.cs

This file was deleted.

18 changes: 5 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
[![Version](https://img.shields.io/github/release/RestoreMonarchyPlugins/RPLicenses.svg)](https://github.com/RestoreMonarchyPlugins/RPLicenses/releases) [![Discord](https://discordapp.com/api/guilds/520355060312440853/widget.png)](https://restoremonarchy.com/discord)
# RPLicenses
Simple Vehicle & Gun license plugin for Unturned RP servers.
Based on DiagonalRPLicenses, but created from scratch.
Simple vehicle & gun license plugin for Roleplay servers.

### Features
* Allows you to require your players to have license for actions, in current version it is driving and carrying guns.
* You may want to limit license requirements only to specific action in `VehicleLicenseEnabled` or `GunLicenseEnabled` parameter.
* Rocket permissions can bypass requirement to have a license in your inventory. So for example if you give `license.gun` to
a given group in `Permissions.config.xml` then for this group license is not required.
* You can change items required for licenses and permission names.
* You can set custom color of the messages sent within translations.
## Workshop (optional)
[2350128257](https://steamcommunity.com/sharedfiles/filedetails/?id=2350128257) - Game4Freak's RP Licenses


### Default Configuration
## Configuration
```xml
<?xml version="1.0" encoding="utf-8"?>
<RPLicensesConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Expand All @@ -26,7 +18,7 @@ a given group in `Permissions.config.xml` then for this group license is not req
</RPLicensesConfiguration>
```

### Default Translations
## Translations
```xml
<?xml version="1.0" encoding="utf-8"?>
<Translations xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Expand Down
78 changes: 0 additions & 78 deletions RPLicenses.csproj

This file was deleted.

6 changes: 3 additions & 3 deletions RPLicenses.sln
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29418.71
# Visual Studio Version 17
VisualStudioVersion = 17.9.34728.123
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RPLicenses", "RPLicenses.csproj", "{53AFE513-A077-47F6-AA72-EA002463AB25}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RPLicenses", "RPLicenses\RPLicenses.csproj", "{53AFE513-A077-47F6-AA72-EA002463AB25}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
55 changes: 55 additions & 0 deletions RPLicenses/RPLicenses.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<LangVersion>latest</LangVersion>
<RootNamespace>RestoreMonarchy.RPLicenses</RootNamespace>
<Version>1.1.0</Version>
</PropertyGroup>

<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>..\lib\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="com.rlabrecque.steamworks.net">
<HintPath>..\lib\com.rlabrecque.steamworks.net.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\lib\Newtonsoft.Json.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rocket.API">
<HintPath>..\lib\Rocket.API.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rocket.Core">
<HintPath>..\lib\Rocket.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rocket.Unturned">
<HintPath>..\lib\Rocket.Unturned.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SDG.NetTransport">
<HintPath>..\lib\SDG.NetTransport.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\lib\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\lib\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>

<ItemGroup>
<Content Include="..\lib\output\*.*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

</Project>
26 changes: 26 additions & 0 deletions RPLicenses/RPLicensesConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Rocket.API;

namespace RestoreMonarchy.RPLicenses
{
public class RPLicensesConfiguration : IRocketPluginConfiguration
{
public string MessageColor { get; set; }
public bool VehicleLicenseEnabled { get; set; }
public bool GunLicenseEnabled { get; set; }
public string VehicleLicensePermission { get; set; }
public string GunLicensePermission { get; set; }
public ushort VehicleLicenseID { get; set; }
public ushort GunLicenseID { get; set; }

public void LoadDefaults()
{
MessageColor = "yellow";
VehicleLicenseEnabled = true;
GunLicenseEnabled = true;
VehicleLicensePermission = "license.vehicle";
GunLicensePermission = "license.gun";
VehicleLicenseID = 1052; // dollar note $10
GunLicenseID = 1054; // dollar note $50
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Rocket.API;
using Rocket.Unturned.Player;
using SDG.Unturned;

namespace RestoreMonarchy.RPLicenses
{
Expand Down
2 changes: 0 additions & 2 deletions RPLicensesPlugin.cs → RPLicenses/RPLicensesPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
using Rocket.Core.Plugins;
using Rocket.Unturned;
using Rocket.Unturned.Chat;
using Rocket.Unturned.Events;
using Rocket.Unturned.Player;
using SDG.Unturned;
using System;
using UnityEngine;
using Logger = Rocket.Core.Logging.Logger;
using Rocket.API;

namespace RestoreMonarchy.RPLicenses
{
Expand Down
Loading

0 comments on commit 4550b47

Please sign in to comment.