diff options
| author | historia <[not public]> | 2026-07-05 20:06:53 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-05 20:07:50 -0400 |
| commit | 843fa6db681e494bf46e191655323a40577542b5 (patch) | |
| tree | cf32ec18d50434c14a1152147ff6e5e8b3576998 /internal/validate/checks.go | |
| parent | 7b5ed92e003d8a4bf9bdc69d43b7354eb2260dfa (diff) | |
| download | thehouseoficarus-843fa6db681e494bf46e191655323a40577542b5.tar.gz | |
feat: remove deprecated use/station interaction model
Diffstat (limited to 'internal/validate/checks.go')
| -rw-r--r-- | internal/validate/checks.go | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/internal/validate/checks.go b/internal/validate/checks.go index 0fc5b8f..41b34e0 100644 --- a/internal/validate/checks.go +++ b/internal/validate/checks.go @@ -189,9 +189,6 @@ func validateLocalObject(roomID int, robj world.RoomObject, itemIDs map[string]b if def.Talk != nil { bad = append(bad, "talk") } - if def.Use != nil { - bad = append(bad, "use") - } if def.Safespot != nil { bad = append(bad, "safespot") } @@ -587,9 +584,6 @@ func validateObjects(s Source) []Issue { issues = append(issues, validateTalkConfig(fmt.Sprintf("Object %q: talk", id), obj.Talk, itemIDs, roomIndex)...) } - if obj.Use != nil { - issues = append(issues, validateUseConfig(fmt.Sprintf("Object %q: use", id), obj.Use, itemIDs)...) - } if obj.OnLook != nil { issues = append(issues, validateNodeAction(fmt.Sprintf("Object %q: on_look", id), obj.OnLook, itemIDs, roomIndex)...) @@ -1234,35 +1228,6 @@ func validateExitReciprocity(s Source) []Issue { return issues } -func validateUseConfig(prefix string, cfg *behavior.UseConfig, itemIDs map[string]bool) []Issue { - var issues []Issue - if cfg == nil { - return issues - } - - for itemID := range cfg.Consume { - if itemID != "" && !itemIDs[itemID] { - issues = append(issues, Issue{ - Level: "ERROR", - Type: "reference", - Message: fmt.Sprintf("%s: consumes nonexistent item %q", - prefix, itemID), - }) - } - } - - if cfg.Reward.ItemID != "" && !itemIDs[cfg.Reward.ItemID] { - issues = append(issues, Issue{ - Level: "ERROR", - Type: "reference", - Message: fmt.Sprintf("%s: reward item %q does not exist", - prefix, cfg.Reward.ItemID), - }) - } - - return issues -} - func validateNodeAction(prefix string, na *behavior.NodeAction, itemIDs map[string]bool, roomIndex map[int]bool) []Issue { var issues []Issue if na == nil { |
