-
Notifications
You must be signed in to change notification settings - Fork 3
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
0 parents
commit aabeaa2
Showing
5 changed files
with
202 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,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.27703.2000 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SCPSLDonortag", "SCPSLDonortag\SCPSLDonortag.csproj", "{BFE9B739-56FB-403D-AB29-31263E7A5379}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{BFE9B739-56FB-403D-AB29-31263E7A5379}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{BFE9B739-56FB-403D-AB29-31263E7A5379}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{BFE9B739-56FB-403D-AB29-31263E7A5379}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{BFE9B739-56FB-403D-AB29-31263E7A5379}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {4EE5B114-6FBC-4423-9AAE-71F89281C2C8} | ||
EndGlobalSection | ||
EndGlobal |
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 Smod2.API; | ||
using Smod2; | ||
using Smod2.Events; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
|
||
namespace SCPSLDonortag | ||
{ | ||
class JoinHandler : IEventPlayerJoin | ||
{ | ||
private SCPSLDonortag plugin; | ||
public JoinHandler(Plugin plugin) | ||
{ | ||
this.plugin =(SCPSLDonortag) plugin; | ||
} | ||
|
||
public void OnPlayerJoin(Player player) | ||
{ | ||
|
||
|
||
List<String> steamIDs = plugin.getSteamIDs(); | ||
if (player == null || player.SteamId == null) | ||
{ | ||
plugin.Error("ID or player is null"); | ||
} | ||
if (steamIDs.Contains(player.SteamId)) | ||
{ | ||
String tag = plugin.getTag(); | ||
String color = plugin.getColor(); | ||
player.SetRole(color, tag); | ||
} | ||
|
||
} | ||
} | ||
} |
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; | ||
|
||
// 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("SCPSLDonortag")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("SCPSLDonortag")] | ||
[assembly: AssemblyCopyright("Copyright © 2018")] | ||
[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("bfe9b739-56fb-403d-ab29-31263e7a5379")] | ||
|
||
// 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")] |
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,54 @@ | ||
using Smod2; | ||
using Smod2.Attributes; | ||
using Smod2.Events; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace SCPSLDonortag | ||
{ | ||
[PluginDetails( | ||
author = "TheCreeperCow", | ||
name = "DonorTag", | ||
description = "Gives donors fancy tags", | ||
id = "com.thecreepercow.donortag", | ||
version = "0.1", | ||
SmodMajor =2, | ||
SmodMinor =0, | ||
SmodRevision =13)] | ||
|
||
class SCPSLDonortag : Plugin | ||
{ | ||
private List<String> donorList; | ||
private String color; | ||
private String tag; | ||
public override void OnDisable() | ||
{ | ||
} | ||
|
||
public override void OnEnable() | ||
{ | ||
donorList = new List<string>(GetConfigList("Donors_SteamID")); | ||
color = GetConfigString("Donor_Color"); | ||
tag = GetConfigString("Donor_Tag"); | ||
} | ||
public String getColor() | ||
{ | ||
return color; | ||
} | ||
public List<String> getSteamIDs() | ||
{ | ||
return donorList; | ||
} | ||
public String getTag() | ||
{ | ||
return tag; | ||
} | ||
public override void Register() | ||
{ | ||
this.AddEventHandler(typeof(IEventPlayerJoin), new JoinHandler(this), Priority.High); | ||
this.AddConfig(new Smod2.Config.ConfigSetting("Donors_SteamID", "", Smod2.Config.SettingType.LIST,true,"SteamIDS of your donors")); | ||
this.AddConfig(new Smod2.Config.ConfigSetting("Donor_Tag", "Donator", Smod2.Config.SettingType.STRING, true, "The Donor tag text")); | ||
this.AddConfig(new Smod2.Config.ConfigSetting("Donor_Color", "green", Smod2.Config.SettingType.STRING, true, "The Donor tag color")); | ||
} | ||
} | ||
} |
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,51 @@ | ||
<?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>{BFE9B739-56FB-403D-AB29-31263E7A5379}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>SCPSLDonortag</RootNamespace> | ||
<AssemblyName>SCPSLDonortag</AssemblyName> | ||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</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="Smod2"> | ||
<HintPath>..\..\..\..\Desktop\Smod2.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<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" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="JoinHandler.cs" /> | ||
<Compile Include="SCPSLDonortag.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |