diff --git a/.gitignore b/.gitignore
index 9491a2f..9c2122d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -360,4 +360,5 @@ MigrationBackup/
.ionide/
# Fody - auto-generated XML schema
-FodyWeavers.xsd
\ No newline at end of file
+FodyWeavers.xsd
+/nuget.exe
diff --git a/Commands/ExpCommand.cs b/Commands/ExpCommand.cs
index fd0e992..0a0c6c3 100644
--- a/Commands/ExpCommand.cs
+++ b/Commands/ExpCommand.cs
@@ -10,7 +10,7 @@ namespace BAPlugin.Command
[CommandHandler(typeof(RemoteAdminCommandHandler))]
public class ExpCommand : ICommand
{
- public string Command => "experience";
+ public string Command => "pexperience";
public string[] Aliases => ["pexp"];
diff --git a/Players/CustomPlayer.cs b/Players/CustomPlayer.cs
index f03ab6f..f670c2e 100644
--- a/Players/CustomPlayer.cs
+++ b/Players/CustomPlayer.cs
@@ -1,21 +1,69 @@
-namespace YongAnFrame.Players
+using YongAnFrame.Roles;
+
+namespace YongAnFrame.Players
{
public abstract class CustomPlayer(FramePlayer player)
{
+ ///
+ /// 拥有该实例的框架玩家
+ ///
public FramePlayer FramePlayer { get; private set; } = player;
+ ///
+ /// 是否有效
+ ///
public bool IsInvalid => FramePlayer == null;
- public float ExpMultiplier { get { return FramePlayer.ExpMultiplier; } set { FramePlayer.ExpMultiplier = value; } }
- public ulong Exp { get { return FramePlayer.Exp; } set { FramePlayer.Exp = value; } }
- public ulong Level { get { return FramePlayer.Level; } set { FramePlayer.Level = value; } }
+ ///
+ /// 实例拥有的自定义角色
+ ///
+ public CustomRolePlus CustomRolePlus => FramePlayer.CustomRolePlus;
+ ///
+ /// 提示系统管理器
+ ///
public HintManager HintManager => FramePlayer.HintManager;
- public PlayerTitle UsingTitles { get { return FramePlayer.UsingTitles; } set { FramePlayer.UsingTitles = value; } }
- public PlayerTitle UsingRankTitles { get { return FramePlayer.UsingRankTitles; } set { FramePlayer.UsingRankTitles = value; } }
+ ///
+ /// 正在使用的主要自定义算法
+ ///
+ public ICustomAlgorithm CustomAlgorithm { get => FramePlayer.CustomAlgorithm; set=> FramePlayer.CustomAlgorithm = value; }
+ ///
+ /// 玩家等级
+ ///
+ public ulong Level { get => FramePlayer.Level; set => FramePlayer.Level = value; }
+ ///
+ /// 玩家经验
+ ///
+ public ulong Exp { get => FramePlayer.Exp; set => FramePlayer.Exp = value; }
+ ///
+ /// 玩家经验倍率
+ ///
+ public float ExpMultiplier { get => FramePlayer.ExpMultiplier; set => FramePlayer.ExpMultiplier = value; }
+ ///
+ /// 玩家批准绕过DNT
+ ///
+ public bool IsBDNT { get => FramePlayer.IsBDNT; set => FramePlayer.IsBDNT = value; }
+ ///
+ /// 正在使用的名称称号
+ ///
+ public PlayerTitle UsingTitles { get => FramePlayer.UsingTitles; set => FramePlayer.UsingTitles = value; }
+ ///
+ /// 正在使用的排名称号
+ ///
+ public PlayerTitle UsingRankTitles { get => FramePlayer.UsingRankTitles; set => FramePlayer.UsingRankTitles = value; }
+
+ ///
+ /// 添加经验
+ ///
+ /// 数值
+ /// 原因
public void AddExp(ulong exp, string name = "未知原因")
{
FramePlayer.AddExp(exp, name);
}
-
+ ///
+ /// 调用后该实例会立刻无效
+ /// 调用后该实例会立刻无效
+ /// 调用后该实例会立刻无效
+ ///
public virtual void Invalid()
{
FramePlayer = null;
diff --git a/Players/FramePlayer.cs b/Players/FramePlayer.cs
index 4638ac1..a0e79c4 100644
--- a/Players/FramePlayer.cs
+++ b/Players/FramePlayer.cs
@@ -124,6 +124,11 @@ internal FramePlayer(Player player)
Events.Handlers.FramePlayer.OnFramePlayerCreated(new FramePlayerCreatedEventArgs(this));
}
+ ///
+ /// 添加经验
+ ///
+ /// 数值
+ /// 原因
public void AddExp(ulong exp, string name = "未知原因")
{
float globalExpMultiplier = YongAnFramePlugin.Instance.Config.GlobalExpMultiplier;
diff --git a/Players/HintManager.cs b/Players/HintManager.cs
index ab461a6..b7a0879 100644
--- a/Players/HintManager.cs
+++ b/Players/HintManager.cs
@@ -33,7 +33,7 @@ public IEnumerator Update()
string[] text = new string[36];
int used = 0;
- text[used] = $"YongAnFrame 1.0.0-Beta1";
+ text[used] = $"YongAnFrame 1.0.0-Beta2";
if (fPlayer.ExPlayer.DoNotTrack && !fPlayer.IsBDNT)
{
diff --git a/Players/ICustomAlgorithm.cs b/Players/ICustomAlgorithm.cs
index b0fe2ea..e1db85b 100644
--- a/Players/ICustomAlgorithm.cs
+++ b/Players/ICustomAlgorithm.cs
@@ -2,6 +2,11 @@
{
public interface ICustomAlgorithm
{
+ ///
+ /// 获取升级所需要的经验
+ ///
+ ///
+ ///
public ulong GetNeedUpLevel(ulong level);
}
}
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
index 77da955..fc4bdde 100644
--- a/Properties/AssemblyInfo.cs
+++ b/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.9")]
-[assembly: AssemblyFileVersion("1.0.0.9")]
+[assembly: AssemblyVersion("1.0.0.10")]
+[assembly: AssemblyFileVersion("1.0.0.10")]
diff --git a/Roles/Properties/SkillProperties.cs b/Roles/Properties/SkillProperties.cs
index 20995b3..728ecf6 100644
--- a/Roles/Properties/SkillProperties.cs
+++ b/Roles/Properties/SkillProperties.cs
@@ -1,6 +1,6 @@
namespace YongAnFrame.Roles.Properties
{
- public struct SkillProperties(string name, string statement, string description, float activeMaxTime, float burialMaxTime, ItemType useItem = ItemType.Coin)
+ public readonly struct SkillProperties(string name, string statement, string description, float activeMaxTime, float burialMaxTime, ItemType useItem = ItemType.Coin)
{
///
/// 技能名称
diff --git a/YongAnFrame.csproj b/YongAnFrame.csproj
index fe80bc7..688469a 100644
--- a/YongAnFrame.csproj
+++ b/YongAnFrame.csproj
@@ -135,7 +135,6 @@
-
diff --git a/YongAnFrame.nuspec b/YongAnFrame.nuspec
index 099a32c..2e36c58 100644
--- a/YongAnFrame.nuspec
+++ b/YongAnFrame.nuspec
@@ -2,12 +2,13 @@
$id$
- 1.0.0-beta1
+ 1.0.0-beta2
$title$
$author$
- false
+ true
LGPL-2.1-only
+ docs\README.md
https://github.com/YongAn404/YongAnFrame
$description$
$version$
@@ -15,6 +16,7 @@
EXILED SCPSL
+
\ No newline at end of file
diff --git a/YongAnTool.cs b/YongAnTool.cs
index 50eb8e1..af68928 100644
--- a/YongAnTool.cs
+++ b/YongAnTool.cs
@@ -39,15 +39,12 @@ public static FramePlayer ToFPlayer(this Player p)
public static RefreshTeamType ToRefreshTeamType(this SpawnableTeamType stp)
{
- switch (stp)
+ return stp switch
{
- case SpawnableTeamType.ChaosInsurgency:
- return RefreshTeamType.CI;
- case SpawnableTeamType.NineTailedFox:
- return RefreshTeamType.MTF;
- default:
- return RefreshTeamType.Start;
- }
+ SpawnableTeamType.ChaosInsurgency => RefreshTeamType.CI,
+ SpawnableTeamType.NineTailedFox => RefreshTeamType.MTF,
+ _ => RefreshTeamType.Start,
+ };
}
}
}
diff --git a/nuget.exe b/nuget.exe
deleted file mode 100644
index cf79c12..0000000
Binary files a/nuget.exe and /dev/null differ