Added MenuIcon for all items (#354)
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<None Remove="Resources\byte\item_kind.bin" />
|
||||
<None Remove="Resources\byte\item_menuicon.bin" />
|
||||
<None Remove="Resources\byte\item_size.bin" />
|
||||
<None Remove="Resources\byte\outside.bin" />
|
||||
<None Remove="Resources\text\de\internal_de.txt" />
|
||||
|
|
@ -95,6 +96,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\byte\item_kind.bin" />
|
||||
<EmbeddedResource Include="Resources\byte\item_menuicon.bin" />
|
||||
<EmbeddedResource Include="Resources\byte\item_size.bin" />
|
||||
<EmbeddedResource Include="Resources\byte\outside.bin" />
|
||||
<EmbeddedResource Include="Resources\text\de\internal_de.txt" />
|
||||
|
|
|
|||
BIN
NHSE.Core/Resources/byte/item_menuicon.bin
Normal file
|
|
@ -8,6 +8,7 @@ public static class ItemInfo
|
|||
// derived from bcsv; only some data is needed for our logic
|
||||
private static readonly byte[] ItemKinds = ResourceUtil.GetBinaryResource("item_kind.bin");
|
||||
private static readonly byte[] ItemSizes = ResourceUtil.GetBinaryResource("item_size.bin");
|
||||
private static readonly ushort[] ItemMenuIcons = ResourceUtil.GetBinaryResourceAsUshort("item_menuicon.bin");
|
||||
|
||||
public static ItemKind GetItemKind(Item item) => GetItemKind(item.DisplayItemId);
|
||||
|
||||
|
|
@ -32,5 +33,12 @@ public static ItemSizeType GetItemSize(ushort id)
|
|||
return ItemSizeType.Unknown;
|
||||
return (ItemSizeType)ItemSizes[id];
|
||||
}
|
||||
|
||||
public static ItemMenuIconType GetMenuIcon(ushort id)
|
||||
{
|
||||
if (id > ItemMenuIcons.Length)
|
||||
return ItemMenuIconType.Unknown;
|
||||
return (ItemMenuIconType)ItemMenuIcons[id];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
532
NHSE.Core/Structures/Item/ItemMenuIconType.cs
Normal file
|
|
@ -0,0 +1,532 @@
|
|||
namespace NHSE.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Menu icons (image shown in the inventory) of Items
|
||||
/// </summary>
|
||||
#pragma warning disable CA1027 // Mark enums with FlagsAttribute
|
||||
public enum ItemMenuIconType : ushort
|
||||
#pragma warning restore CA1027 // Mark enums with FlagsAttribute
|
||||
{
|
||||
Akoyagai,
|
||||
Amaebi,
|
||||
Anemone0,
|
||||
Anemone1,
|
||||
Anemone2,
|
||||
Anemone3,
|
||||
Anemone4,
|
||||
Anemone5,
|
||||
Apple,
|
||||
AutumnLeaf,
|
||||
Awabi,
|
||||
Axe,
|
||||
AxeDull,
|
||||
BadKabu,
|
||||
Bag,
|
||||
Baigai,
|
||||
BanbooShoot,
|
||||
BdayCupcake,
|
||||
BellExchangeTicket,
|
||||
Book,
|
||||
BookRecipe,
|
||||
Boots,
|
||||
BottleRecipe,
|
||||
Bottoms,
|
||||
Bridge,
|
||||
Can,
|
||||
Cap,
|
||||
Cardboard,
|
||||
Carpet,
|
||||
Cherry,
|
||||
Chinanago,
|
||||
ChristmasOrnamentA,
|
||||
ChristmasOrnamentB,
|
||||
ChristmasOrnamentC,
|
||||
Coconut,
|
||||
Coin,
|
||||
Cosmos0,
|
||||
Cosmos1,
|
||||
Cosmos2,
|
||||
Cosmos3,
|
||||
Cosmos4,
|
||||
Cosmos5,
|
||||
Cracker,
|
||||
Daiougusokumushi,
|
||||
DIYAcorn,
|
||||
DIYBamboo,
|
||||
DIYBambooSpring,
|
||||
DIYBranch,
|
||||
DIYPinecone,
|
||||
DIYWoodHard,
|
||||
DIYWoodNormal,
|
||||
DIYWoodSoft,
|
||||
DungenessCrab,
|
||||
EggFish,
|
||||
EggForest,
|
||||
EggGround,
|
||||
EggLeaf,
|
||||
EggRock,
|
||||
EggSky,
|
||||
Fence,
|
||||
Fish54,
|
||||
FishAji,
|
||||
FishAngelfish,
|
||||
FishAntyobi,
|
||||
FishArowana,
|
||||
FishAyu,
|
||||
FishBait,
|
||||
FishBeta,
|
||||
FishBlackbass,
|
||||
FishBlueguill,
|
||||
FishChouchinankou,
|
||||
FishChouchouuo,
|
||||
FishDemekin,
|
||||
FishDemenigisu,
|
||||
FishDojou,
|
||||
FishDokutaafish,
|
||||
FishDolado,
|
||||
FishDonko,
|
||||
FishEi,
|
||||
FishEndorikerii,
|
||||
FishFugu,
|
||||
FishFuna,
|
||||
FishGa,
|
||||
FishGoldenTorauto,
|
||||
FishGuppi,
|
||||
FishHanahigeutubo,
|
||||
FishHarisenbon,
|
||||
FishHirame,
|
||||
FishIka,
|
||||
Fishingrod,
|
||||
FishIshidai,
|
||||
FishItou,
|
||||
FishJinbeezame,
|
||||
FishKaeru,
|
||||
FishKajiki,
|
||||
FishKamitsukigame,
|
||||
FishKarei,
|
||||
FishKingsalmon,
|
||||
FishKingyo,
|
||||
FishKobanzame,
|
||||
FishKoi,
|
||||
FishKumanomi,
|
||||
FishKurione,
|
||||
FishMaguro,
|
||||
FishManbou,
|
||||
FishMedaka,
|
||||
FishMinokasago,
|
||||
FishNamazu,
|
||||
FishNanyouhagi,
|
||||
FishNaporeonfish,
|
||||
FishNeontetora,
|
||||
FishNishikigoi,
|
||||
FishNokogirizame,
|
||||
FishOikawa,
|
||||
FishOoiwana,
|
||||
FishOtamajakusi,
|
||||
FishPaiku,
|
||||
FishPirania,
|
||||
FishPiraruku,
|
||||
FishRaigyo,
|
||||
FishRainbowfish,
|
||||
FishRouninaji,
|
||||
FishRyuuguunotukai,
|
||||
FishSake,
|
||||
FishSame,
|
||||
FishShiira,
|
||||
FishShumokuzame,
|
||||
FishSirakansu,
|
||||
FishSuppon,
|
||||
FishSuzuki,
|
||||
FishSyanhaigani,
|
||||
FishTai,
|
||||
FishTanago,
|
||||
FishTatsunootoshigo,
|
||||
FishThirapia,
|
||||
FishTyouzame,
|
||||
FishUgui,
|
||||
FishUtsubo,
|
||||
FishWakasagi,
|
||||
FishYamame,
|
||||
FishYellowparch,
|
||||
FishZarigani,
|
||||
Floor,
|
||||
Fossil,
|
||||
FossilJ,
|
||||
FtrFishRanchu,
|
||||
FtrInsectTagame,
|
||||
Fujitsubo,
|
||||
GAxe,
|
||||
Gazami,
|
||||
GFishingrod,
|
||||
Glasses,
|
||||
GlowStick,
|
||||
GNet,
|
||||
GoldenRose,
|
||||
GPachinko,
|
||||
Gscoop,
|
||||
GWatering,
|
||||
Helmet,
|
||||
Hiramushi,
|
||||
Hitode,
|
||||
Honeycomb,
|
||||
Hotaruika,
|
||||
Hotate,
|
||||
HowtoBookExpansion,
|
||||
HowtoBookHair,
|
||||
Hoya,
|
||||
Hyacinth0,
|
||||
Hyacinth1,
|
||||
Hyacinth2,
|
||||
Hyacinth3,
|
||||
Hyacinth4,
|
||||
Hyacinth5,
|
||||
Hyacinth6,
|
||||
InsAburazemi,
|
||||
InsAgehacho,
|
||||
InsAkaeri,
|
||||
InsAkiakane,
|
||||
InsAmenbo,
|
||||
InsAosuji,
|
||||
InsArekisandora,
|
||||
InsAri,
|
||||
InsBaiorinmushi,
|
||||
InsDangomushi,
|
||||
InsFunamushi,
|
||||
InsFunkorogashi,
|
||||
InsGa,
|
||||
InsGengorou,
|
||||
InsGinyanma,
|
||||
InsGirafanokogiri,
|
||||
InsGomadarakamikiri,
|
||||
InsGoraiasu,
|
||||
InsHachi,
|
||||
InsHae,
|
||||
InsHanakamakiri,
|
||||
InsHanmyou,
|
||||
InsHerakuresu,
|
||||
InsHigurashi,
|
||||
InsHosoakakuwagata,
|
||||
InsHotaru,
|
||||
InsHousekizoumushi,
|
||||
InsInago,
|
||||
InsJinmenkamemushi,
|
||||
InsKa,
|
||||
InsKabutomushi,
|
||||
InsKamakiri,
|
||||
InsKamemushi,
|
||||
InsKanabun,
|
||||
InsKarasuageha,
|
||||
InsKatatsumuri,
|
||||
InsKirigirisu,
|
||||
InsKohkasasu,
|
||||
InsKohrogi,
|
||||
InsKonohamushi,
|
||||
InsKumazemi,
|
||||
InsKumo,
|
||||
InsMiirotateha,
|
||||
InsMinminzemi,
|
||||
InsMinomushi,
|
||||
InsMitsubachi,
|
||||
InsMiyamakuwagata,
|
||||
InsMonkicho,
|
||||
InsMonshirocho,
|
||||
InsMorufuocho,
|
||||
InsMukade,
|
||||
InsNanafushi,
|
||||
InsNijiirokuwagata,
|
||||
InsNishikiohtsu,
|
||||
InsNokogirikuwagata,
|
||||
InsNomi,
|
||||
InsOhgomamadara,
|
||||
InsOhkabamadara,
|
||||
InsOhkuwagata,
|
||||
InsOhmurasaki,
|
||||
InsOhsenchikogane,
|
||||
InsOkera,
|
||||
InsOniyanma,
|
||||
InsOugononikuwa,
|
||||
InsPurachinakogane,
|
||||
InsRuriboshikamikiri,
|
||||
InsSasori,
|
||||
InsSeminonukegara,
|
||||
InsShoryobatta,
|
||||
InsSuzumushi,
|
||||
InsTamamushi,
|
||||
InsTaranchura,
|
||||
InsTentoumushi,
|
||||
InsTonosamabatta,
|
||||
InsTsukutsuku,
|
||||
InsYadokari,
|
||||
InsYonagunisan,
|
||||
InsZoukabuto,
|
||||
Iseebi,
|
||||
Isogintyaku,
|
||||
Itotonbo,
|
||||
JohnnyQuestDust1,
|
||||
JohnyParts,
|
||||
Kabu,
|
||||
Kabutogani,
|
||||
Kairoudouketsu,
|
||||
Kaki,
|
||||
Koumoridako,
|
||||
Kurumaebi,
|
||||
Leaf,
|
||||
LostQuestMemo,
|
||||
Love,
|
||||
Medicine,
|
||||
Mendako,
|
||||
MessageBottleEgg,
|
||||
Mizukurage,
|
||||
MoneyBag010,
|
||||
MoneyBag039,
|
||||
MoneyBag069,
|
||||
Muhrugai,
|
||||
Mum0,
|
||||
Mum1,
|
||||
Mum2,
|
||||
Mum3,
|
||||
Mum4,
|
||||
Mum5,
|
||||
Mush0,
|
||||
Mush1,
|
||||
Mush2,
|
||||
Mush3,
|
||||
Mush4,
|
||||
Music,
|
||||
MyDesignPro,
|
||||
Namako,
|
||||
Net,
|
||||
Ocarina,
|
||||
Onepiece,
|
||||
Orange,
|
||||
OreClay,
|
||||
OreGold,
|
||||
OreIron,
|
||||
OreStone,
|
||||
Oumugai,
|
||||
Pachinko,
|
||||
Paipuuni,
|
||||
Panflute,
|
||||
Pansi0,
|
||||
Pansi1,
|
||||
Pansi2,
|
||||
Pansi3,
|
||||
Pansi4,
|
||||
Pansi5,
|
||||
PaperRecipe,
|
||||
Peach,
|
||||
Pear,
|
||||
Pearl,
|
||||
PirateQuest,
|
||||
PlaneTicket,
|
||||
PltAnemone0,
|
||||
PltAnemone1,
|
||||
PltAnemone2,
|
||||
PltAnemone3,
|
||||
PltAnemone4,
|
||||
PltAnemone5,
|
||||
PltApple,
|
||||
PltAzaleaPink,
|
||||
PltAzaleaWhite,
|
||||
PltBamboo,
|
||||
PltBushCamelliaPink,
|
||||
PltBushCamelliaRed,
|
||||
PltBushOsmathusOrange,
|
||||
PltBushOsmathusYellow,
|
||||
PltCherry,
|
||||
PltConifer,
|
||||
PltCosmos0,
|
||||
PltCosmos1,
|
||||
PltCosmos2,
|
||||
PltCosmos3,
|
||||
PltCosmos4,
|
||||
PltCosmos5,
|
||||
PltGoldenRose,
|
||||
PltHibiscusRed,
|
||||
PltHibiscusYellow,
|
||||
PltHolly,
|
||||
PltHyacinth0,
|
||||
PltHyacinth1,
|
||||
PltHyacinth2,
|
||||
PltHyacinth3,
|
||||
PltHyacinth4,
|
||||
PltHyacinth5,
|
||||
PltHyacinth6,
|
||||
PltHydrangeaBlue,
|
||||
PltHydrangeaPink,
|
||||
PltMoney,
|
||||
PltMum0,
|
||||
PltMum1,
|
||||
PltMum2,
|
||||
PltMum3,
|
||||
PltMum4,
|
||||
PltMum5,
|
||||
PltOak,
|
||||
PltOrange,
|
||||
PltPalm,
|
||||
PltPansi0,
|
||||
PltPansi1,
|
||||
PltPansi2,
|
||||
PltPansi3,
|
||||
PltPansi4,
|
||||
PltPansi5,
|
||||
PltPeach,
|
||||
PltPear,
|
||||
PltRose0,
|
||||
PltRose1,
|
||||
PltRose2,
|
||||
PltRose3,
|
||||
PltRose4,
|
||||
PltRose5,
|
||||
PltRose6,
|
||||
PltRose7,
|
||||
PltSuzuran,
|
||||
PltTurip0,
|
||||
PltTurip1,
|
||||
PltTurip2,
|
||||
PltTurip3,
|
||||
PltTurip4,
|
||||
PltTurip5,
|
||||
PltTurip6,
|
||||
PltYuri0,
|
||||
PltYuri1,
|
||||
PltYuri2,
|
||||
PltYuri3,
|
||||
PltYuri4,
|
||||
PltYuri5,
|
||||
Porch,
|
||||
Post,
|
||||
Present,
|
||||
Present2,
|
||||
RemakeKit,
|
||||
RollanTicket,
|
||||
Rose0,
|
||||
Rose1,
|
||||
Rose2,
|
||||
Rose3,
|
||||
Rose4,
|
||||
Rose5,
|
||||
Rose6,
|
||||
Rose7,
|
||||
Sakurapetal,
|
||||
Sazae,
|
||||
Scoop,
|
||||
Seedling,
|
||||
SeedlingBush,
|
||||
SeedlingConifer,
|
||||
SeedPaperbag0,
|
||||
SeedPaperbag1,
|
||||
SeedPaperbag2,
|
||||
SeedPaperbag3,
|
||||
SeedPitfall,
|
||||
Senjunamako,
|
||||
Shako,
|
||||
Shakogai,
|
||||
Shell1,
|
||||
Shell2,
|
||||
Shell3,
|
||||
Shell4,
|
||||
Shell6,
|
||||
Shell7,
|
||||
Shell8,
|
||||
ShellFIshAsari,
|
||||
ShellSummer,
|
||||
Shoes,
|
||||
Slope,
|
||||
SmartphoneCase,
|
||||
SnowCrystal,
|
||||
SnowCrystalLarge,
|
||||
Socks,
|
||||
StarPiece,
|
||||
StarpieceAquarius,
|
||||
StarpieceAries,
|
||||
StarpieceCancer,
|
||||
StarpieceCapricornus,
|
||||
StarpieceGemini,
|
||||
StarpieceLeo,
|
||||
StarpieceLibra,
|
||||
StarpiecePisces,
|
||||
StarPieceRare,
|
||||
StarpieceSagittarius,
|
||||
StarpieceScorpio,
|
||||
StarpieceTaurus,
|
||||
StarpieceVirgo,
|
||||
TailorTicket,
|
||||
Takaashigani,
|
||||
Tako,
|
||||
Tambourine,
|
||||
Tarabagani,
|
||||
Tent,
|
||||
TentWhite,
|
||||
Timer,
|
||||
Tire,
|
||||
ToolChangeStick,
|
||||
ToolCliffMaker,
|
||||
ToolGroundMaker,
|
||||
ToolLadder,
|
||||
ToolRiverJump,
|
||||
ToolRiverMaker,
|
||||
Tops,
|
||||
Turip0,
|
||||
Turip1,
|
||||
Turip2,
|
||||
Turip3,
|
||||
Turip4,
|
||||
Turip5,
|
||||
Turip6,
|
||||
Uchiwa,
|
||||
Umbrella,
|
||||
Umibudou,
|
||||
Umiushi,
|
||||
Uni,
|
||||
Wakame,
|
||||
Wall,
|
||||
Watering,
|
||||
WBagBlack,
|
||||
WBagBlue,
|
||||
WBagBrown,
|
||||
WBagGary,
|
||||
WBagGold,
|
||||
WBagGreen,
|
||||
WBagLightBlue,
|
||||
WBagLightGreen,
|
||||
WBagMint,
|
||||
WBagNavy,
|
||||
WBagOrange,
|
||||
WBagPink,
|
||||
WBagPurple,
|
||||
WBagRed,
|
||||
WBagWhite,
|
||||
WBagYellow,
|
||||
Weed,
|
||||
WetSuit,
|
||||
Wig,
|
||||
WPaperBlack,
|
||||
WPaperBlue,
|
||||
WPaperBrown,
|
||||
WPaperGold,
|
||||
WPaperGray,
|
||||
WPaperGreen,
|
||||
WPaperLightBlue,
|
||||
WPaperLightGreen,
|
||||
WPaperMint,
|
||||
WPaperNavy,
|
||||
WPaperOrange,
|
||||
WPaperPink,
|
||||
WPaperPurple,
|
||||
WPaperRed,
|
||||
WPaperWhite,
|
||||
WPaperYellow,
|
||||
YellowPaperBag,
|
||||
Yuri0,
|
||||
Yuri1,
|
||||
Yuri2,
|
||||
Yuri3,
|
||||
Yuri4,
|
||||
Yuri5,
|
||||
YutaroWisp,
|
||||
Zuwaigani,
|
||||
|
||||
Unknown = ushort.MaxValue,
|
||||
}
|
||||
}
|
||||
|
|
@ -57,6 +57,15 @@ public static byte[] GetBinaryResource(string name)
|
|||
return buffer;
|
||||
}
|
||||
|
||||
public static ushort[] GetBinaryResourceAsUshort(string name)
|
||||
{
|
||||
var byteBuffer = GetBinaryResource(name);
|
||||
var buffer = new ushort[byteBuffer.Length / 2];
|
||||
for (int i = 0; i < byteBuffer.Length / 2; i++)
|
||||
buffer[i] = BitConverter.ToUInt16(byteBuffer, i*2);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public static string? GetStringResource(string name)
|
||||
{
|
||||
if (!resourceNameMap.TryGetValue(name, out var resname))
|
||||
|
|
|
|||
|
|
@ -47,6 +47,16 @@ void DumpB(string fn, byte[] bytes, string dir = "bin")
|
|||
Console.WriteLine($"Created {fn}");
|
||||
}
|
||||
|
||||
void DumpU(string fn, ushort[] ushorts, string dir = "bin")
|
||||
{
|
||||
Directory.CreateDirectory(Path.Combine(dest, dir));
|
||||
byte[] bytes = new byte[ushorts.Length * 2];
|
||||
Buffer.BlockCopy(ushorts, 0, bytes, 0, ushorts.Length * 2);
|
||||
File.WriteAllBytes(Path.Combine(dest, dir, fn), bytes);
|
||||
Console.WriteLine($"Created {fn}");
|
||||
}
|
||||
|
||||
|
||||
DumpS("bcsv_map.txt", BCSV.EnumLookup.Dump());
|
||||
DumpS("lifeSupportAchievement.txt", GetLifeSupportAchievementList(pathBCSV));
|
||||
DumpS("recipeDictionary.txt", GetRecipeList(pathBCSV));
|
||||
|
|
@ -64,6 +74,7 @@ void DumpB(string fn, byte[] bytes, string dir = "bin")
|
|||
|
||||
DumpS("ItemKind.txt", GetPossibleEnum(pathBCSV, "ItemParam.bcsv", 0xFC275E86));
|
||||
DumpS("ItemSize.txt", GetPossibleEnum(pathBCSV, "ItemParam.bcsv", 0xE06FB090));
|
||||
DumpS("ItemMenuIcon.txt", GetPossibleEnum(pathBCSV, "ItemParam.bcsv", 0x348D7B06));
|
||||
DumpS("PlantKind.txt", GetPossibleEnum(pathBCSV, "FgMainParam.bcsv", 0x48EF0398));
|
||||
DumpS("TerrainKind.txt", GetNumberedEnumValues(pathBCSV, "FieldLandMakingUnitModelParam.bcsv", 0x39B5A93D, 0x54706054));
|
||||
DumpS("BridgeKind.txt", GetNumberedEnumValues(pathBCSV, "StructureBridgeParam.bcsv", 0x39B5A93D, 0x54706054));
|
||||
|
|
@ -75,6 +86,7 @@ void DumpB(string fn, byte[] bytes, string dir = "bin")
|
|||
|
||||
DumpB("item_kind.bin", GetItemKindArray(pathBCSV));
|
||||
DumpB("item_size.bin", GetItemSizeArray(pathBCSV));
|
||||
DumpU("item_menuicon.bin", GetItemMenuIconArray(pathBCSV));
|
||||
DumpS("plants.txt", GetPlantedNames(pathBCSV));
|
||||
DumpS("item_size_dictionary.txt", GetItemSizeDictionary(pathBCSV));
|
||||
DumpS("item_remake.txt", GetItemRemakeDictionary(pathBCSV));
|
||||
|
|
@ -216,6 +228,39 @@ public static byte[] GetItemSizeArray(string pathBCSV, string fn = "ItemParam.bc
|
|||
return result;
|
||||
}
|
||||
|
||||
public static ushort[] GetItemMenuIconArray(string pathBCSV, string fn = "ItemParam.bcsv")
|
||||
{
|
||||
var path = Path.Combine(pathBCSV, fn);
|
||||
var data = File.ReadAllBytes(path);
|
||||
var bcsv = new BCSV(data);
|
||||
|
||||
var dict = bcsv.GetFieldDictionary();
|
||||
var fType = dict[0x348D7B06];
|
||||
var fID = dict[0x54706054];
|
||||
|
||||
var types = new Dictionary<ushort, ItemMenuIconType>();
|
||||
ushort max = 0;
|
||||
for (int i = 0; i < bcsv.EntryCount; i++)
|
||||
{
|
||||
var id = bcsv.ReadValue(i, fID);
|
||||
var ival = ushort.Parse(id);
|
||||
var type = bcsv.ReadValue(i, fType).TrimEnd('\0');
|
||||
|
||||
if (!Enum.TryParse<ItemMenuIconType>(type, out var k))
|
||||
throw new InvalidEnumArgumentException($"{type} is not a known enum value @ index {i}. Update the enum index first.");
|
||||
types.Add(ival, k);
|
||||
|
||||
if (ival > max)
|
||||
max = ival;
|
||||
}
|
||||
|
||||
ushort[] result = new ushort[max + 1];
|
||||
foreach (var kvp in types)
|
||||
result[kvp.Key] = (ushort)kvp.Value;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string[] GetItemSizeDictionary(string pathBCSV, string fn = "ItemSize.bcsv")
|
||||
{
|
||||
var path = Path.Combine(pathBCSV, fn);
|
||||
|
|
|
|||
|
|
@ -2132,6 +2132,7 @@ enum_5db8059c5629_f2952caee23e = (
|
|||
('Tops' , '装備品:トップス'),
|
||||
('Bottoms' , '装備品:ボトムス'),
|
||||
('Onepiece' , '装備品:ワンピース'),
|
||||
('WetSuit' , '装備品:マリンスーツ'),
|
||||
('Socks' , '装備品:靴下'),
|
||||
('Shoes' , '装備品:靴'),
|
||||
('Cap' , '装備品:帽子'),
|
||||
|
|
@ -2444,6 +2445,46 @@ enum_5db8059c5629_f2952caee23e = (
|
|||
('Can' , 'あきカン'),
|
||||
('Boots' , 'ながぐつ'),
|
||||
('Tire' , 'タイヤ'),
|
||||
('Fish54' , 'ロブスター'),
|
||||
('Wakame' , 'ワカメ'),
|
||||
('Umibudou' , 'ウミブドウ'),
|
||||
('Uni' , 'ウニ'),
|
||||
('Fujitsubo' , 'フジツボ'),
|
||||
('Kaki' , 'カキ'),
|
||||
('Sazae' , 'サザエ'),
|
||||
('Awabi' , 'アワビ'),
|
||||
('Akoyagai' , 'アコヤガイ'),
|
||||
('Hotate' , 'ホタテ'),
|
||||
('Isogintyaku' , 'イソギンチャク'),
|
||||
('Hitode' , 'ヒトデ'),
|
||||
('Namako' , 'ナマコ'),
|
||||
('Umiushi' , 'ウミウシ'),
|
||||
('Hiramushi' , 'ヒラムシ'),
|
||||
('Shako' , 'シャコ'),
|
||||
('Amaebi' , 'アマエビ'),
|
||||
('Kurumaebi' , 'クルマエビ'),
|
||||
('Iseebi' , 'イセエビ'),
|
||||
('Zuwaigani' , 'ズワイガニ'),
|
||||
('Tarabagani' , 'タラバガニ'),
|
||||
('Takaashigani' , 'タカアシガニ'),
|
||||
('Tako' , 'タコ'),
|
||||
('Chinanago' , 'チンアナゴ'),
|
||||
('Oumugai' , 'オウムガイ'),
|
||||
('Kabutogani' , 'カブトガニ'),
|
||||
('Daiougusokumushi' , 'ダイオウグソクムシ'),
|
||||
('Hotaruika' , 'ホタルイカ'),
|
||||
('Gazami' , 'ガザミ'),
|
||||
('Koumoridako' , 'コウモリダコ'),
|
||||
('Shakogai' , 'オオシャコガイ'),
|
||||
('Hoya' , 'ホヤ'),
|
||||
('Mizukurage' , 'ミズクラゲ'),
|
||||
('Mendako' , 'メンダコ'),
|
||||
('Paipuuni' , 'パイプウニ'),
|
||||
('Baigai' , 'バイガイ'),
|
||||
('Senjunamako' , 'センジュナマコ'),
|
||||
('DungenessCrab' , 'ダンジネスクラブ'),
|
||||
('Kairoudouketsu' , 'カイロウドウケツ'),
|
||||
('Muhrugai' , 'ムールガイ'),
|
||||
('Apple' , 'リンゴ'),
|
||||
('Orange' , 'オレンジ'),
|
||||
('Pear' , 'ナシ'),
|
||||
|
|
@ -2610,6 +2651,8 @@ enum_5db8059c5629_f2952caee23e = (
|
|||
('EggFish' , 'サカナのたまご'),
|
||||
('MessageBottleEgg' , 'たまごのメッセージボトル'),
|
||||
('Love' , 'あいのけっしょう'),
|
||||
('Pearl' , 'しんじゅ'),
|
||||
('PirateQuest' , 'むせんき'),
|
||||
)
|
||||
|
||||
enum_5fe6f47ed555_cd0b35a4b9fb = (
|
||||
|
|
|
|||
|
|
@ -58,7 +58,12 @@ public static Bitmap GetItemMarkup(Item item, Font font, int width, int height,
|
|||
return null;
|
||||
|
||||
if (!GetItemImageSprite(id, out var path))
|
||||
return Resources.leaf;
|
||||
{
|
||||
if (!GetMenuIconSprite(id, out var img))
|
||||
return Resources.leaf;
|
||||
else
|
||||
return img;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -73,6 +78,13 @@ public static Bitmap GetItemMarkup(Item item, Font font, int width, int height,
|
|||
}
|
||||
}
|
||||
|
||||
private static bool GetMenuIconSprite(ushort id, out Image? img)
|
||||
{
|
||||
ItemMenuIconType iconType = ItemInfo.GetMenuIcon(id);
|
||||
img = (Image?)Resources.ResourceManager.GetObject(iconType == ItemMenuIconType.Leaf ? iconType.ToString() + "1" : iconType.ToString()); // the 1 stops the original "leaf" being overwritten
|
||||
return img != null;
|
||||
}
|
||||
|
||||
private static bool GetItemImageSprite(ushort id, out string? path)
|
||||
{
|
||||
path = string.Empty;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\MenuIcon\" />
|
||||
<Folder Include="Resources\Villagers\" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
5190
NHSE.Sprites/Properties/Resources.Designer.cs
generated
BIN
NHSE.Sprites/Resources/MenuIcon/Akoyagai.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Amaebi.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Anemone0.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Anemone1.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Anemone2.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Anemone3.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Anemone4.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Anemone5.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Apple.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/AutumnLeaf.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Awabi.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Axe.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/AxeDull.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/BadKabu.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Bag.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Baigai.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/BanbooShoot.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/BdayCupcake.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/BellExchangeTicket.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Book.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/BookRecipe.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Boots.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/BottleRecipe.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Bottoms.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Bridge.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Can.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Cap.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Cardboard.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Carpet.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Cherry.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Chinanago.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/ChristmasOrnamentA.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/ChristmasOrnamentB.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/ChristmasOrnamentC.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Coconut.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Coin.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Cosmos0.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Cosmos1.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Cosmos2.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Cosmos3.png
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Cosmos4.png
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Cosmos5.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Cracker.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/DIYAcorn.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/DIYBamboo.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/DIYBambooSpring.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/DIYBranch.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/DIYPinecone.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/DIYWoodHard.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/DIYWoodNormal.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/DIYWoodSoft.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Daiougusokumushi.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/DungenessCrab.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/EggFish.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/EggForest.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/EggGround.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/EggLeaf.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/EggRock.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/EggSky.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Fence.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/Fish54.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishAji.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishAngelfish.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishAntyobi.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishArowana.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishAyu.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishBait.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishBeta.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishBlackbass.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishBlueguill.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishChouchinankou.png
Normal file
|
After Width: | Height: | Size: 9.9 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishChouchouuo.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishDemekin.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishDemenigisu.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishDojou.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishDokutaafish.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishDolado.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishDonko.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishEi.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishEndorikerii.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishFugu.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishFuna.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishGa.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishGoldenTorauto.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishGuppi.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishHanahigeutubo.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishHarisenbon.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishHirame.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
NHSE.Sprites/Resources/MenuIcon/FishIka.png
Normal file
|
After Width: | Height: | Size: 10 KiB |