diff options
| author | historia <[not public]> | 2026-07-05 16:42:01 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-05 16:42:01 -0400 |
| commit | 9b54188970c51070d86f4c87e909ea7836c86f07 (patch) | |
| tree | 9dea17fee340bb92dee8bb4632001dbf219d2462 /internal/validate | |
| parent | 21c1997a3fd0f5ec5dcff1add45e4dfaf7a338ca (diff) | |
| download | thehouseoficarus-9b54188970c51070d86f4c87e909ea7836c86f07.tar.gz | |
fix: restructure steal yaml, update admin web gui
Diffstat (limited to 'internal/validate')
| -rw-r--r-- | internal/validate/checks.go | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/internal/validate/checks.go b/internal/validate/checks.go index 974998a..0fc5b8f 100644 --- a/internal/validate/checks.go +++ b/internal/validate/checks.go @@ -198,12 +198,9 @@ func validateLocalObject(roomID int, robj world.RoomObject, itemIDs map[string]b if len(def.UseInteractions) > 0 { bad = append(bad, "use_interactions") } - if def.StealTable != "" || def.StealLevel != 0 || def.StealXP != 0 || def.StealSpeed != 0 { + if def.Steal != nil { bad = append(bad, "steal") } - if def.GuardMob != "" { - bad = append(bad, "guard_mob") - } if def.RemovalItem != "" { bad = append(bad, "removal_item") } @@ -548,22 +545,24 @@ func validateObjects(s Source) []Issue { }) } - if obj.StealTable != "" && !dropIDs[obj.StealTable] { - issues = append(issues, Issue{ - Level: "ERROR", - Type: "reference", - Message: fmt.Sprintf("Object %q: steal_table %q does not exist", - id, obj.StealTable), - }) - } + if obj.Steal != nil { + if obj.Steal.Table != "" && !dropIDs[obj.Steal.Table] { + issues = append(issues, Issue{ + Level: "ERROR", + Type: "reference", + Message: fmt.Sprintf("Object %q: steal.table %q does not exist", + id, obj.Steal.Table), + }) + } - if obj.GuardMob != "" && !mobIDs[obj.GuardMob] { - issues = append(issues, Issue{ - Level: "ERROR", - Type: "reference", - Message: fmt.Sprintf("Object %q: guard_mob %q does not exist", - id, obj.GuardMob), - }) + if obj.Steal.GuardMob != "" && !mobIDs[obj.Steal.GuardMob] { + issues = append(issues, Issue{ + Level: "ERROR", + Type: "reference", + Message: fmt.Sprintf("Object %q: steal.guard_mob %q does not exist", + id, obj.Steal.GuardMob), + }) + } } for _, ui := range obj.UseInteractions { |
