diff options
| author | historia <[not public]> | 2026-06-20 23:43:35 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-20 23:43:35 -0400 |
| commit | 470bc5bd99b793e46305310b5fbeb3068eba45f1 (patch) | |
| tree | ff268fab1a8e7699cd6404e6e86c2d4bd1c6f2f6 /internal/world | |
| parent | 010fa439399581391fcd509d2058191ff4fa74b3 (diff) | |
| download | thehouseoficarus-470bc5bd99b793e46305310b5fbeb3068eba45f1.tar.gz | |
refactor: removed separate crafting recipes and combined them into item YAML
Diffstat (limited to 'internal/world')
| -rw-r--r-- | internal/world/mob.go | 3 | ||||
| -rw-r--r-- | internal/world/objects.go | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/internal/world/mob.go b/internal/world/mob.go index 9d07532..9ca1a45 100644 --- a/internal/world/mob.go +++ b/internal/world/mob.go @@ -9,6 +9,7 @@ import ( "sync" "thehouseoficarus/internal/action" + "thehouseoficarus/internal/object" "gopkg.in/yaml.v3" ) @@ -122,7 +123,7 @@ func (m *MobInstance) MatchQuality(input string) int { if strings.ToLower(m.Name) == lower { return MatchExact } - if action.WordPrefixMatch(input, m.Name) { + if object.WordPrefixMatch(input, m.Name) { return MatchPrefix } return MatchNone diff --git a/internal/world/objects.go b/internal/world/objects.go index 72e4a6d..ae2586a 100644 --- a/internal/world/objects.go +++ b/internal/world/objects.go @@ -6,7 +6,7 @@ import ( "sort" "strings" - "thehouseoficarus/internal/action" + "thehouseoficarus/internal/object" ) type ObjState struct { @@ -181,7 +181,7 @@ func (w *World) FindObjInstances(roomID int, name string) []ObjState { } func wordMatchesObj(lower, defID, objName string) bool { - if action.WordPrefixMatch(lower, objName) { + if object.WordPrefixMatch(lower, objName) { return true } inputWords := strings.Fields(strings.ToLower(lower)) |
