/usr/share/games/instead/stead/prefs.lua is in instead-data 1.9.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | prefs = obj {
nam = 'preferences',
system_type = true,
load = function(s)
local name = instead_savepath() .. '/prefs';
local f, err = loadfile(name);
if not f then return nil end
f();
end,
ini = function(s)
return s:load()
end,
store = function(s)
s:save()
stead.clearvar(s);
end,
save = function(s) -- save prefs on every save
local name = instead_savepath() .. '/prefs';
local h = stead.io.open(name,"wb");
if not h then return false end
stead.savemembers(h, s, 'prefs', true);
h:flush();
h:close();
end,
purge = function(s)
local name = instead_savepath() .. '/prefs';
local k,v
for k,v in pairs(s) do
if type(v) ~= 'function' and k ~= 'nam' and k ~= 'system_type' then
s[k] = nil
end
end
return stead.os.remove(name);
end
};
-- vim:ts=4
|