From a1b6613c6c6a2f8d6e1ecd47e766bd40f92ac295 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sun, 28 Jun 2026 02:40:30 -0400 Subject: feat: admin accounts, god mode, OLC commands like dig/room, 'inline' objects changed to 'local' objects --- internal/world/room_test.go | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'internal/world/room_test.go') diff --git a/internal/world/room_test.go b/internal/world/room_test.go index 472fe4f..e7b1718 100644 --- a/internal/world/room_test.go +++ b/internal/world/room_test.go @@ -18,7 +18,7 @@ func writeRoom(t *testing.T, dir string, body string) { } } -func TestRoomObjectReferenceVsInline(t *testing.T) { +func TestRoomObjectReferenceVsLocal(t *testing.T) { dir := t.TempDir() body := `name: Test Room objects: @@ -44,37 +44,37 @@ objects: } // reference - if ref := room.Objects[0]; ref.Inline != nil || ref.ID != "workbench" { - t.Errorf("object 0 should be a reference to workbench, got %+v (inline=%v)", ref, ref.Inline) + if ref := room.Objects[0]; ref.Local != nil || ref.ID != "workbench" { + t.Errorf("object 0 should be a reference to workbench, got %+v (local=%v)", ref, ref.Local) } - // inline, id derived from the normalized name + // local, id derived from the normalized name in := room.Objects[1] - if in.Inline == nil { - t.Fatalf("object 1 should be inline") + if in.Local == nil { + t.Fatalf("object 1 should be local") } if in.ID != "window" { - t.Errorf("inline id should derive from name to %q, got %q", "window", in.ID) + t.Errorf("local id should derive from name to %q, got %q", "window", in.ID) } - if !in.Inline.Hidden || in.Inline.Name != "window" { - t.Errorf("inline fields not parsed: %+v", in.Inline) + if !in.Local.Hidden || in.Local.Name != "window" { + t.Errorf("local fields not parsed: %+v", in.Local) } - // inline with a multi-word name: id is the normalized name (spaces kept), + // local with a multi-word name: id is the normalized name (spaces kept), // and an explicit `id:` is NOT used as identity (it is preserved on the // def only so validation can flag it). ex := room.Objects[2] - if ex.Inline == nil { - t.Fatalf("object 2 should be inline") + if ex.Local == nil { + t.Fatalf("object 2 should be local") } if ex.ID != "instrument panel" { - t.Errorf("inline id should be normalized name %q, got %q", "instrument panel", ex.ID) + t.Errorf("local id should be normalized name %q, got %q", "instrument panel", ex.ID) } - if ex.Inline.ID != "control" { - t.Errorf("explicit id should be preserved on def for validation, got %q", ex.Inline.ID) + if ex.Local.ID != "control" { + t.Errorf("explicit id should be preserved on def for validation, got %q", ex.Local.ID) } - if len(ex.Inline.Aliases) != 1 || ex.Inline.Aliases[0] != "cockpit" { - t.Errorf("inline aliases not parsed: %+v", ex.Inline.Aliases) + if len(ex.Local.Aliases) != 1 || ex.Local.Aliases[0] != "cockpit" { + t.Errorf("local aliases not parsed: %+v", ex.Local.Aliases) } } -- cgit v1.2.3