diff options
Diffstat (limited to 'internal/game/cmd_clean.go')
| -rw-r--r-- | internal/game/cmd_clean.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/internal/game/cmd_clean.go b/internal/game/cmd_clean.go index 63bea24..a43295a 100644 --- a/internal/game/cmd_clean.go +++ b/internal/game/cmd_clean.go @@ -3,11 +3,10 @@ package game import ( "strings" - "thehouseoficarus/internal/action" - "thehouseoficarus/internal/combat" + "thehouseoficarus/internal/behavior" "thehouseoficarus/internal/engine" + "thehouseoficarus/internal/item" "thehouseoficarus/internal/net" - "thehouseoficarus/internal/object" "thehouseoficarus/internal/player" ) @@ -18,7 +17,7 @@ func (g *Game) executeClean(sess *net.Session, args []string, rawInput string) { func (g *Game) doClean(sess *net.Session, input string) { p := sess.Player - if combat.GetCombat(p.Name) != nil { + if g.Combat.Get(p.Name) != nil { sess.WriteLine("You can't do that during combat!") return } @@ -63,10 +62,10 @@ func (g *Game) doClean(sess *net.Session, input string) { g.cancelBgAction(p) - p.BackgroundAction = &action.Action{ + p.BackgroundAction = &behavior.Action{ Type: "clean", TargetID: "clean_herbs", - Data: &action.CleanData{ + Data: &behavior.CleanData{ Phase: 0, Filter: filter, }, @@ -78,7 +77,7 @@ func (g *Game) doClean(sess *net.Session, input string) { sess.WriteLine("You begin cleaning herbs.") } -func matchesCleanFilter(item *object.ItemDef, filter string) bool { +func matchesCleanFilter(item *item.ItemDef, filter string) bool { if len(item.Craft) > 0 && len(item.FirstCraft().Consume) > 0 && len(item.FirstCraft().Consume[0].Items) > 0 { if strings.Contains(item.FirstCraft().Consume[0].Items[0], filter) { return true |
