Documentation
¶
Overview ¶
Package itemfit holds the rules for which slots an item goes in and which enchant rows fit an item. The sim's gear checks and the SIML editor both read them, so the package imports only proto.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var TypeSlots = map[proto.ItemType][]proto.ItemSlot{ proto.ItemType_ItemTypeUnknown: {}, proto.ItemType_ItemTypeHead: {proto.ItemSlot_ItemSlotHead}, proto.ItemType_ItemTypeNeck: {proto.ItemSlot_ItemSlotNeck}, proto.ItemType_ItemTypeShoulder: {proto.ItemSlot_ItemSlotShoulder}, proto.ItemType_ItemTypeBack: {proto.ItemSlot_ItemSlotBack}, proto.ItemType_ItemTypeChest: {proto.ItemSlot_ItemSlotChest}, proto.ItemType_ItemTypeWrist: {proto.ItemSlot_ItemSlotWrist}, proto.ItemType_ItemTypeHands: {proto.ItemSlot_ItemSlotHands}, proto.ItemType_ItemTypeWaist: {proto.ItemSlot_ItemSlotWaist}, proto.ItemType_ItemTypeLegs: {proto.ItemSlot_ItemSlotLegs}, proto.ItemType_ItemTypeFeet: {proto.ItemSlot_ItemSlotFeet}, proto.ItemType_ItemTypeFinger: {proto.ItemSlot_ItemSlotFinger1, proto.ItemSlot_ItemSlotFinger2}, proto.ItemType_ItemTypeTrinket: {proto.ItemSlot_ItemSlotTrinket1, proto.ItemSlot_ItemSlotTrinket2}, proto.ItemType_ItemTypeRanged: {proto.ItemSlot_ItemSlotRanged}, }
The slots of each item type but the weapon, whose slots its hand type gives. gen_db -gen=go-to-ts writes it to the UI as ITEM_TYPE_TO_SLOTS, read by getEligibleItemSlots in ui/sim/proto/items.ts.
Functions ¶
func EnchantFits ¶
Whether an enchant row fits an item.
func EnchantSlots ¶
The slots an enchant row's item types reach; a weapon enchant reaches both hands.
Types ¶
type Enchant ¶
type Enchant struct {
Type proto.ItemType
EnchantType proto.EnchantType
ExtraTypes []proto.ItemType // Further item types the row goes on, as an armor kit's.
}
What an enchant row's slots and the items it fits depend on.
type Item ¶
type Item struct {
Type proto.ItemType
HandType proto.HandType
WeaponType proto.WeaponType
RangedType proto.RangedWeaponType
}
What an item's slots and its enchants depend on.