Skip to content

Commit 360f009

Browse files
Uploading Source Code
1 parent 9468dc9 commit 360f009

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+35303
-0
lines changed

SB_WelcomeMessage/Config.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System.ComponentModel;
2+
3+
namespace SB_WelcomeMessage
4+
{
5+
public class Config
6+
{
7+
[Description("just de/activates the plugin")]
8+
public bool wlcAct { get; set; } = true;
9+
10+
[Description("Join message delay")]
11+
public int JoinMessageDelay { get; set; } = 5;
12+
13+
[Description("Join Message Text ({name} specifies the name of the joining player). For Rich Text Editing you can use this Guide -> https://sites.google.com/view/scpsl-config/unity-rich-text")]
14+
public string JoinMessage { get; set; } = "<b><color=#E8002A>Welcome on the YOUR COMMUNITY NAME Community</color>,</b> <i><color=#EB0079>{name}</color></i><b>!</b>";
15+
}
16+
}

SB_WelcomeMessage/Plugin.cs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using PluginAPI.Core;
2+
using PluginAPI.Core.Attributes;
3+
using PluginAPI.Enums;
4+
using FormatWith;
5+
6+
namespace SB_WelcomeMessage
7+
{
8+
public class Plugin
9+
{
10+
public static Plugin Singleton;
11+
12+
[PluginConfig] public Config Config;
13+
14+
public const string Version = "1.0.0";
15+
16+
[PluginPriority(LoadPriority.Highest)]
17+
[PluginEntryPoint("JoinMessage-System", Version, "Shows a Broadcast Message in the top of the Screen of the joining player.", "SpaceBuddy")]
18+
void LoadPlugin()
19+
{
20+
Singleton = this;
21+
PluginAPI.Events.EventManager.RegisterEvents(this);
22+
}
23+
24+
[PluginEvent(ServerEventType.PlayerJoined)]
25+
26+
public void OnPlayerJoin(Player player)
27+
{
28+
if (Config.wlcAct)
29+
{
30+
string JoinText = Config.JoinMessage.FormatWith(new
31+
{
32+
name = player.Nickname
33+
});
34+
player.SendBroadcast(JoinText, (ushort)Config.JoinMessageDelay);
35+
}
36+
}
37+
}
38+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// Allgemeine Informationen über eine Assembly werden über die folgenden
6+
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
7+
// die einer Assembly zugeordnet sind.
8+
[assembly: AssemblyTitle("SB_WelcomeMessage")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("SB_WelcomeMessage")]
13+
[assembly: AssemblyCopyright("Copyright © 2023")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
18+
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
19+
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
20+
[assembly: ComVisible(false)]
21+
22+
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
23+
[assembly: Guid("32b03091-9bc4-48fd-9146-130c539a8880")]
24+
25+
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
26+
//
27+
// Hauptversion
28+
// Nebenversion
29+
// Buildnummer
30+
// Revision
31+
//
32+
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
33+
// indem Sie "*" wie unten gezeigt eingeben:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{32B03091-9BC4-48FD-9146-130C539A8880}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>SB_WelcomeMessage</RootNamespace>
11+
<AssemblyName>SB_WelcomeMessage</AssemblyName>
12+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<Deterministic>true</Deterministic>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<DebugType>pdbonly</DebugType>
27+
<Optimize>true</Optimize>
28+
<OutputPath>bin\Release\</OutputPath>
29+
<DefineConstants>TRACE</DefineConstants>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
</PropertyGroup>
33+
<ItemGroup>
34+
<Reference Include="Assembly-CSharp">
35+
<HintPath>..\..\..\DLLS\Assembly-CSharp.dll</HintPath>
36+
</Reference>
37+
<Reference Include="Assembly-CSharp-firstpass">
38+
<HintPath>..\..\..\DLLS\Assembly-CSharp-firstpass.dll</HintPath>
39+
</Reference>
40+
<Reference Include="FormatWith, Version=3.0.1.0, Culture=neutral, PublicKeyToken=aa2680645c5ea719, processorArchitecture=MSIL">
41+
<HintPath>..\packages\FormatWith.3.0.1\lib\netstandard2.0\FormatWith.dll</HintPath>
42+
</Reference>
43+
<Reference Include="Mirror">
44+
<HintPath>..\..\..\DLLS\Mirror.dll</HintPath>
45+
</Reference>
46+
<Reference Include="PluginAPI, Version=12.0.0.0, Culture=neutral, processorArchitecture=AMD64">
47+
<HintPath>..\packages\Northwood.PluginAPI.12.0.0\lib\net48\PluginAPI.dll</HintPath>
48+
</Reference>
49+
<Reference Include="System" />
50+
<Reference Include="System.Core" />
51+
<Reference Include="System.Xml.Linq" />
52+
<Reference Include="System.Data.DataSetExtensions" />
53+
<Reference Include="Microsoft.CSharp" />
54+
<Reference Include="System.Data" />
55+
<Reference Include="System.Net.Http" />
56+
<Reference Include="System.Xml" />
57+
<Reference Include="UnityEngine.CoreModule">
58+
<HintPath>..\..\..\DLLS\UnityEngine.CoreModule.dll</HintPath>
59+
</Reference>
60+
<Reference Include="YamlDotNet, Version=11.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
61+
<HintPath>..\packages\YamlDotNet.11.0.1\lib\net45\YamlDotNet.dll</HintPath>
62+
</Reference>
63+
</ItemGroup>
64+
<ItemGroup>
65+
<Compile Include="Config.cs" />
66+
<Compile Include="Plugin.cs" />
67+
<Compile Include="Properties\AssemblyInfo.cs" />
68+
</ItemGroup>
69+
<ItemGroup>
70+
<None Include="packages.config" />
71+
</ItemGroup>
72+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
73+
</Project>
428 KB
Binary file not shown.
2.4 MB
Binary file not shown.
15 KB
Binary file not shown.

0 commit comments

Comments
 (0)