public FieldItemDefinition(ushort id, ushort dig, ushort pick, string name, FieldItemKind kind) { Index = id; Dig = dig; Pick = pick; Name = name; Kind = kind; }
public static ItemKind ToItemKind(this FieldItemKind type) { if (type.IsTree()) { return(ItemKind.Kind_Tree); } if (type.IsFlower()) { return(ItemKind.Kind_Flower); } if (type.IsWeed()) { return(ItemKind.Kind_Weed); } return(ItemKind.Unknown); }
public static bool IsWeed(this FieldItemKind type) => type is >= PltWeedAut0 and <= PltWeedWin1;
public static bool IsStone(this FieldItemKind type) => StoneA <= type && type <= StoneE;
public static bool IsTree(this FieldItemKind type) => PltTreeBamboo <= type && type <= PltTreePalm;
public static bool IsFlower(this FieldItemKind type) => PltFlwAnemone <= type && type <= PltFlwYuri;
public static bool IsBush(this FieldItemKind type) => PltBushAzalea <= type && type <= PltBushOsmanthus;
public static bool IsFence(this FieldItemKind type) => FenceBamboo <= type && type <= FenceWoodWhite;
public static bool IsPlant(this FieldItemKind type) => PltFlwAnemone <= type && type <= PltWeedWin1;
public static bool IsWeed(this FieldItemKind type) => PltWeedAut0 <= type && type <= PltWeedWin1;
public FieldItemDefinition(ushort id, string name, FieldItemKind kind) { Index = id; Name = name; Kind = kind; }