diff options
Diffstat (limited to 'internal/validate/checks.go')
| -rw-r--r-- | internal/validate/checks.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/internal/validate/checks.go b/internal/validate/checks.go index 7a495a0..7da2e4a 100644 --- a/internal/validate/checks.go +++ b/internal/validate/checks.go @@ -105,13 +105,13 @@ func validateRooms(s Source) []Issue { var collEntries []roomObjEntry for idx, robj := range room.Objects { - if robj.Inline != nil { + if robj.Local != nil { collEntries = append(collEntries, roomObjEntry{ - defKey: fmt.Sprintf("inline:#%d", idx), - displayName: world.NormalizeObjectName(robj.Inline.Name), + defKey: fmt.Sprintf("local:#%d", idx), + displayName: world.NormalizeObjectName(robj.Local.Name), effDefID: robj.ID, }) - issues = append(issues, validateInlineObject(id, robj, itemIDs, roomIndex)...) + issues = append(issues, validateLocalObject(id, robj, itemIDs, roomIndex)...) } else if robj.ID != "" && !objIDs[robj.ID] { issues = append(issues, Issue{ Level: "ERROR", @@ -155,14 +155,14 @@ func validateRooms(s Source) []Issue { return issues } -// validateInlineObject checks a room-inline object definition. Inline objects +// validateLocalObject checks a room-local object definition. Local objects // are restricted to the passive subset (name/aliases/color/hidden/ // inroom_description/description/on_look); interactable or stateful behavior // must be defined as a standalone object file instead. -func validateInlineObject(roomID int, robj world.RoomObject, itemIDs map[string]bool, roomIndex map[int]bool) []Issue { +func validateLocalObject(roomID int, robj world.RoomObject, itemIDs map[string]bool, roomIndex map[int]bool) []Issue { var issues []Issue - def := robj.Inline - prefix := fmt.Sprintf("Room %d: inline object %q", roomID, robj.ID) + def := robj.Local + prefix := fmt.Sprintf("Room %d: local object %q", roomID, robj.ID) if def.Name == "" { issues = append(issues, Issue{ @@ -175,7 +175,7 @@ func validateInlineObject(roomID int, robj world.RoomObject, itemIDs map[string] issues = append(issues, Issue{ Level: "WARN", Type: "reference", - Message: prefix + ": `id:` is ignored on inline objects — identity derives from `name`", + Message: prefix + ": `id:` is ignored on local objects — identity derives from `name`", }) } @@ -208,7 +208,7 @@ func validateInlineObject(roomID int, robj world.RoomObject, itemIDs map[string] issues = append(issues, Issue{ Level: "ERROR", Type: "reference", - Message: prefix + fmt.Sprintf(": inline objects may not define interactable behavior (%s) — define it as an object file instead", + Message: prefix + fmt.Sprintf(": local objects may not define interactable behavior (%s) — define it as an object file instead", strings.Join(bad, ", ")), }) } @@ -230,7 +230,7 @@ func validateInlineObject(roomID int, robj world.RoomObject, itemIDs map[string] // roomObjEntry is a single object slot in a room, reduced to what the per-room // collision check needs. defKey identifies the distinct definition behind the -// slot ("file:<id>" for references, "inline:#<index>" for inline defs), so +// slot ("file:<id>" for references, "local:#<index>" for local defs), so // repeated references to the same file object collapse to one definition. type roomObjEntry struct { defKey string @@ -241,7 +241,7 @@ type roomObjEntry struct { // validateRoomObjectCollisions reports two per-room problems: distinct object // definitions that share a display name (a player typing the exact name could // not disambiguate) and distinct definitions that resolve to the same ObjState -// DefID (their runtime instances would be conflated — e.g. an inline object +// DefID (their runtime instances would be conflated — e.g. a local object // whose name matches a referenced file object's id). Repeated references to the // same file object share a defKey and are allowed (e.g. multiple copper_rock). func validateRoomObjectCollisions(roomID int, entries []roomObjEntry) []Issue { @@ -281,7 +281,7 @@ func validateRoomObjectCollisions(roomID int, entries []roomObjEntry) []Issue { issues = append(issues, Issue{ Level: "ERROR", Type: "duplicate", - Message: fmt.Sprintf("Room %d: object id collision %q (an inline object's name matches another object's id)", + Message: fmt.Sprintf("Room %d: object id collision %q (a local object's name matches another object's id)", roomID, defID), }) } |
