diff --git a/stead/object.lua b/stead/object.lua index 2919a36..a948876 100644 --- a/stead/object.lua +++ b/stead/object.lua @@ -173,13 +173,13 @@ function list_concat(self, other, pos) end end -function path(w, wh) +function path(w, wh) -- search in way, disabled too if not wh then wh = here(); else wh = ref(wh); end - local o = ways(wh):srch(w); + local o = ways(wh):srch(w, true); o = ref(o); if isRoom(o) then return o diff --git a/stead/stead.lua b/stead/stead.lua index 65c5320..3eee563 100644 --- a/stead/stead.lua +++ b/stead/stead.lua @@ -420,6 +420,12 @@ end function obj(v) if v.nam == nil then + if isRoom(v) then + if isDialog(v) then + error ("No dialog name in constructor.", 3); + end + error ("No room name in constructor.", 3); + end error ("No object name in constructor.", 2); end v.object_type = true; @@ -772,9 +778,9 @@ function room_save(self, name, h, need) end function room(v) --constructor - if v.nam == nil then - error ("No room name in constructor.", 2); - end +-- if v.nam == nil then +-- error ("No room name in constructor.", 2); +-- end if v.scene == nil then v.scene = room_scene; end