Skip to content

Commit cdc21ce

Browse files
committed
添加项目文件。
1 parent 0aa1e70 commit cdc21ce

File tree

7 files changed

+267
-0
lines changed

7 files changed

+267
-0
lines changed

LabMorePlugins.sln

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.14.36121.58 d17.14
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LabMorePlugins", "LabMorePlugins\LabMorePlugins.csproj", "{5BC01A21-07FC-4803-BD73-77E95A035753}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Debug|x64 = Debug|x64
12+
Release|Any CPU = Release|Any CPU
13+
Release|x64 = Release|x64
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{5BC01A21-07FC-4803-BD73-77E95A035753}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17+
{5BC01A21-07FC-4803-BD73-77E95A035753}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{5BC01A21-07FC-4803-BD73-77E95A035753}.Debug|x64.ActiveCfg = Debug|x64
19+
{5BC01A21-07FC-4803-BD73-77E95A035753}.Debug|x64.Build.0 = Debug|x64
20+
{5BC01A21-07FC-4803-BD73-77E95A035753}.Release|Any CPU.ActiveCfg = Release|Any CPU
21+
{5BC01A21-07FC-4803-BD73-77E95A035753}.Release|Any CPU.Build.0 = Release|Any CPU
22+
{5BC01A21-07FC-4803-BD73-77E95A035753}.Release|x64.ActiveCfg = Release|x64
23+
{5BC01A21-07FC-4803-BD73-77E95A035753}.Release|x64.Build.0 = Release|x64
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {9284AD00-83A0-46EF-84A4-41961CF8D4B2}
30+
EndGlobalSection
31+
EndGlobal

LabMorePlugins/API/SAPI.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using Christmas.Scp2536.Gifts;
2+
using InventorySystem.Items.ThrowableProjectiles;
3+
using LabApi.Features.Wrappers;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Linq;
7+
using System.Text;
8+
using System.Threading.Tasks;
9+
10+
namespace LabMorePlugins.API
11+
{
12+
public static class SAPI
13+
{
14+
public static Random Random = new Random();
15+
}
16+
}

LabMorePlugins/Class1.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.ComponentModel;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace LabMorePlugins
9+
{
10+
public class Class1
11+
{
12+
public bool IsEnabled { get; set; } = true;
13+
}
14+
}
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
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>{5BC01A21-07FC-4803-BD73-77E95A035753}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>LabMorePlugins</RootNamespace>
11+
<AssemblyName>LabMorePlugins</AssemblyName>
12+
<TargetFrameworkVersion>v4.8.1</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+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
34+
<DebugSymbols>true</DebugSymbols>
35+
<OutputPath>bin\x64\Debug\</OutputPath>
36+
<DefineConstants>DEBUG;TRACE</DefineConstants>
37+
<DebugType>full</DebugType>
38+
<PlatformTarget>x64</PlatformTarget>
39+
<LangVersion>7.3</LangVersion>
40+
<ErrorReport>prompt</ErrorReport>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
43+
<OutputPath>bin\x64\Release\</OutputPath>
44+
<DefineConstants>TRACE</DefineConstants>
45+
<Optimize>true</Optimize>
46+
<DebugType>pdbonly</DebugType>
47+
<PlatformTarget>x64</PlatformTarget>
48+
<LangVersion>7.3</LangVersion>
49+
<ErrorReport>prompt</ErrorReport>
50+
</PropertyGroup>
51+
<ItemGroup>
52+
<Reference Include="Assembly-CSharp">
53+
<HintPath>..\..\..\..\Desktop\SCPSL14.1SERVER\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Assembly-CSharp.dll</HintPath>
54+
</Reference>
55+
<Reference Include="Assembly-CSharp-firstpass">
56+
<HintPath>..\..\..\..\Desktop\SCPSL14.1SERVER\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
57+
</Reference>
58+
<Reference Include="CommandSystem.Core">
59+
<HintPath>..\..\..\..\Desktop\SCPSL14.1SERVER\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\CommandSystem.Core.dll</HintPath>
60+
</Reference>
61+
<Reference Include="LabApi, Version=1.0.2.0, Culture=neutral, processorArchitecture=AMD64">
62+
<HintPath>..\packages\Northwood.LabAPI.1.0.2\lib\net48\LabApi.dll</HintPath>
63+
</Reference>
64+
<Reference Include="Mirror">
65+
<HintPath>..\..\..\..\Desktop\SCPSL14.1SERVER\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Mirror.dll</HintPath>
66+
</Reference>
67+
<Reference Include="NorthwoodLib">
68+
<HintPath>..\..\..\..\Desktop\SCPSL14.1SERVER\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\NorthwoodLib.dll</HintPath>
69+
</Reference>
70+
<Reference Include="System" />
71+
<Reference Include="System.Core" />
72+
<Reference Include="System.Xml.Linq" />
73+
<Reference Include="System.Data.DataSetExtensions" />
74+
<Reference Include="Microsoft.CSharp" />
75+
<Reference Include="System.Data" />
76+
<Reference Include="System.Net.Http" />
77+
<Reference Include="System.Xml" />
78+
<Reference Include="UnityEngine.CoreModule">
79+
<HintPath>..\..\..\..\Desktop\SCPSL14.1SERVER\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
80+
</Reference>
81+
<Reference Include="UnityEngine.PhysicsModule">
82+
<HintPath>..\..\..\..\Desktop\SCPSL14.1SERVER\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
83+
</Reference>
84+
<Reference Include="YamlDotNet, Version=11.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
85+
<HintPath>..\packages\YamlDotNet.11.0.1\lib\net45\YamlDotNet.dll</HintPath>
86+
</Reference>
87+
</ItemGroup>
88+
<ItemGroup>
89+
<Compile Include="API\SAPI.cs" />
90+
<Compile Include="Class1.cs" />
91+
<Compile Include="Plugin.cs" />
92+
<Compile Include="Properties\AssemblyInfo.cs" />
93+
</ItemGroup>
94+
<ItemGroup>
95+
<None Include="packages.config" />
96+
</ItemGroup>
97+
<ItemGroup>
98+
<Folder Include="Items\" />
99+
</ItemGroup>
100+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
101+
</Project>

LabMorePlugins/Plugin.cs

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
using LabApi.Events.Arguments.PlayerEvents;
2+
using LabApi.Events.Handlers;
3+
using LabApi.Features.Console;
4+
using LabApi.Features.Wrappers;
5+
using LabApi.Loader.Features.Plugins;
6+
using MEC;
7+
using System;
8+
using System.Collections.Generic;
9+
using System.Linq;
10+
using System.Text;
11+
using System.Threading.Tasks;
12+
13+
namespace LabMorePlugins
14+
{
15+
public class Plugin : Plugin<Class1>
16+
{
17+
public override string Name => "Lab综合插件";
18+
19+
public override string Description => "Lab综合插件";
20+
21+
public override string Author => "HUI(3145186196)";
22+
23+
public override Version Version => new Version(1,0);
24+
public static Class1 config;
25+
public static CoroutineHandle CoroutineHandle;
26+
public override Version RequiredApiVersion => new Version(LabApi.Features.LabApiProperties.CompiledVersion);
27+
28+
public override void Disable()
29+
{
30+
ServerEvents.RoundStarted -= OnStart;
31+
PlayerEvents.Spawned -= OnSpawned;
32+
PlayerEvents.Joined -= OnJoined;
33+
}
34+
35+
public override void Enable()
36+
{
37+
ServerEvents.RoundStarted += OnStart;
38+
PlayerEvents.Spawned += OnSpawned;
39+
PlayerEvents.Joined += OnJoined;
40+
}
41+
public void OnStart()
42+
{
43+
if (!Round.IsRoundEnded)
44+
{
45+
46+
}
47+
}
48+
public void OnSpawned(PlayerSpawnedEventArgs ev)
49+
{
50+
if(ev.Player!=null)
51+
{
52+
if (ev.Player.Role == PlayerRoles.RoleTypeId.ClassD)
53+
{
54+
ev.Player.AddItem(ItemType.KeycardJanitor);
55+
}
56+
}
57+
}
58+
public void OnJoined(PlayerJoinedEventArgs ev)
59+
{
60+
if (ev.Player!=null)
61+
{
62+
Logger.Info($"玩家{ev.Player.Nickname}加入服务器|Steam64ID为{ev.Player.UserId}");
63+
64+
}
65+
}
66+
}
67+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// 有关程序集的一般信息由以下
6+
// 控制。更改这些特性值可修改
7+
// 与程序集关联的信息。
8+
[assembly: AssemblyTitle("LabMorePlugins")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("P R C")]
12+
[assembly: AssemblyProduct("LabMorePlugins")]
13+
[assembly: AssemblyCopyright("Copyright © P R C 2025")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// 将 ComVisible 设置为 false 会使此程序集中的类型
18+
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19+
//请将此类型的 ComVisible 特性设置为 true。
20+
[assembly: ComVisible(false)]
21+
22+
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23+
[assembly: Guid("5bc01a21-07fc-4803-bd73-77e95a035753")]
24+
25+
// 程序集的版本信息由下列四个值组成:
26+
//
27+
// 主版本
28+
// 次版本
29+
// 生成号
30+
// 修订号
31+
//
32+
[assembly: AssemblyVersion("1.0.0.0")]
33+
[assembly: AssemblyFileVersion("1.0.0.0")]

LabMorePlugins/packages.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Northwood.LabAPI" version="1.0.2" targetFramework="net481" />
4+
<package id="YamlDotNet" version="11.0.1" targetFramework="net481" />
5+
</packages>

0 commit comments

Comments
 (0)