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
 
@@ -2113,6 +2113,51 @@ dyp_temple_blue_room = labyrinth {
 
        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 = {
 
        "На север";
 
        "На восток";
 
@@ -2390,6 +2435,20 @@ 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"] = {
atlantis_iyhehevjiarr.lua
Show inline comments
 
@@ -598,7 +598,63 @@ iyh_labyrinth = labyrinth {
 
    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";
journey_temple.lua
Show inline comments
 
@@ -266,39 +266,65 @@ dt_labyrinth = room {
 
    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 = {
 
@@ -319,7 +345,6 @@ dt_labyrinth = room {
 

	
 
dt_elsewhere = obj {
 
    nam = "dt_elsewhere";
 
    dsc = "{В другое место}^";
 
    act = function(s)
 
        walk(leviathan_dlg);
 
    end;
 
@@ -327,7 +352,6 @@ dt_elsewhere = obj {
 

	
 
dt_north = obj {
 
    nam = "dt_north";
 
    dsc = "{На север}^";
 
    act = function(s)
 
        pr [[Вы движетесь на север. ]];
 
        dt_labyrinth.location = dt_labyrinth_map[dt_labyrinth.location].n;
 
@@ -338,7 +362,6 @@ dt_north = obj {
 

	
 
dt_north_east = obj {
 
    nam = "dt_north_east";
 
    dsc = "{На северо-восток}^";
 
    act = function(s)
 
        pr [[
 
            Вы движетесь на северо-восток.
 
@@ -351,7 +374,6 @@ dt_north_east = obj {
 

	
 
dt_east = obj {
 
    nam = "dt_east";
 
    dsc = "{На восток}^";
 
    act = function(s)
 
        pr [[
 
            Вы движетесь на восток.
 
@@ -364,7 +386,6 @@ dt_east = obj {
 

	
 
dt_south_east = obj {
 
    nam = "dt_south_east";
 
    dsc = "{На юго-восток}^";
 
    act = function(s)
 
        pr [[
 
            Вы движетесь на юго-восток.
 
@@ -377,7 +398,6 @@ dt_south_east = obj {
 

	
 
dt_south = obj {
 
    nam = "dt_south";
 
    dsc = "{На юг}^";
 
    act = function(s)
 
        pr [[
 
            Вы движетесь на юг.
 
@@ -390,7 +410,6 @@ dt_south = obj {
 

	
 
dt_south_west = obj {
 
    nam = "dt_south_west";
 
    dsc = "{На юго-запад}^";
 
    act = function(s)
 
        pr [[
 
            Вы движетесь на юго-запад.
 
@@ -403,7 +422,6 @@ dt_south_west = obj {
 

	
 
dt_west = obj {
 
    nam = "dt_west";
 
    dsc = "{На запад}^";
 
    act = function(s)
 
        pr [[
 
            Вы движетесь на запад.
 
@@ -416,7 +434,6 @@ dt_west = obj {
 

	
 
dt_north_west = obj {
 
    nam = "dt_north_west";
 
    dsc = "{На северо-запад}^";
 
    act = function(s)
 
        pr [[Вы движетесь на северо-запад. ]];
 
        dt_labyrinth.location = dt_labyrinth_map[dt_labyrinth.location].nw;
journey_venaedanotrr_labyrinth.lua
Show inline comments
 
@@ -176,6 +176,53 @@ ven_temple_labyrinth_l1 = labyrinth {
 
        "На юг";
 
        "На запад";
 
    };
 
    
 
    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
themes/default/theme.ini
Show inline comments
 
@@ -15,8 +15,8 @@ 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
themes/mobile/theme.ini
Show inline comments
 
@@ -16,8 +16,8 @@ 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
themes/wide/theme.ini
Show inline comments
 
@@ -14,8 +14,8 @@ 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
utils.lua
Show inline comments
 
@@ -979,6 +979,29 @@ suit = function(tab)
 
	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;
0 comments (0 inline, 0 general)