itemfit

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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

func EnchantFits(enchant Enchant, item Item) bool

Whether an enchant row fits an item.

func EnchantSlots

func EnchantSlots(enchant Enchant) []proto.ItemSlot

The slots an enchant row's item types reach; a weapon enchant reaches both hands.

func ItemSlots

func ItemSlots(item Item) []proto.ItemSlot

The slots an item goes in.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL