diff --git a/leviathan.lua b/leviathan.lua --- a/leviathan.lua +++ b/leviathan.lua @@ -1210,7 +1210,8 @@ phone_wheelhouse = obj { elseif (#pl.party < 1) then return [[Здесь никого нет. ]]; else - walkin(phone_dlg); + phone_dlg.from_wardroom = false; + walkin("phone_dlg"); end; end; seen_level = 1; @@ -1226,6 +1227,7 @@ phone_cabin = obj { elseif (#pl.party < 1) then return [[Здесь никого нет. ]]; else + phone_dlg.from_wardroom = false; walkin("phone_dlg"); end; end; @@ -1241,7 +1243,10 @@ phone_wardroom = obj { return [[Без электричества телефон не заработает. ]]; elseif (#pl.party < 1) then return [[Здесь никого нет. ]]; + elseif ArrayUtils.indexOf(pl.party, 'radcliffe') == 0 and ArrayUtils.indexOf(pl.party, 'phaetlarr') == 0 then + return [[Весь экипаж находится здесь. Звонить незачем. ]]; else + phone_dlg.from_wardroom = true; walkin("phone_dlg"); end; end; @@ -1253,10 +1258,14 @@ phone_dlg = dlg { disp = "Телефон"; hideinv = true; dsc = [[Вы снимаете трубку. ]]; + from_wardroom = nil; + entered = function(s) poff("phaetlarr", "learr", "radcliffe", "wright", "anna"); for i = 1, #pl.party do - pon(pl.party[i]); + if not s.from_wardroom or (pl.party[i] == 'phaetlarr' or pl.party[i] == 'radcliffe') then + pon(pl.party[i]); + end; end; end; phr = { diff --git a/startup.lua b/startup.lua --- a/startup.lua +++ b/startup.lua @@ -223,7 +223,7 @@ function fix_save(filename) if f~=nil then local content = f:read("*all"); stead.io.close(f); - print(string.find(content, '0.10.0')); + if string.find(content, '0.10.0') == nil then print("Fixing save file"); content = stead.string.gsub(content, '([^A-Za-z])rm([^A-Za-z])', '%1warehouse_32%2') .. '\nversion="0.10.0"\n';