Changeset - f164320d7dd3
[Not reviewed]
default
0 8 0
Silverwing - 4 years ago 2020-05-05 20:47:25

upd: navigation
8 files changed with 235 insertions and 33 deletions:
0 comments (0 inline, 0 general)
atlantis_dyp.lua
Show inline comments
 
@@ -2110,12 +2110,57 @@ dyp_temple_blue_room = labyrinth {
 
    nam = "Храм Дипатреанотра, пещера";
 
    pic = function(s)
 
        local x = s.map[s.position].x * 32 + 36;
 
        local y = s.map[s.position].y * 32 + 96;
 
        return "images/dyp_blueroom_bg.png;images/player.png@" .. y .. ',' .. x;
 
    end;
 
    ways_print = function(s, o)
 
        local n, e, sth, w;
 
        if s.map[s.position]['e1'] or s.map[s.position]['ex1'] then
 
            n = stead.xref(txtnb('N'), s.way[1]);
 
        else
 
            n = txtnb('N');
 
        end;
 
        if s.map[s.position]['e2'] or s.map[s.position]['ex2'] then
 
            e = stead.xref(txtnb('E'), s.way[2]);
 
        else
 
            e = txtnb('E');
 
        end;
 
        if s.map[s.position]['e3'] or s.map[s.position]['ex3'] then
 
            sth = stead.xref('S', s.way[3]);
 
        else
 
            sth = txtnb('S');
 
        end;
 
        if s.map[s.position]['e4'] or s.map[s.position]['ex4'] then
 
            w = stead.xref('W', s.way[4]);
 
        else
 
            w = txtnb('W');
 
        end;
 
        local left = '35%';
 
        local right = '65%';
 
        local il = '^^';
 
        if theme.name() == '.mobile' then
 
            print('x');
 
            il = '^';
 
            left = '25%';
 
            right = '75%';
 
        end;
 
        local left = '35%';
 
        local right = '65%';
 
        local il = '^^';
 
        if theme.name() == '.mobile' then
 
            print('x');
 
            il = '^';
 
            left = '25%';
 
            right = '75%';
 
        end;
 
        
 
        return txttab('50%', 'center') .. n .. il 
 
            .. txttab(left, 'center') .. w .. txttab(right, 'center') .. e .. il 
 
            .. txttab('50%', 'center') .. sth .. '^';
 
    end;
 
    dir = {
 
        "На север";
 
        "На восток";
 
        "На юг";
 
        "На запад";
 
    };
 
@@ -2387,12 +2432,26 @@ dyp_crab_cave = labyrinth {
 
        "На северо-запад";
 
        "На северо-восток";
 
        "На юго-запад";
 
        "На юго-восток";
 
        "Выйти";
 
    };
 
    ways_print = function(s, o)
 
        local nw = stead.xref(txtnb('NW'), s.way[1]);
 
        local ne = stead.xref(txtnb('NE'), s.way[2]);
 
        local sw = stead.xref(txtnb('SW'), s.way[3]);
 
        local se = stead.xref(txtnb('SE'), s.way[4]);
 
        
 
        local ex5 = '';
 
        if s.map[s.position]['ex5'] then
 
             ex5 = stead.xref(txtnb(stead.dispof(s.way[5])), s.way[5]);
 
        end;
 
        return txttab('40%', 'center') .. nw .. txttab('60%', 'center') .. ne .. '^'..
 
        txttab('50%', 'center') .. ex5 .. '^' ..
 
        txttab('40%', 'center') .. sw .. txttab('60%', 'center') .. se ;
 
    end;
 
    underwater = true;
 
    map = {
 
        ["00"] = {
 
            name = [[Вы стоите у входа в глубокую пещеру. Стены здесь неровные и извилистые, образую причудливые переплетения длинных коридоров. Кто знает, куда они приведут? На каменистом полу едва ли можно заметить какие-либо следы. ]];
 
            e1 = "10";
 
            e2 = "11";
atlantis_iyhehevjiarr.lua
Show inline comments
 
@@ -595,13 +595,69 @@ iyh_labyrinth = labyrinth {
 
    };
 
 
    disp = "Штурвал Левиафана";
 
    dsc = function(s)
 
        return [[Вы находитесь где-то в переплетении узких ущелий. Вверху скалы сужаются почти вплотную, не давая вам возможности подняться над ущельем и осмотреться. ]];
 
    end;
 
 
    ways_print = function(s, o)
 
        local nw, n, ne, w, e, sw, sth, se;
 
        if (s.map[s.position]['e1'] or s.map[s.position]['ex1']) then
 
            n = stead.xref('N', s.way[1]);
 
        else
 
            n = 'N';
 
        end;
 
        if (s.map[s.position]['e2'] or s.map[s.position]['ex2']) then
 
            ne = stead.xref('NE', s.way[2]);
 
        else
 
            ne = 'NE';
 
        end;
 
        if (s.map[s.position]['e3'] or s.map[s.position]['ex3']) then
 
            e = stead.xref('E', s.way[3]);
 
        else
 
            e = 'E';
 
        end;
 
        if (s.map[s.position]['e4'] or s.map[s.position]['ex4']) then
 
            se = stead.xref('SE', s.way[4]);
 
        else
 
            se = 'SE';
 
        end;
 
        if (s.map[s.position]['e5'] or s.map[s.position]['ex5']) then
 
            sth = stead.xref('S', s.way[5]);
 
        else
 
            sth = 'S';
 
        end;
 
        if (s.map[s.position]['e6'] or s.map[s.position]['ex6']) then
 
            sw = stead.xref('SW', s.way[6]);
 
        else
 
            sw = 'SW';
 
        end;
 
        if (s.map[s.position]['e7'] or s.map[s.position]['ex7']) then
 
            w = stead.xref('W', s.way[7]);
 
        else
 
            w = 'W';
 
        end;
 
        if (s.map[s.position]['e8'] or s.map[s.position]['ex8']) then
 
            nw = stead.xref('NW', s.way[8]);
 
        else
 
            nw = 'NW';
 
        end;
 
        
 
        local left = '35%';
 
        local right = '65%';
 
        local il = '^^';
 
        if theme.name() == '.mobile' then
 
            print('x');
 
            il = '^';
 
            left = '25%';
 
            right = '75%';
 
        end;
 
        
 
        return txttab(left, 'center') .. nw .. txttab('50%', 'center') .. n .. txttab(right, 'center') .. ne .. il 
 
            .. txttab(left, 'center') .. w .. txttab(right, 'center') .. e .. il 
 
            .. txttab(left, 'center') .. sw .. txttab('50%', 'center') .. sth .. txttab(right, 'center') .. se;
 
    end;
 
    map = {
 
        ["1"] = {
 
            e8 = "2";
 
            e7 = "32";
 
            ex4 = "iyh_ravine_entry";
 
        };
journey_temple.lua
Show inline comments
 
@@ -263,45 +263,71 @@ dt_labyrinth = room {
 
    dsc = function(s)
 
        return dt_labyrinth_map[dt_labyrinth.location].dsc;
 
    end;
 
    entered = function(s)
 
        s:update();
 
    end;
 
    update = function(s)
 
        dt_north:disable();
 
        dt_north_east:disable();
 
        dt_east:disable();
 
        dt_south_east:disable();
 
        dt_south:disable();
 
        dt_south_west:disable();
 
        dt_west:disable();
 
        dt_north_west:disable();
 
    ways_print = function(self, o)
 
        local nw, n, ne, w, e, sw, s, se;
 
        if (dt_labyrinth_map[dt_labyrinth.location].n) then
 
            dt_north:enable();
 
            n = stead.xref('N', dt_north);
 
        else
 
            n = 'N';
 
        end;
 
        if (dt_labyrinth_map[dt_labyrinth.location].ne) then
 
            dt_north_east:enable();
 
            ne = stead.xref('NE', dt_north_east);
 
        else
 
            ne = 'NE';
 
        end;
 
        if (dt_labyrinth_map[dt_labyrinth.location].e) then
 
            dt_east:enable();
 
            e = stead.xref('E', dt_east);
 
        else
 
            e = 'E';
 
        end;
 
        if (dt_labyrinth_map[dt_labyrinth.location].se) then
 
            dt_south_east:enable();
 
            se = stead.xref('SE', dt_south_east);
 
        else
 
            se = 'SE';
 
        end;
 
        if (dt_labyrinth_map[dt_labyrinth.location].s) then
 
            dt_south:enable();
 
            s = stead.xref('S', dt_south);
 
        else
 
            s = 'S';
 
        end;
 
        if (dt_labyrinth_map[dt_labyrinth.location].sw) then
 
            dt_south_west:enable();
 
            sw = stead.xref('SW', dt_south_west);
 
        else
 
            sw = 'SW';
 
        end;
 
        if (dt_labyrinth_map[dt_labyrinth.location].w) then
 
            dt_west:enable();
 
            w = stead.xref('W', dt_west);
 
        else
 
            w = 'W';
 
        end;
 
        if (dt_labyrinth_map[dt_labyrinth.location].nw) then
 
            dt_north_west:enable();
 
            nw = stead.xref('NW', dt_north_west);
 
        else
 
            nw = 'NW';
 
        end;
 
        
 
        local left = '35%';
 
        local right = '65%';
 
        local il = '^^';
 
        if theme.name() == '.mobile' then
 
            print('x');
 
            il = '^';
 
            left = '25%';
 
            right = '75%';
 
        end;
 
        
 
        return txttab(left, 'center') .. nw .. txttab('50%', 'center') .. n .. txttab(right, 'center') .. ne .. il 
 
            .. txttab(left, 'center') .. w .. txttab(right, 'center') .. e .. il 
 
            .. txttab(left, 'center') .. sw .. txttab('50%', 'center') .. s .. txttab(right, 'center') .. se .. '^'
 
            .. stead.xref(txtnb('В другое место'), dt_elsewhere) .. ' | '.. stead.xref(txtnb('Отойти от штурвала'), self.way[1]);
 
    end;
 
    update = function(s)
 
        move(submarine_leviathan, dt_labyrinth_map[dt_labyrinth.location].where);
 
    end;
 
    way = {
 
        kh_vroom("Отойти от штурвала", "leviathan_wheelhouse");
 
    };
 
    obj = {
 
@@ -316,110 +342,101 @@ dt_labyrinth = room {
 
        "dt_elsewhere"
 
    };
 
};
 

	
 
dt_elsewhere = obj {
 
    nam = "dt_elsewhere";
 
    dsc = "{В другое место}^";
 
    act = function(s)
 
        walk(leviathan_dlg);
 
    end;
 
};
 

	
 
dt_north = obj {
 
    nam = "dt_north";
 
    dsc = "{На север}^";
 
    act = function(s)
 
        pr [[Вы движетесь на север. ]];
 
        dt_labyrinth.location = dt_labyrinth_map[dt_labyrinth.location].n;
 
        dt_labyrinth:update();
 
        pr(dt_labyrinth_map[dt_labyrinth.location].dsc);
 
    end;
 
};
 

	
 
dt_north_east = obj {
 
    nam = "dt_north_east";
 
    dsc = "{На северо-восток}^";
 
    act = function(s)
 
        pr [[
 
            Вы движетесь на северо-восток.
 
        ]];
 
        dt_labyrinth.location = dt_labyrinth_map[dt_labyrinth.location].ne;
 
        dt_labyrinth:update();
 
        pr(dt_labyrinth_map[dt_labyrinth.location].dsc);
 
    end;
 
};
 

	
 
dt_east = obj {
 
    nam = "dt_east";
 
    dsc = "{На восток}^";
 
    act = function(s)
 
        pr [[
 
            Вы движетесь на восток.
 
        ]];
 
        dt_labyrinth.location = dt_labyrinth_map[dt_labyrinth.location].e;
 
        dt_labyrinth:update();
 
        pr(dt_labyrinth_map[dt_labyrinth.location].dsc);
 
    end;
 
};
 

	
 
dt_south_east = obj {
 
    nam = "dt_south_east";
 
    dsc = "{На юго-восток}^";
 
    act = function(s)
 
        pr [[
 
            Вы движетесь на юго-восток.
 
        ]];
 
        dt_labyrinth.location = dt_labyrinth_map[dt_labyrinth.location].se;
 
        dt_labyrinth:update();
 
        pr(dt_labyrinth_map[dt_labyrinth.location].dsc);
 
    end;
 
};
 

	
 
dt_south = obj {
 
    nam = "dt_south";
 
    dsc = "{На юг}^";
 
    act = function(s)
 
        pr [[
 
            Вы движетесь на юг.
 
        ]];
 
        dt_labyrinth.location = dt_labyrinth_map[dt_labyrinth.location].s;
 
        dt_labyrinth:update();
 
        pr(dt_labyrinth_map[dt_labyrinth.location].dsc);
 
    end;
 
};
 

	
 
dt_south_west = obj {
 
    nam = "dt_south_west";
 
    dsc = "{На юго-запад}^";
 
    act = function(s)
 
        pr [[
 
            Вы движетесь на юго-запад.
 
        ]];
 
        dt_labyrinth.location = dt_labyrinth_map[dt_labyrinth.location].sw;
 
        dt_labyrinth:update();
 
        pr(dt_labyrinth_map[dt_labyrinth.location].dsc);
 
    end;
 
};
 

	
 
dt_west = obj {
 
    nam = "dt_west";
 
    dsc = "{На запад}^";
 
    act = function(s)
 
        pr [[
 
            Вы движетесь на запад.
 
        ]];
 
        dt_labyrinth.location = dt_labyrinth_map[dt_labyrinth.location].w;
 
        dt_labyrinth:update();
 
        pr(dt_labyrinth_map[dt_labyrinth.location].dsc);
 
    end;
 
};
 

	
 
dt_north_west = obj {
 
    nam = "dt_north_west";
 
    dsc = "{На северо-запад}^";
 
    act = function(s)
 
        pr [[Вы движетесь на северо-запад. ]];
 
        dt_labyrinth.location = dt_labyrinth_map[dt_labyrinth.location].nw;
 
        dt_labyrinth:update();
 
        pr(dt_labyrinth_map[dt_labyrinth.location].dsc);
 
    end;
journey_venaedanotrr_labyrinth.lua
Show inline comments
 
@@ -173,12 +173,59 @@ ven_temple_labyrinth_l1 = labyrinth {
 
    dir = {
 
        "На север";
 
        "На восток";
 
        "На юг";
 
        "На запад";
 
    };
 
    
 
    ways_print = function(s, o)
 
        
 
        local n, e, sth, w;
 
        if s.map[s.position]['e1'] or s.map[s.position]['ex1'] then
 
            n = stead.xref(txtnb('N'), s.way[1]);
 
        else
 
            n = txtnb('N');
 
        end;
 
        if s.map[s.position]['e2'] or s.map[s.position]['ex2'] then
 
            e = stead.xref(txtnb('E'), s.way[2]);
 
        else
 
            e = txtnb('E');
 
        end;
 
        if s.map[s.position]['e3'] or s.map[s.position]['ex3'] then
 
            sth = stead.xref('S', s.way[3]);
 
        else
 
            sth = txtnb('S');
 
        end;
 
        if s.map[s.position]['e4'] or s.map[s.position]['ex4'] then
 
            w = stead.xref('W', s.way[4]);
 
        else
 
            w = txtnb('W');
 
        end;
 
        local left = '35%';
 
        local right = '65%';
 
        local il = '^^';
 
        if theme.name() == '.mobile' then
 
            print('x');
 
            il = '^';
 
            left = '25%';
 
            right = '75%';
 
        end;
 
        local left = '35%';
 
        local right = '65%';
 
        local il = '^^';
 
        if theme.name() == '.mobile' then
 
            print('x');
 
            il = '^';
 
            left = '25%';
 
            right = '75%';
 
        end;
 
        
 
        return txttab('50%', 'center') .. n .. il 
 
            .. txttab(left, 'center') .. w .. txttab(right, 'center') .. e .. il 
 
            .. txttab('50%', 'center') .. sth .. '^' .. stead.xref(txtnb('Ждать'), s.way[5]);
 
    end;
 
    nam = "Венаэданотр, храм, лабиринт";
 
    dsc = function(s)
 
        if (s.map[s.position].name) then
 
            return s.map[s.position].name;
 
        else
 
            return [[Вы стоите посреди запутанного лабиринта. Металлические стены по сторонам здесь ничем не отличаются от стен в других коридорах этого лабиринта. Пол и потолок излучают мягкий белый свет. ]];
themes/default/theme.ini
Show inline comments
 
@@ -12,14 +12,14 @@ win.up.x = 567
 
win.up.y = -1
 
win.down.x = 567
 
win.down.y = -1
 
win.fnt.name = {fonts/kelvinch-roman,fonts/kelvinch-italic,fonts/kelvinch-italic}.otf
 

	
 
win.ways.mode = bottom
 
win.col.fg = #401000
 
win.col.link = #b02c00
 
win.col.fg = #300c00
 
win.col.link = #b82c00
 
win.col.alink = #606060
 
win.gfx.up = ui_up.png
 
win.gfx.down = ui_down.png
 

	
 
scr.gfx.bg = bg.png
 
scr.gfx.mode = fixed
themes/mobile/theme.ini
Show inline comments
 
@@ -13,14 +13,14 @@ win.up.y = -1
 
win.down.x = 524
 
win.down.y = -1
 
win.fnt.size = 24
 
win.fnt.height = 1.1
 

	
 
win.ways.mode = top
 
win.col.fg = #401000
 
win.col.link = #b02c00
 
win.col.fg = #300c00
 
win.col.link = #b82c00
 
win.col.alink = #606060
 
win.gfx.up = ui_up.png
 
win.gfx.down = ui_down.png
 

	
 
scr.gfx.bg = bg.png
 
scr.gfx.mode = embedded
themes/wide/theme.ini
Show inline comments
 
@@ -11,14 +11,14 @@ win.h = 532
 
win.up.x = 680
 
win.up.y = -1
 
win.down.x = 680
 
win.down.y = -1
 

	
 
win.ways.mode = bottom
 
win.col.fg = #401000
 
win.col.link = #b02c00
 
win.col.fg = #300c00
 
win.col.link = #b82c00
 
win.col.alink = #606060
 
win.gfx.up = ui_up.png
 
win.gfx.down = ui_down.png
 

	
 
scr.gfx.bg = bg.png
 
scr.gfx.mode = fixed
utils.lua
Show inline comments
 
@@ -976,12 +976,35 @@ suit = function(tab)
 
		tab.inv = _atlantis.suit_inv;
 
	end;
 
	
 
	return obj(tab);
 
end;
 
 
stead.list_str = function(self)
 
    local v, vv
 
    for i, o in stead.opairs(self) do
 
        o = stead.ref(o);
 
        if isObject(o) and not isDisabled(o) then
 
            vv = stead.dispof(o)
 
            vv = stead.xref(vv, o);
 
            v = stead.par(stead.delim, v, vv);
 
        end
 
    end
 
    return v;
 
end
 
 
old_player_ways = stead.player_ways;
 
 
stead.player_ways = function(s)
 
    if type(here().ways_print) == 'function' then
 
        return here().ways_print(here(), s); 
 
    else
 
        return old_player_ways(s);
 
    end;
 
end;
 
 
labyrinth = function(tab)
 
    local enter = tab.enter;
 
    local exit = tab.exit;
 
    local dsc = tab.dsc;
 
    local lab;
 
0 comments (0 inline, 0 general)