fixes
This commit is contained in:
parent
bfab8d97a9
commit
c8e91c66a6
|
@ -91,7 +91,7 @@ end
|
||||||
|
|
||||||
go = hook(go, function(f, ...)
|
go = hook(go, function(f, ...)
|
||||||
local r,v = f(unpack(arg))
|
local r,v = f(unpack(arg))
|
||||||
if type(r) == 'string' then
|
if type(r) == 'string' and cctx() then
|
||||||
pr (r)
|
pr (r)
|
||||||
end
|
end
|
||||||
if stead.in_life_call then
|
if stead.in_life_call then
|
||||||
|
|
|
@ -64,21 +64,34 @@ function vobj_used(self, ...)
|
||||||
return call(ref(r),'used', self.nam, unpack(arg));
|
return call(ref(r),'used', self.nam, unpack(arg));
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function vobj_use(self, ...)
|
||||||
|
local o, r = here():srch(self.nam);
|
||||||
|
return call(ref(r),'use', self.nam, unpack(arg));
|
||||||
|
end
|
||||||
|
|
||||||
function vobj(name, dsc, w)
|
function vobj(name, dsc, w)
|
||||||
return obj{ nam = tostring(name),
|
return obj{ nam = tostring(name),
|
||||||
|
vobject_type = true,
|
||||||
dsc = dsc,
|
dsc = dsc,
|
||||||
where = deref(w),
|
where = deref(w),
|
||||||
act = vobj_act,
|
act = vobj_act,
|
||||||
used = vobj_used,
|
used = vobj_used,
|
||||||
|
use = vobj_use,
|
||||||
save = vobj_save };
|
save = vobj_save };
|
||||||
end
|
end
|
||||||
|
|
||||||
function vway(name, dsc, w)
|
function vway(name, dsc, w)
|
||||||
-- o.object_type = true;
|
-- o.object_type = true;
|
||||||
return obj{ nam = tostring(name),
|
return obj{ nam = tostring(name),
|
||||||
|
vobject_type = true,
|
||||||
dsc = dsc,
|
dsc = dsc,
|
||||||
act = vobj_act,
|
act = vobj_act,
|
||||||
where = deref(w),
|
where = deref(w),
|
||||||
used = vobj_used,
|
used = vobj_used,
|
||||||
|
use = vobj_use,
|
||||||
save = vobj_save };
|
save = vobj_save };
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function isVobject(v)
|
||||||
|
return (type(v) == 'table') and (v.vobject_type)
|
||||||
|
end
|
||||||
|
|
|
@ -683,7 +683,7 @@ function call_bool(v, n, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
if type(v[n]) == 'function' then
|
if type(v[n]) == 'function' then
|
||||||
callpush(v)
|
callpush(v, unpack(arg))
|
||||||
local r = v[n](v, unpack(arg));
|
local r = v[n](v, unpack(arg));
|
||||||
callpop();
|
callpop();
|
||||||
return r;
|
return r;
|
||||||
|
@ -1622,7 +1622,7 @@ function isForcedsc(v)
|
||||||
if r then
|
if r then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
g = call_bool(game, 'forcedsc');
|
g = call_bool(game, 'forcedsc', v);
|
||||||
return g and r ~= false
|
return g and r ~= false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1632,7 +1632,7 @@ function isSceneUse(v)
|
||||||
if o then
|
if o then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
g = call_bool(game, 'scene_use');
|
g = call_bool(game, 'scene_use', v);
|
||||||
return g and o ~= false
|
return g and o ~= false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Reference in a new issue