From 802393def0d3d4d8e1ee6ac04bcdf855a4feed2a Mon Sep 17 00:00:00 2001 From: crazywh1t3 <32772327+crazywh1t3@users.noreply.github.com> Date: Mon, 16 Feb 2026 00:02:32 +0200 Subject: [PATCH] Move typeAliases var in its own file. + new item types. --- pkg/nip/aliases.go | 104 -------------------------------------- pkg/nip/typealiases.go | 112 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+), 104 deletions(-) create mode 100644 pkg/nip/typealiases.go diff --git a/pkg/nip/aliases.go b/pkg/nip/aliases.go index be28531..67f4b3a 100644 --- a/pkg/nip/aliases.go +++ b/pkg/nip/aliases.go @@ -1,109 +1,5 @@ package nip -import "github.com/hectorgimenez/d2go/pkg/data/item" - -var TypeAliases = typeAliases -var typeAliases = map[string]string{ - "shield": item.TypeShield, - "armor": item.TypeArmor, - "gold": item.TypeGold, - "bowquiver": item.TypeBowQuiver, - "crossbowquiver": item.TypeCrossbowQuiver, - "playerbodypart": item.TypePlayerBodyPart, - "herb": item.TypeHerb, - "potion": item.TypePotion, - "ring": item.TypeRing, - "elixir": item.TypeElixir, - "amulet": item.TypeAmulet, - "charm": item.TypeCharm, - "boots": item.TypeBoots, - "gloves": item.TypeGloves, - "book": item.TypeBook, - "belt": item.TypeBelt, - "gem": item.TypeGem, - "torch": item.TypeTorch, - "scroll": item.TypeScroll, - "scepter": item.TypeScepter, - "wand": item.TypeWand, - "staff": item.TypeStaff, - "bow": item.TypeBow, - "axe": item.TypeAxe, - "club": item.TypeClub, - "sword": item.TypeSword, - "hammer": item.TypeHammer, - "knife": item.TypeKnife, - "spear": item.TypeSpear, - "polearm": item.TypePolearm, - "crossbow": item.TypeCrossbow, - "mace": item.TypeMace, - "helm": item.TypeHelm, - "missilepotion": item.TypeMissilePotion, - "quest": item.TypeQuest, - "bodypart": item.TypeBodyPart, - "key": item.TypeKey, - "throwingknife": item.TypeThrowingKnife, - "throwingaxe": item.TypeThrowingAxe, - "javelin": item.TypeJavelin, - "weapon": item.TypeWeapon, - "meleeweapon": item.TypeMeleeWeapon, - "missileweapon": item.TypeMissileWeapon, - "thrownweapon": item.TypeThrownWeapon, - "comboweapon": item.TypeComboWeapon, - "anyarmor": item.TypeAnyArmor, - "anyshield": item.TypeAnyShield, - "miscellaneous": item.TypeMiscellaneous, - "socketfiller": item.TypeSocketFiller, - "secondhand": item.TypeSecondHand, - "stavesandrods": item.TypeStavesAndRods, - "missile": item.TypeMissile, - "blunt": item.TypeBlunt, - "jewel": item.TypeJewel, - "classspecific": item.TypeClassSpecific, - "amazonitem": item.TypeAmazonItem, - "barbarianitem": item.TypeBarbarianItem, - "necromanceritem": item.TypeNecromancerItem, - "paladinitem": item.TypePaladinItem, - "sorceressitem": item.TypeSorceressItem, - "assassinitem": item.TypeAssassinItem, - "druiditem": item.TypeDruidItem, - "handtohand": item.TypeHandtoHand, - "orb": item.TypeOrb, - "voodooheads": item.TypeVoodooHeads, - "auricshields": item.TypeAuricShields, - "primalhelm": item.TypePrimalHelm, - "pelt": item.TypePelt, - "cloak": item.TypeCloak, - "rune": item.TypeRune, - "circlet": item.TypeCirclet, - "healingpotion": item.TypeHealingPotion, - "manapotion": item.TypeManaPotion, - "rejuvpotion": item.TypeRejuvPotion, - "staminapotion": item.TypeStaminaPotion, - "antidotepotion": item.TypeAntidotePotion, - "thawingpotion": item.TypeThawingPotion, - "smallcharm": item.TypeSmallCharm, - "mediumcharm": item.TypeMediumCharm, - "largecharm": item.TypeLargeCharm, - "amazonbow": item.TypeAmazonBow, - "amazonspear": item.TypeAmazonSpear, - "amazonjavelin": item.TypeAmazonJavelin, - "assassinclaw": item.TypeHandtoHand2, - "magicbowquiv": item.TypeMagicBowQuiv, - "magicxbowquiv": item.TypeMagicXbowQuiv, - "chippedgem": item.TypeChippedGem, - "flawedgem": item.TypeFlawedGem, - "standardgem": item.TypeStandardGem, - "flawlessgem": item.TypeFlawlessGem, - "perfectgem": item.TypePerfectGem, - "amethyst": item.TypeAmethyst, - "diamond": item.TypeDiamond, - "emerald": item.TypeEmerald, - "ruby": item.TypeRuby, - "sapphire": item.TypeSapphire, - "topaz": item.TypeTopaz, - "skull": item.TypeSkull, -} - var qualityAliases = map[string]int{ "lowquality": 1, "normal": 2, diff --git a/pkg/nip/typealiases.go b/pkg/nip/typealiases.go new file mode 100644 index 0000000..dbf9e8b --- /dev/null +++ b/pkg/nip/typealiases.go @@ -0,0 +1,112 @@ +package nip + +import "github.com/hectorgimenez/d2go/pkg/data/item" + +var TypeAliases = typeAliases +var typeAliases = map[string]string{ + "amazonbow": item.TypeAmazonBow, + "amazonitem": item.TypeAmazonItem, + "amazonjavelin": item.TypeAmazonJavelin, + "amazonspear": item.TypeAmazonSpear, + "amethyst": item.TypeAmethyst, + "amulet": item.TypeAmulet, + "antidotepotion": item.TypeAntidotePotion, + "anyarmor": item.TypeAnyArmor, + "anyshield": item.TypeAnyShield, + "armor": item.TypeArmor, + "assassinclaw": item.TypeHandtoHand2, + "assassinitem": item.TypeAssassinItem, + "auricshields": item.TypeAuricShields, + "axe": item.TypeAxe, + "barbarianitem": item.TypeBarbarianItem, + "belt": item.TypeBelt, + "blunt": item.TypeBlunt, + "bodypart": item.TypeBodyPart, + "book": item.TypeBook, + "boots": item.TypeBoots, + "bow": item.TypeBow, + "bowquiver": item.TypeBowQuiver, + "charm": item.TypeCharm, + "chippedgem": item.TypeChippedGem, + "circlet": item.TypeCirclet, + "classspecific": item.TypeClassSpecific, + "cloak": item.TypeCloak, + "club": item.TypeClub, + "colossaljewel": item.TypeColossalJewel, + "comboweapon": item.TypeComboWeapon, + "craftedsundercharm": item.TypeCraftedSunderCharm, + "crossbow": item.TypeCrossbow, + "crossbowquiver": item.TypeCrossbowQuiver, + "diamond": item.TypeDiamond, + "druiditem": item.TypeDruidItem, + "elixir": item.TypeElixir, + "emerald": item.TypeEmerald, + "flawedgem": item.TypeFlawedGem, + "flawlessgem": item.TypeFlawlessGem, + "gem": item.TypeGem, + "gloves": item.TypeGloves, + "gold": item.TypeGold, + "grimoire": item.TypeGrimoire, + "hammer": item.TypeHammer, + "handtohand": item.TypeHandtoHand, + "handtohand2": item.TypeHandtoHand2, + "healingpotion": item.TypeHealingPotion, + "helm": item.TypeHelm, + "herb": item.TypeHerb, + "javelin": item.TypeJavelin, + "jewel": item.TypeJewel, + "key": item.TypeKey, + "knife": item.TypeKnife, + "largecharm": item.TypeLargeCharm, + "mace": item.TypeMace, + "magicbowquiv": item.TypeMagicBowQuiv, + "magicxbowquiv": item.TypeMagicXbowQuiv, + "manapotion": item.TypeManaPotion, + "mediumcharm": item.TypeMediumCharm, + "meleeweapon": item.TypeMeleeWeapon, + "miscellaneous": item.TypeMiscellaneous, + "missile": item.TypeMissile, + "missilepotion": item.TypeMissilePotion, + "missileweapon": item.TypeMissileWeapon, + "necromanceritem": item.TypeNecromancerItem, + "orb": item.TypeOrb, + "paladinitem": item.TypePaladinItem, + "pelt": item.TypePelt, + "perfectgem": item.TypePerfectGem, + "playerbodypart": item.TypePlayerBodyPart, + "polearm": item.TypePolearm, + "potion": item.TypePotion, + "primalhelm": item.TypePrimalHelm, + "quest": item.TypeQuest, + "rejuvpotion": item.TypeRejuvPotion, + "ring": item.TypeRing, + "ruby": item.TypeRuby, + "rune": item.TypeRune, + "sapphire": item.TypeSapphire, + "scepter": item.TypeScepter, + "scroll": item.TypeScroll, + "secondhand": item.TypeSecondHand, + "shield": item.TypeShield, + "skull": item.TypeSkull, + "smallcharm": item.TypeSmallCharm, + "socketfiller": item.TypeSocketFiller, + "sorceressitem": item.TypeSorceressItem, + "spear": item.TypeSpear, + "spearsandpolearms": item.TypeSpearsandPolearms, + "staff": item.TypeStaff, + "staminapotion": item.TypeStaminaPotion, + "standardgem": item.TypeStandardGem, + "stavesandrods": item.TypeStavesAndRods, + "sword": item.TypeSword, + "swordsandknives": item.TypeSwordsandKnives, + "thawingpotion": item.TypeThawingPotion, + "throwingaxe": item.TypeThrowingAxe, + "throwingknife": item.TypeThrowingKnife, + "thrownweapon": item.TypeThrownWeapon, + "topaz": item.TypeTopaz, + "torch": item.TypeTorch, + "voodooheads": item.TypeVoodooHeads, + "wand": item.TypeWand, + "warlockitem": item.TypeWarlockItem, + "weapon": item.TypeWeapon, +}