Changeset - af3387eae943
[Not reviewed]
default
0 3 0
Silverwing - 8 years ago 2016-09-10 13:58:12

One more little thing done
3 files changed with 100 insertions and 7 deletions:
0 comments (0 inline, 0 general)
journey_venaedanotrr.lua
Show inline comments
 
@@ -1298,20 +1298,103 @@ ven_chest = obj {
 

	
 
ven_chest_look = room {
 
    var {
 
        state = [0,0,0,0];
 
        state = {0,0,0,0};
 
        taken = false;
 
    };
 
    nam = "ven_chest_look";
 
    disp = "Венаэданотр, храм";
 
    pic = function(s)
 
        var p = "";
 
        local p = "images/ven_chest.png";
 
        for i = 1, #s.state do
 
            p = p .. ";images/ven_chest_" .. tostring(s.state[i]) .. ".png@" .. tostring((i - 1) * 16) .. ",64";
 
        end;
 
        return p;
 
    end;
 
    dsc = function(s)
 
        return [[
 
            На поверхности сундука вы видите обозначения из цветных полос - очевидно это какое-то сообщение.
 
            На поверхности сундука вы видите обозначения из цветных полос - очевидно это какое-то сообщение. На крышке вы видите четыре вращающихся кольца, на которые нанесены метки шести цветов: фиолетовый, синий, зеленый, желтый, оранжевый, красный. 
 
        ]];
 
    end;
 
    unlocked = function(s)
 
    checkLock = function(s)
 
        if (s.state[1] == 5 and s.state[2] == 3 and s.state[3] == 3 and s.state[4] == 2) then
 
            stead.ref("ven_chest_open"):enable();
 
            return true;
 
        else
 
            stead.ref("ven_chest_open"):disable();
 
            return false;
 
        end;
 
    end;
 
    obj = {
 
        'ven_chest_ring1';
 
        'ven_chest_ring2';
 
        'ven_chest_ring3';
 
        'ven_chest_ring4';
 
        'ven_chest_open';
 
        'ven_chest_away';
 
    };
 
};
 

	
 
ven_chest_ring1 = kh_vobj("ven_chest_ring1", "{Повернуть первое кольцо.}^", function(s)
 
    here().state[1] = here().state[1] + 1;
 
    if (here().state[1] > 5) then
 
        here().state[1] = 0;
 
    end;
 
    local t = "Вы поворачиваете кольцо на одно деление. ";
 
    if (here():checkLock()) then
 
        t = t .. "Вы слышите легкий щелчок. ";
 
    end;
 
    return t;
 
end);
 
        
 
ven_chest_ring2 = kh_vobj("ven_chest_ring2", "{Повернуть второе кольцо.}^", function(s)
 
    here().state[2] = here().state[2] + 1;
 
    if (here().state[2] > 5) then
 
        here().state[2] = 0;
 
    end;
 
    local t = "Вы поворачиваете кольцо на одно деление. ";
 
    if (here():checkLock()) then
 
        t = t .. "Вы слышите легкий щелчок. ";
 
    end;
 
};
 
    return t;
 
end);
 
        
 
ven_chest_ring3 = kh_vobj("ven_chest_ring3", "{Повернуть третье кольцо.}^", function(s)
 
    here().state[3] = here().state[3] + 1;
 
    if (here().state[3] > 5) then
 
        here().state[3] = 0;
 
    end;
 
    local t = "Вы поворачиваете кольцо на одно деление. ";
 
    if (here():checkLock()) then
 
        t = t .. "Вы слышите легкий щелчок. ";
 
    end;
 
    return t;
 
end);
 
        
 
ven_chest_ring4 = kh_vobj("ven_chest_ring4", "{Повернуть четвертое кольцо.}^", function(s)
 
    here().state[4] = here().state[4] + 1;
 
    if (here().state[4] > 5) then
 
        here().state[4] = 0;
 
    end;
 
    local t = "Вы поворачиваете кольцо на одно деление. ";
 
    if (here():checkLock()) then
 
        t = t .. "Вы слышите легкий щелчок. ";
 
    end;
 
    return t;
 
end);
 
        
 
ven_chest_open = kh_vobj("ven_chest_open", "{Открыть сундук.}^", function(s)
 
    if (not here().taken) then
 
        here().taken = true;
 
        take(item_ven_temple_key_1);
 
        return "В сундуке вы находите металлический ключ. ";
 
    else
 
        return "Сундук пуст";
 
    end;
 
end):disable();
 

	
 
ven_chest_away = kh_vobj("ven_chest_away", "{Отойти от сундука.}^", function(s)
 
    back();
 
end);
 

	
 
ven_skeleton = obj {
 
    nam = "ven_skeleton";
main.lua
Show inline comments
 
@@ -221,11 +221,12 @@ function init()
 
	atlantis_found = true;
 
	move(submarine_leviathan, "atl_aqua_leviathan_dock");
 
    submarine_leviathan:enable();   
 
	   
 
    	   
 
    --ven_temple_l1.position = "66";   
 
    --ven_shark.position = "55";
 
	pl.where = "ven_temple_l1";
 
    move(submarine_leviathan, "ven_center");   
 
    move(submarine_leviathan, "ven_center");
 
    pl.where = "ven_chest_look";
 
    --move(ven_shark, "ven_temple_l1");
 
    
 
	--put(item_suit, pl);
utils.lua
Show inline comments
 
@@ -68,6 +68,15 @@ EngineUtils = {
 
	end;
 
};
 
 
function kh_vobj(nam, dsc, act, used) 
 
    return obj {
 
        nam = nam;
 
        dsc = dsc;
 
        act = act;
 
        used = used;
 
    };
 
end;
 
 
function kh_vway(disp, dsc, target, seen_level)
 
	local temp = vway(disp, dsc, target);
 
	temp.seen_level = seen_level;
0 comments (0 inline, 0 general)