add weapon parts

This commit is contained in:
Naruse
2026-04-30 17:18:23 +08:00
parent 49f4fdfda5
commit 2883ac3d41
12 changed files with 182 additions and 7 deletions

View File

@@ -0,0 +1,24 @@
using Newtonsoft.Json;
namespace MikuSB.Data.Excel;
[ResourceEntity("weapon_parts.json")]
public class WeaponPartsExcel : ExcelResource
{
public uint Genre { get; set; }
public uint Detail { get; set; }
public uint Particular { get; set; }
public uint Level { get; set; }
public uint Icon { get; set; }
public int AppearID { get; set; }
public string I18n { get; set; } = "";
public override uint GetId()
{
return (uint)I18n.GetHashCode();
}
public override void Loaded()
{
GameData.WeaponPartsData.Add(GetId(), this);
}
}

View File

@@ -25,6 +25,7 @@ public static class GameData
public static Dictionary<uint, ProfileExcel> ProfileData { get; private set; } = [];
public static Dictionary<uint, CardSkinPartsExcel> CardSkinPartsData { get; private set; } = [];
public static Dictionary<uint, CallItemExcel> CallItemData { get; private set; } = [];
public static Dictionary<uint, WeaponPartsExcel> WeaponPartsData { get; private set; } = [];
}
public static class GameResourceTemplateId

View File

@@ -62,6 +62,7 @@ public abstract class GrowableItemInfo : BaseGameItemInfo
public class GameWeaponInfo : GrowableItemInfo
{
[SugarColumn(IsJson = true)] public Dictionary<uint, ulong> PartSlots { get; set; } = [];
public override Item ToProto()
{
var proto = new Item
@@ -78,6 +79,7 @@ public class GameWeaponInfo : GrowableItemInfo
Evolue = Evolue
}
};
foreach (var (slot, uid) in PartSlots) proto.Slots[slot] = uid;
return proto;
}
}

View File

@@ -35,6 +35,7 @@ public class ServerTextCHS
/// </summary>
public class WordTextCHS
{
public string WeaponPart => "武器部件";
public string CallItem => "召唤道具";
public string SkinPart => "皮肤部件";
public string Profile => "个人资料";
@@ -246,6 +247,7 @@ public class GiveAllTextCHS
"用法:/giveall card <detail/-1> -p<特定> -l<等級>" +
"用法:/giveall profile <detail/-1> -g<类型> -p<特定> -l<等级>" +
"用法:/giveall skinpart <detail/-1> -g<類型> -p<特定> -l<等級>" +
"用法:/giveall weaponpart <detail/-1> -g<類型> -p<特定> -l<等級>" +
"用法:/giveall call <detail/-1> -g<類型> -p<特定> -l<等級>";
public string NotFound => "未找到 {0}";
public string GiveAllItems => "已向玩家添加 {0} 个 {1}";

View File

@@ -35,6 +35,7 @@ public class ServerTextCHT
/// </summary>
public class WordTextCHT
{
public string WeaponPart => "武器部件";
public string CallItem => "召喚道具";
public string SkinPart => "外觀部件";
public string Profile => "個人資料";
@@ -246,6 +247,7 @@ public class GiveAllTextCHT
"用法:/giveall card <detail/-1> -p<特定> -l<等級>" +
"用法:/giveall profile <detail/-1> -g<類型> -p<特定> -l<等級>" +
"用法:/giveall skinpart <detail/-1> -g<類型> -p<特定> -l<等級>" +
"用法:/giveall weaponpart <detail/-1> -g<類型> -p<特定> -l<等級>" +
"用法:/giveall call <detail/-1> -g<類型> -p<特定> -l<等級>";
public string NotFound => "未找到 {0}";
public string GiveAllItems => "已向玩家添加 {0} 個 {1}";

View File

@@ -35,6 +35,7 @@ public class ServerTextEN
/// </summary>
public class WordTextEN
{
public string WeaponPart => "Weapon Part";
public string CallItem => "Call Item";
public string SkinPart => "Skin Part";
public string Profile => "Profile";
@@ -212,6 +213,7 @@ public class GiveAllTextEN
"Usage: /giveall card <detail/-1> -p<particular> -l<level>" +
"Usage: /giveall profile <detail/-1> -g<genre> -p<particular> -l<level>" +
"Usage: /giveall skinpart <detail/-1> -g<genre> -p<particular> -l<level>" +
"Usage: /giveall weaponpart <detail/-1> -g<genre> -p<particular> -l<level>" +
"Usage: /giveall call <detail/-1> -g<genre> -p<particular> -l<level>";
public string NotFound => "{0} not found!";
public string GiveAllItems => "Added {0} {1} to player!";