self is now table, object is required
This commit is contained in:
parent
be1b9ff311
commit
b5e289fb44
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -22,7 +22,8 @@ instead (1.2.0) unstable; urgency=low
|
||||||
* save vars in _G;
|
* save vars in _G;
|
||||||
* no duplicated games while looking gamespaths;
|
* no duplicated games while looking gamespaths;
|
||||||
* code function!!!;
|
* code function!!!;
|
||||||
* args in call;
|
* args in call
|
||||||
|
* no return goto needed;
|
||||||
* many small bugfixes...
|
* many small bugfixes...
|
||||||
|
|
||||||
-- Peter Kosyh <p.kosyh@gmail.com> Tue, 01 Jun 2010 17:40:00 +0300
|
-- Peter Kosyh <p.kosyh@gmail.com> Tue, 01 Jun 2010 17:40:00 +0300
|
||||||
|
|
|
@ -112,7 +112,7 @@ end
|
||||||
function menu_save(self, name, h, need)
|
function menu_save(self, name, h, need)
|
||||||
local dsc;
|
local dsc;
|
||||||
if need then
|
if need then
|
||||||
h:write(name.." = menu {nam = '"..tostring(self.nam).."'}\n");
|
error ("Menu "..name.." can not be saved!");
|
||||||
end
|
end
|
||||||
savemembers(h, self, name, need);
|
savemembers(h, self, name, need);
|
||||||
end
|
end
|
||||||
|
|
|
@ -68,6 +68,7 @@ function callpush(v, ...)
|
||||||
stead.call_top = stead.call_top + 1;
|
stead.call_top = stead.call_top + 1;
|
||||||
stead.cctx[stead.call_top] = { txt = nil, self = v };
|
stead.cctx[stead.call_top] = { txt = nil, self = v };
|
||||||
args = arg
|
args = arg
|
||||||
|
self = v
|
||||||
end
|
end
|
||||||
|
|
||||||
function callpop()
|
function callpop()
|
||||||
|
@ -78,13 +79,6 @@ function callpop()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function self(v)
|
|
||||||
if v ~= nil then
|
|
||||||
cctx().self = v;
|
|
||||||
end
|
|
||||||
return cctx().self;
|
|
||||||
end
|
|
||||||
|
|
||||||
function pclr()
|
function pclr()
|
||||||
cctx().txt = nil
|
cctx().txt = nil
|
||||||
end
|
end
|
||||||
|
@ -822,7 +816,7 @@ end
|
||||||
function ponoff(s, on, ...)
|
function ponoff(s, on, ...)
|
||||||
local i, ph
|
local i, ph
|
||||||
if stead.table.maxn(arg) == 0 then
|
if stead.table.maxn(arg) == 0 then
|
||||||
stead.table.insert(arg, self());
|
stead.table.insert(arg, self);
|
||||||
end
|
end
|
||||||
for i=1,stead.table.maxn(arg) do
|
for i=1,stead.table.maxn(arg) do
|
||||||
ph = dialog_phrase(s, arg[i]);
|
ph = dialog_phrase(s, arg[i]);
|
||||||
|
@ -839,7 +833,7 @@ end
|
||||||
function dialog_prem(s, ...)
|
function dialog_prem(s, ...)
|
||||||
local i, ph
|
local i, ph
|
||||||
if stead.table.maxn(arg) == 0 then
|
if stead.table.maxn(arg) == 0 then
|
||||||
stead.table.insert(arg, self());
|
stead.table.insert(arg, self);
|
||||||
end
|
end
|
||||||
for i=1,stead.table.maxn(arg) do
|
for i=1,stead.table.maxn(arg) do
|
||||||
ph = dialog_phrase(s, arg[i]);
|
ph = dialog_phrase(s, arg[i]);
|
||||||
|
@ -2386,7 +2380,8 @@ function check_version(v)
|
||||||
game.version = v
|
game.version = v
|
||||||
if v >= "1.2.0" then
|
if v >= "1.2.0" then
|
||||||
require ("goto")
|
require ("goto")
|
||||||
require ("vars");
|
require ("vars")
|
||||||
|
require ("object")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function code(v)
|
function code(v)
|
||||||
|
|
Loading…
Reference in a new issue