aboutsummaryrefslogtreecommitdiff
path: root/internal/validate/checks.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-05 17:49:48 -0400
committerhistoria <[not public]>2026-10-05 17:49:48 -0400
commit7a15a5d70004b28bf2a710fa0f536af2446e5b17 (patch)
tree920705853f79bb13a65fcb2f89cee38e6f2efab8 /internal/validate/checks.go
parentec703a39738fefb60817f5659f76f8e683f8d301 (diff)
downloadthehouseoficarus-7a15a5d70004b28bf2a710fa0f536af2446e5b17.tar.gz
fix: production multi-step recipes, drop-weight validation, journal versioning
Diffstat (limited to 'internal/validate/checks.go')
-rw-r--r--internal/validate/checks.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/validate/checks.go b/internal/validate/checks.go
index 2030225..8fe8e72 100644
--- a/internal/validate/checks.go
+++ b/internal/validate/checks.go
@@ -547,6 +547,17 @@ func validateMobs(s Source) []Issue {
id, d.Table),
})
}
+ if d.Weight <= 0 {
+ label := d.ItemID
+ if label == "" {
+ label = "<table:" + d.Table + ">"
+ }
+ issues = append(issues, Issue{
+ Level: "WARN",
+ Type: "semantic",
+ Message: fmt.Sprintf("Mob %q: loot %q has weight %d; it can never be selected", id, label, d.Weight),
+ })
+ }
}
if def.Steal != nil {
@@ -567,6 +578,17 @@ func validateMobs(s Source) []Issue {
id, d.Table),
})
}
+ if d.Weight <= 0 {
+ label := d.ItemID
+ if label == "" {
+ label = "<table:" + d.Table + ">"
+ }
+ issues = append(issues, Issue{
+ Level: "WARN",
+ Type: "semantic",
+ Message: fmt.Sprintf("Mob %q: steal drop %q has weight %d; it can never be selected", id, label, d.Weight),
+ })
+ }
}
}