Rename item-subsystem methods (refactor step 5, items)
getItem→promptPackItem now returns (obj, ok) instead of a nil-signaling pointer; invName→inventoryName; doPot→applyPotionFuse. C breadcrumbs kept. Behavior unchanged; suite green.
This commit is contained in:
@@ -236,8 +236,8 @@ func (g *RogueGame) findObj(y, x int) *Object {
|
||||
|
||||
// eat lets her try to eat something (misc.c eat).
|
||||
func (g *RogueGame) eat() {
|
||||
obj := g.getItem("eat", KindFood)
|
||||
if obj == nil {
|
||||
obj, ok := g.promptPackItem("eat", KindFood)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user