diff --git a/journey_temple.lua b/journey_temple.lua --- a/journey_temple.lua +++ b/journey_temple.lua @@ -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;