diff options
| author | historia <[not public]> | 2026-10-05 17:49:48 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-05 17:49:48 -0400 |
| commit | 7a15a5d70004b28bf2a710fa0f536af2446e5b17 (patch) | |
| tree | 920705853f79bb13a65fcb2f89cee38e6f2efab8 /internal/validate | |
| parent | ec703a39738fefb60817f5659f76f8e683f8d301 (diff) | |
| download | thehouseoficarus-7a15a5d70004b28bf2a710fa0f536af2446e5b17.tar.gz | |
fix: production multi-step recipes, drop-weight validation, journal versioning
Diffstat (limited to 'internal/validate')
| -rw-r--r-- | internal/validate/checks.go | 22 |
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), + }) + } } } |
