Update 3.3 Resources (Items/Avatars/Weapons)

This commit is contained in:
2022-12-10 14:23:23 +08:00
parent 7dc2dcc9db
commit 72351ba60f
17 changed files with 7618 additions and 12247 deletions

View File

@@ -31,7 +31,7 @@ namespace GrasscutterTools.Game
ArtifactSubAttribution = new ItemMap(Resources.ArtifactSubAttribution);
Avatars = new ItemMap(Resources.Avatar);
AvatarColors = new ItemMap(Resources.AvatarColor);
Items = new ItemMap(Resources.Item);
Items = new ItemMapGroup(Resources.Item);
Monsters = new ItemMapGroup(Resources.Monsters);
Gadgets = new ItemMapGroup(Resources.Gadget);
Scenes = new ItemMap(Resources.Scene);
@@ -56,7 +56,7 @@ namespace GrasscutterTools.Game
public static ItemMap AvatarColors { get; private set; }
public static ItemMap Items { get; private set; }
public static ItemMapGroup Items { get; private set; }
public static ItemMapGroup Monsters { get; private set; }

View File

@@ -63,5 +63,21 @@ namespace GrasscutterTools.Game
/// 获取所有行
/// </summary>
public IEnumerable<string> AllLines => Values.SelectMany(it => it.Lines);
private string[] lines;
public string[] Lines => lines ?? (lines = AllLines.ToArray());
public string this[int id]
{
get
{
foreach (var map in Values) {
var n = map[id];
if (n != ItemMap.EmptyName)
return n;
}
return ItemMap.EmptyName;
}
}
}
}