Skip to content

Commit f465ace

Browse files
committed
Update For 14.0.2
1 parent 636ba4d commit f465ace

13 files changed

Lines changed: 155 additions & 617 deletions

File tree

HelpSense/API/API.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ public static class API
1111

1212
public static bool TryGetLog(string id, out PlayerLog log)
1313
{
14-
if (PlayerDataDic.TryGetValue(id,out log))
14+
if (PlayerDataDic.TryGetValue(id, out log))
1515
{
1616
return true;
1717
}
1818
using LiteDatabase database = new(Plugin.Instance.Config.SavePath);
19-
log = database.GetCollection<PlayerLog>("Players")?.FindById(id);
19+
log = database.GetCollection<PlayerLog>("Players")?.FindById(id);
2020
if (log != null)
2121
{
2222
PlayerDataDic.Add(id, log);

HelpSense/API/Extensions/StringBuilderExtensions.cs

Lines changed: 0 additions & 107 deletions
This file was deleted.

HelpSense/API/InfoExtension.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace HelpSense.API
44
{
55
using HelpSense.API.Serialization;
6-
using HelpSense.ConfigSystem;
76
using HelpSense.Helper;
87
using LiteDB;
98
using MEC;
@@ -15,7 +14,7 @@ public static class InfoExtension
1514
public static PlayerLog GetLog(this Player ply)
1615
{
1716
PlayerLog toInsert = null;
18-
if (!API.TryGetLog(ply.UserId, out var log))
17+
if (!API.TryGetLog(ply.UserId, out PlayerLog log))
1918
{
2019
toInsert = new PlayerLog()
2120
{
@@ -44,7 +43,7 @@ public static PlayerLog GetLog(this ReferenceHub ply)
4443
PlayerLog toInsert = null;
4544
if (string.IsNullOrWhiteSpace(ply.authManager.UserId))
4645
throw new ArgumentNullException(nameof(ply));
47-
if (!API.TryGetLog(ply.authManager.UserId, out var log))
46+
if (!API.TryGetLog(ply.authManager.UserId, out PlayerLog log))
4847
{
4948
toInsert = new PlayerLog()
5049
{

HelpSense/Commands/InfoCommand.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using CommandSystem;
22
using HelpSense.API;
33
using HelpSense.API.Features.Pool;
4+
using HelpSense.API.Serialization;
5+
using PlayerRoles;
46
using PluginAPI.Core;
57
using System;
68

@@ -31,17 +33,17 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
3133
return false;
3234
}
3335

34-
var log = player.GetLog();
35-
var playedTimes = log.PlayedTimes;
36+
PlayerLog log = player.GetLog();
37+
int playedTimes = log.PlayedTimes;
3638
int hour = playedTimes / 3600;
3739
int day = hour / 24;
3840
int minutes = (playedTimes - hour * 3600) / 60;
3941

40-
var kills = log.PlayerKills;
41-
var scpKills = log.PlayerSCPKills;
42-
var playerDamage = log.PlayerDamage;
43-
var rolePlayed = log.RolePlayed;
44-
var playerDeath = log.PlayerDeath;
42+
int kills = log.PlayerKills;
43+
int scpKills = log.PlayerSCPKills;
44+
float playerDamage = log.PlayerDamage;
45+
int rolePlayed = log.RolePlayed;
46+
int playerDeath = log.PlayerDeath;
4547
var shot = log.PlayerShot;
4648

4749
var sb = StringBuilderPool.Pool.Get();

HelpSense/ConfigSystem/Config.cs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public class Config
9191
[Description("启用修改SCP血量系统")]
9292
public bool EnableChangeSCPHPSystem { get; set; } = true;
9393
[Description("SCP173,SCP939,SCP049,SCP049-2,SCP096,SCP106血量")]
94-
public List<float> SCPsHP { get; set; } = new List<float> { 4200, 2700, 2200, 400, 2500, 2200 };
94+
public List<float> SCPsHP { get; set; } = new List<float> { 4200, 2700, 2300, 400, 2500, 2300 };
9595

9696
// /////////////////////////////////////////////////
9797
[Description("启用.bc和.c聊天系统")]
@@ -133,19 +133,6 @@ public class Config
133133
[Description("混沌领导者")]
134134
public bool EnableChaosLeader { get; set; } = true;
135135

136-
/// /////////////////////////////////////////////////
137-
[Description("启用回合刷新时间显示")]
138-
public bool EnableRespawnTimer { get; set; } = true;
139-
[Description("列出将要用的时间名字")]
140-
public List<string> Timers { get; private set; } = new List<string>
141-
{
142-
"TimerList"
143-
};
144-
[Description("在回合结束时候重新刷新时间")]
145-
public bool ReloadTimerEachRound { get; private set; } = true;
146-
[Description("当玩家是Overwatch时候隐藏")]
147-
public bool HideTimerForOverwatch { get; private set; } = false;
148-
149136
/// /////////////////////////////////////////////////
150137
[Description("启用多变保安队")]
151138
public bool EnableBaoAn { get; set; } = true;

HelpSense/ConfigSystem/TranslateConfig.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ public class TranslateConfig
105105
///
106106
/// </summary>
107107
[Description("警卫叛变显示的公告")]
108-
public string GuardMutinyBroadcast { get; set; } = "<size=60><color=#ff0000ff>[警告]</color>此设施警卫已被混沌分裂者策反</size>";
108+
public string GuardMutinyBroadcast { get; set; } = "<size=40><color=#ff0000ff>[警告]</color>此设施警卫已被混沌分裂者策反</size>";
109109
[Description("警卫为精英队显示的公告")]
110-
public string EliteGuardBroadcast { get; set; } = "<size=60><color=#00ffffff>[通知]</color>此设施警卫为九尾狐精英队员,保安实力大增</size>";
110+
public string EliteGuardBroadcast { get; set; } = "<size=40><color=#00ffffff>[通知]</color>此设施警卫为九尾狐精英队员,保安实力大增</size>";
111111
/// <summary>
112112
///
113113
/// </summary>

HelpSense/HelpSense.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
<ItemGroup>
4545
<Compile Include="API\API.cs" />
4646
<Compile Include="API\InfoExtension.cs" />
47-
<Compile Include="API\Extensions\StringBuilderExtensions.cs" />
4847
<Compile Include="API\Features\Pool\IPool.cs" />
4948
<Compile Include="API\Features\Pool\StringBuilderPool.cs" />
5049
<Compile Include="API\Features\TimerView.cs" />
@@ -69,7 +68,6 @@
6968
<Compile Include="Helper\Misc\KeycardSystem.cs" />
7069
<Compile Include="Helper\Lobby\LobbyHelper.cs" />
7170
<Compile Include="Helper\Lobby\LobbyLocationType.cs" />
72-
<Compile Include="Helper\Misc\RespawnHelper.cs" />
7371
<Compile Include="Helper\SCP\SCPHPChangeSystem.cs" />
7472
<Compile Include="MonoBehaviors\PlayerGlowBehavior.cs" />
7573
<Compile Include="MonoBehaviors\PlayerLightBehavior.cs" />

0 commit comments

Comments
 (0)