style: 清理未使用的引用并添加缩进

This commit is contained in:
3cxc
2026-02-12 17:31:16 +08:00
parent 4570b966c4
commit c19d4c2f9f
16 changed files with 23 additions and 88 deletions

View File

@@ -1,15 +1,9 @@
using EasyTools.Configs;
using EasyTools.Events;
using GameCore;
using EasyTools.Events;
using LabApi.Features.Wrappers;
using MEC;
using NewXp.IniApi;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Log = LabApi.Features.Console.Logger;
namespace EasyTools.BadgeSystem

View File

@@ -4,10 +4,6 @@ using EasyTools.Events;
using LabApi.Features.Wrappers;
using RelativePositioning;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EasyTools.Commands
{

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
namespace EasyTools.Configs
{

View File

@@ -3,9 +3,6 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EasyTools.Configs
{
@@ -25,7 +22,7 @@ namespace EasyTools.Configs
public ushort AutoServerMessageTimer { get; set; } = 5;
[Description("服务器广播文本")]
public List<string> AutoServerMessageText { get; set; } = ["服务器广播1","服务器广播2"];
public List<string> AutoServerMessageText { get; set; } = ["服务器广播1", "服务器广播2"];
/// /////////////////////////////////////////////////
[Description("启用.bc和.c聊天系统")]

View File

@@ -1,11 +1,4 @@
using LabApi.Loader.Features.Paths;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
namespace EasyTools.Configs
{

View File

@@ -1,11 +1,7 @@
using LabApi.Loader.Features.Paths;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EasyTools.Configs
{

View File

@@ -1,11 +1,7 @@
using EasyTools.Utils;
using PlayerRoles;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EasyTools.Configs
{

View File

@@ -1,12 +1,7 @@
using EasyTools.DataBase.Serialization;
using EasyTools.Events;
using LiteDB;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine.LowLevel;
namespace EasyTools.DataBase
{
@@ -22,7 +17,7 @@ namespace EasyTools.DataBase
return true;
}
using LiteDatabase database = new(CustomEventHandler.DataBaseConfig.database_path);
if ((data = database.GetCollection<PlayerData>("Players")?.FindById(id)) != null)
{
PlayerDataDic.Add(id, data);

View File

@@ -1,10 +1,10 @@
using System.Collections.Generic;
using EasyTools.DataBase.Serialization;
using EasyTools.DataBase.Serialization;
using EasyTools.Events;
using LabApi.Features.Wrappers;
using LiteDB;
using MEC;
using System;
using System.Collections.Generic;
namespace EasyTools.DataBase
{

View File

@@ -1,31 +1,19 @@
using CommandSystem.Commands.RemoteAdmin.Decontamination;
using EasyTools.BadgeSystem;
using EasyTools.BadgeSystem;
using EasyTools.Configs;
using EasyTools.Utils;
using GameCore;
using HintServiceMeow.UI.Utilities;
using InventorySystem.Items;
using LabApi.Events.Arguments.PlayerEvents;
using LabApi.Events.Arguments.ServerEvents;
using LabApi.Events.CustomHandlers;
using LabApi.Features.Wrappers;
using MEC;
using NewXp.IniApi;
using PlayerRoles;
using PlayerStatsSystem;
using RemoteAdmin.Communication;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.LowLevel;
using static Broadcast;
using static UnityEngine.GraphicsBuffer;
using Log = LabApi.Features.Console.Logger;
namespace EasyTools.Events
@@ -123,7 +111,7 @@ namespace EasyTools.Events
{
Badge.Remove(player);
}
}
public override void OnPlayerHurting(PlayerHurtingEventArgs ev)
@@ -239,7 +227,7 @@ namespace EasyTools.Events
{
Timing.CallDelayed(0.5f, () =>
{
Player.GiveCandy(InventorySystem.Items.Usables.Scp330.CandyKindID.Pink, ItemAddReason.AdminCommand);
Player.GiveCandy(InventorySystem.Items.Usables.Scp330.CandyKindID.Pink, ItemAddReason.AdminCommand);
});
}
@@ -386,7 +374,7 @@ namespace EasyTools.Events
}
else if (randomValue < 15f && !success) // 5% 粉糖
{
player.GiveCandy(InventorySystem.Items.Usables.Scp330.CandyKindID.Pink,ItemAddReason.Undefined);
player.GiveCandy(InventorySystem.Items.Usables.Scp330.CandyKindID.Pink, ItemAddReason.Undefined);
rewardName = "获得了粉糖";
success = true;
}
@@ -412,7 +400,8 @@ namespace EasyTools.Events
if (healthIndex)
{
player.AddItem(ItemType.SCP500);
}else
}
else
{
player.AddItem(ItemType.Medkit);
}
@@ -450,7 +439,8 @@ namespace EasyTools.Events
{
PocketDimension.ForceInside(player);
rewardName = "传送到老头空间";
}else
}
else
{
PocketDimension.ForceExit(player);
rewardName = "离开了老头空间";

View File

@@ -1,17 +1,10 @@
using EasyTools.Configs;
using EasyTools.Events;
using LabApi.Events.CustomHandlers;
using LabApi.Events.Handlers;
using LabApi.Features;
using LabApi.Features.Wrappers;
using LabApi.Loader;
using LabApi.Loader.Features.Plugins;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EasyTools
{

View File

@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下

View File

@@ -7,8 +7,6 @@ using PlayerRoles;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EasyTools.Utils
{

View File

@@ -2,8 +2,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NewXp.IniApi
{

View File

@@ -1,12 +1,8 @@
using CustomPlayerEffects;
using EasyTools.Events;
using EasyTools.Events;
using LabApi.Features.Wrappers;
using MEC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
namespace EasyTools.Utils
@@ -45,14 +41,14 @@ namespace EasyTools.Utils
_lastHealth[p] = lastHealth;
Vector3 pos = p.Position;
if(_lastMove.TryGetValue(p,out var last))
if (_lastMove.TryGetValue(p, out var last))
{
if (Vector3.Distance(pos,last.pos) < 0.1f)
if (Vector3.Distance(pos, last.pos) < 0.1f)
{
bool canceled = false;
// 检测是否正在受伤
if (_lastDamageTime.TryGetValue(p,out var lastDamageTime))
if (_lastDamageTime.TryGetValue(p, out var lastDamageTime))
{
if (DateTime.UtcNow - lastDamageTime < TimeSpan.FromSeconds(CustomEventHandler.Config.heal_atk_secend)) { canceled = true; }
}
@@ -68,8 +64,10 @@ namespace EasyTools.Utils
}
}
else { _lastMove[p] = (pos, DateTime.UtcNow); }
}else { _lastMove[p] = (pos, DateTime.UtcNow); }
}else if (_lastMove.ContainsKey(p)) { _lastMove.Remove(p); }
}
else { _lastMove[p] = (pos, DateTime.UtcNow); }
}
else if (_lastMove.ContainsKey(p)) { _lastMove.Remove(p); }
}
yield return Timing.WaitForSeconds(1f);
}

View File

@@ -3,9 +3,6 @@ using LabApi.Features.Wrappers;
using MEC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EasyTools.Utils
{