aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_clean.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-25 15:40:48 -0400
committerhistoria <[not public]>2026-06-25 15:40:48 -0400
commitabd612c15799f604e671e83dc7c410ed2b44185f (patch)
tree0597ca92350de73aac2a7cf26b2f2d6595dac0cc /internal/game/cmd_clean.go
parent2725e2927a1595c7b100d942d1f14146252adeb7 (diff)
downloadthehouseoficarus-abd612c15799f604e671e83dc7c410ed2b44185f.tar.gz
slop refactor
Diffstat (limited to 'internal/game/cmd_clean.go')
-rw-r--r--internal/game/cmd_clean.go13
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