aboutsummaryrefslogtreecommitdiff
path: root/internal/validate
diff options
context:
space:
mode:
Diffstat (limited to 'internal/validate')
-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),
+ })
+ }
}
}