Skip to content

Commit 2f9ac14

Browse files
authored
beta2和万圣节 (#21)
* doc (#19) * 万圣节来力 (#20)
1 parent 5f4fdbb commit 2f9ac14

File tree

12 files changed

+81
-24
lines changed

12 files changed

+81
-24
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,4 +360,5 @@ MigrationBackup/
360360
.ionide/
361361

362362
# Fody - auto-generated XML schema
363-
FodyWeavers.xsd
363+
FodyWeavers.xsd
364+
/nuget.exe

Commands/ExpCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace BAPlugin.Command
1010
[CommandHandler(typeof(RemoteAdminCommandHandler))]
1111
public class ExpCommand : ICommand
1212
{
13-
public string Command => "experience";
13+
public string Command => "pexperience";
1414

1515
public string[] Aliases => ["pexp"];
1616

Players/CustomPlayer.cs

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,69 @@
1-
namespace YongAnFrame.Players
1+
using YongAnFrame.Roles;
2+
3+
namespace YongAnFrame.Players
24
{
35
public abstract class CustomPlayer(FramePlayer player)
46
{
7+
/// <summary>
8+
/// 拥有该实例的框架玩家
9+
/// </summary>
510
public FramePlayer FramePlayer { get; private set; } = player;
11+
/// <summary>
12+
/// 是否有效
13+
/// </summary>
614
public bool IsInvalid => FramePlayer == null;
7-
public float ExpMultiplier { get { return FramePlayer.ExpMultiplier; } set { FramePlayer.ExpMultiplier = value; } }
8-
public ulong Exp { get { return FramePlayer.Exp; } set { FramePlayer.Exp = value; } }
9-
public ulong Level { get { return FramePlayer.Level; } set { FramePlayer.Level = value; } }
15+
/// <summary>
16+
/// 实例拥有的自定义角色
17+
/// </summary>
18+
public CustomRolePlus CustomRolePlus => FramePlayer.CustomRolePlus;
19+
/// <summary>
20+
/// 提示系统管理器
21+
/// </summary>
1022
public HintManager HintManager => FramePlayer.HintManager;
11-
public PlayerTitle UsingTitles { get { return FramePlayer.UsingTitles; } set { FramePlayer.UsingTitles = value; } }
12-
public PlayerTitle UsingRankTitles { get { return FramePlayer.UsingRankTitles; } set { FramePlayer.UsingRankTitles = value; } }
23+
/// <summary>
24+
/// 正在使用的主要自定义算法
25+
/// </summary>
26+
public ICustomAlgorithm CustomAlgorithm { get => FramePlayer.CustomAlgorithm; set=> FramePlayer.CustomAlgorithm = value; }
27+
/// <summary>
28+
/// 玩家等级
29+
/// </summary>
30+
public ulong Level { get => FramePlayer.Level; set => FramePlayer.Level = value; }
31+
/// <summary>
32+
/// 玩家经验
33+
/// </summary>
34+
public ulong Exp { get => FramePlayer.Exp; set => FramePlayer.Exp = value; }
35+
/// <summary>
36+
/// 玩家经验倍率
37+
/// </summary>
38+
public float ExpMultiplier { get => FramePlayer.ExpMultiplier; set => FramePlayer.ExpMultiplier = value; }
39+
/// <summary>
40+
/// 玩家批准绕过DNT
41+
/// </summary>
42+
public bool IsBDNT { get => FramePlayer.IsBDNT; set => FramePlayer.IsBDNT = value; }
43+
/// <summary>
44+
/// 正在使用的名称称号
45+
/// </summary>
46+
public PlayerTitle UsingTitles { get => FramePlayer.UsingTitles; set => FramePlayer.UsingTitles = value; }
1347

48+
/// <summary>
49+
/// 正在使用的排名称号
50+
/// </summary>
51+
public PlayerTitle UsingRankTitles { get => FramePlayer.UsingRankTitles; set => FramePlayer.UsingRankTitles = value; }
52+
53+
/// <summary>
54+
/// 添加经验
55+
/// </summary>
56+
/// <param name="exp">数值</param>
57+
/// <param name="name">原因</param>
1458
public void AddExp(ulong exp, string name = "未知原因")
1559
{
1660
FramePlayer.AddExp(exp, name);
1761
}
18-
62+
/// <summary>
63+
/// 调用后该实例会立刻无效<br/>
64+
/// 调用后该实例会立刻无效<br/>
65+
/// 调用后该实例会立刻无效
66+
/// </summary>
1967
public virtual void Invalid()
2068
{
2169
FramePlayer = null;

Players/FramePlayer.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ internal FramePlayer(Player player)
124124
Events.Handlers.FramePlayer.OnFramePlayerCreated(new FramePlayerCreatedEventArgs(this));
125125
}
126126

127+
/// <summary>
128+
/// 添加经验
129+
/// </summary>
130+
/// <param name="exp">数值</param>
131+
/// <param name="name">原因</param>
127132
public void AddExp(ulong exp, string name = "未知原因")
128133
{
129134
float globalExpMultiplier = YongAnFramePlugin.Instance.Config.GlobalExpMultiplier;

Players/HintManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public IEnumerator<float> Update()
3333
string[] text = new string[36];
3434

3535
int used = 0;
36-
text[used] = $"YongAnFrame 1.0.0-Beta1";
36+
text[used] = $"YongAnFrame 1.0.0-Beta2";
3737

3838
if (fPlayer.ExPlayer.DoNotTrack && !fPlayer.IsBDNT)
3939
{

Players/ICustomAlgorithm.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
{
33
public interface ICustomAlgorithm
44
{
5+
/// <summary>
6+
/// 获取升级所需要的经验
7+
/// </summary>
8+
/// <param name="level"></param>
9+
/// <returns></returns>
510
public ulong GetNeedUpLevel(ulong level);
611
}
712
}

Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
3232
//通过使用 "*",如下所示:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.0.0.9")]
35-
[assembly: AssemblyFileVersion("1.0.0.9")]
34+
[assembly: AssemblyVersion("1.0.0.10")]
35+
[assembly: AssemblyFileVersion("1.0.0.10")]

Roles/Properties/SkillProperties.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace YongAnFrame.Roles.Properties
22
{
3-
public struct SkillProperties(string name, string statement, string description, float activeMaxTime, float burialMaxTime, ItemType useItem = ItemType.Coin)
3+
public readonly struct SkillProperties(string name, string statement, string description, float activeMaxTime, float burialMaxTime, ItemType useItem = ItemType.Coin)
44
{
55
/// <summary>
66
/// 技能名称

YongAnFrame.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@
135135
<None Include="README.md" />
136136
<None Include="YongAnFrame.nuspec" />
137137
</ItemGroup>
138-
<ItemGroup />
139138
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
140139
<PropertyGroup>
141140
<PostBuildEvent>

YongAnFrame.nuspec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22
<package >
33
<metadata>
44
<id>$id$</id>
5-
<version>1.0.0-beta1</version>
5+
<version>1.0.0-beta2</version>
66
<title>$title$</title>
77
<authors>$author$</authors>
8-
<requireLicenseAcceptance>false</requireLicenseAcceptance>
8+
<requireLicenseAcceptance>true</requireLicenseAcceptance>
99
<license type="expression">LGPL-2.1-only</license>
1010
<!-- <icon>icon.png</icon> -->
11+
<readme>docs\README.md</readme>
1112
<projectUrl>https://github.com/YongAn404/YongAnFrame</projectUrl>
1213
<description>$description$</description>
1314
<releaseNotes>$version$</releaseNotes>
1415
<copyright>$copyright$</copyright>
1516
<tags>EXILED SCPSL</tags>
1617
</metadata>
1718
<files>
19+
<file src="README.md" target="docs\" />
1820
<file src="lib\net48\SCPSLAudioApi.dll" target="lib/net48/SCPSLAudioApi.dll" />
1921
</files>
2022
</package>

0 commit comments

Comments
 (0)