cleanups
This commit is contained in:
parent
b36f9722ee
commit
5572d3cf88
|
@ -243,7 +243,7 @@ end
|
||||||
|
|
||||||
function obj_xref(self,str)
|
function obj_xref(self,str)
|
||||||
function xrefrep(str)
|
function xrefrep(str)
|
||||||
local s = stead.string.gsub(str,'[{}]','');
|
local s = stead.string.gsub(str,'[{}]','');
|
||||||
return xref(s, self);
|
return xref(s, self);
|
||||||
end
|
end
|
||||||
if not str then
|
if not str then
|
||||||
|
@ -263,7 +263,7 @@ function obj_look(self)
|
||||||
end
|
end
|
||||||
local v = call(self,'dsc');
|
local v = call(self,'dsc');
|
||||||
if game.hinting then
|
if game.hinting then
|
||||||
v = obj_xref(self, v);
|
v = self:xref(v);
|
||||||
elseif v then
|
elseif v then
|
||||||
v = stead.string.gsub(v, '[{}]','');
|
v = stead.string.gsub(v, '[{}]','');
|
||||||
end
|
end
|
||||||
|
@ -351,10 +351,15 @@ function obj(v)
|
||||||
if v.nam == nil then
|
if v.nam == nil then
|
||||||
error ("No object name in constructor.");
|
error ("No object name in constructor.");
|
||||||
end
|
end
|
||||||
|
v.object_type = true;
|
||||||
|
|
||||||
|
if v.xref == nil then
|
||||||
|
v.xref = obj_xref;
|
||||||
|
end
|
||||||
|
|
||||||
if v.look == nil then
|
if v.look == nil then
|
||||||
v.look = obj_look;
|
v.look = obj_look;
|
||||||
end
|
end
|
||||||
v.object_type = true;
|
|
||||||
if v.enable == nil then
|
if v.enable == nil then
|
||||||
v.enable = obj_enable;
|
v.enable = obj_enable;
|
||||||
end
|
end
|
||||||
|
@ -714,7 +719,7 @@ function dialog_scene(self)
|
||||||
local v
|
local v
|
||||||
v = iface:title(call(self,'nam'));
|
v = iface:title(call(self,'nam'));
|
||||||
v = par('^^', v, call(self, 'dsc')); --obj_look(self));
|
v = par('^^', v, call(self, 'dsc')); --obj_look(self));
|
||||||
return v;
|
return v;
|
||||||
end
|
end
|
||||||
|
|
||||||
function dialog_look(self)
|
function dialog_look(self)
|
||||||
|
@ -877,7 +882,7 @@ function phrase_look(self, n)
|
||||||
local v = call(self, 'dsc');
|
local v = call(self, 'dsc');
|
||||||
if type(v) ~= 'string' then return; end
|
if type(v) ~= 'string' then return; end
|
||||||
if game.hinting then
|
if game.hinting then
|
||||||
return obj_xref(self, '{'..v..'}');
|
return self:xref('{'..v..'}');
|
||||||
end
|
end
|
||||||
return v;
|
return v;
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue