Closed VedVid closed 5 years ago
Example: current implementation of EquipItem:
func (c *Creature) EquipItem(o *Object, slot int) (bool, error) { var err error if o == nil { txt := EquipNilError(c) err = errors.New("Creature tried to equip *Object that was nil." + txt) } if c.Equipment[slot] != nil { txt := EquipSlotNotNilError(c, slot) err = errors.New("Creature tried to equip item into already occupied slot." + txt) } turnSpent := false c.Equipment[slot] = o //remove from inventory turnSpent = true return turnSpent, err }
Some issues were addressed in 88d09e639e154db5e11426061f5b62b1e5dd45f4
Closing, and creating another issue for tracking "leftovers": #78
Example: current implementation of EquipItem: