@@ -27,4 +27,55 @@ PartyUtils = {
end;
};
\ No newline at end of file
--[[
functions, design to simplify some typical actions while developing Instead game
]]
EngineUtils = {
getValue = function(source, param)
local value = "";
if (type(source) == "function") then
value = source(param);
else
value = source;
return value;
internal space
_kh = {
vroom_enter = function(s)
walk(EngineUtils.getValue(s.where));
vroom_save = function(s)
if need then
local t = stead.string.format("%s = kh_vroom(%s, %q, %s);\n",
name, stead.tostring(self.disp),
stead.deref(self.where), stead.deref(self.nam));
h:write(t);
end
stead.savemembers(h, self, name,false);
vroom with additional functionality
function kh_vroom(disp, target, nam)
if (not nam) then
nam = disp;
return room {
nam = nam;
disp = disp;
where = target;
enter = _kh.vroom_enter;
--enter = _kh.vroom_enter;
--save = _kh.vroom_save;