add and fix a lot

This commit is contained in:
2025-06-05 01:11:30 +02:00
parent 9bf05f87aa
commit 17c654d889
23 changed files with 1235 additions and 65 deletions
+40
View File
@@ -0,0 +1,40 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<LangVersion>10</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>true</Optimize>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<DebugType>full</DebugType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<Optimize>true</Optimize>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<DebugType>none</DebugType>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>..\dependencies\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Mirror">
<HintPath>..\dependencies\Mirror.dll</HintPath>
</Reference>
<Reference Include="Pooling">
<HintPath>..\dependencies\Pooling.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\dependencies\UnityEngine.CoreModule.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Northwood.LabAPI" Version="1.0.2" />
</ItemGroup>
</Project>
+32
View File
@@ -0,0 +1,32 @@
using LabApi.Events.Arguments.PlayerEvents;
using LabApi.Events.Handlers;
using LabApi.Features;
using LabApi.Loader.Features.Plugins;
namespace CandySetting;
public class CandySetting : Plugin
{
public override string Name => "CandySetting";
public override string Author => "HoherGeist, Code002Lover";
public override Version Version { get; } = new(1, 0, 0);
public override string Description => "Edits # of Candy you can take";
public override Version RequiredApiVersion { get; } = new(LabApiProperties.CompiledVersion);
public int MaxUses { get; set; } = 6;
public override void Enable()
{
PlayerEvents.InteractingScp330 += TakingCandy;
}
public override void Disable()
{
PlayerEvents.InteractingScp330 -= TakingCandy;
}
private void TakingCandy(PlayerInteractingScp330EventArgs ev)
{
ev.AllowPunishment = ev.Uses > MaxUses;
}
}