Changeset - bff3a59bf8b4
[Not reviewed]
default
0 2 0
Silverwing - 3 years ago 2020-11-09 21:37:16

Logic error: Disallow calling characters that are in wardroom from wardroom
2 files changed with 12 insertions and 3 deletions:
0 comments (0 inline, 0 general)
leviathan.lua
Show inline comments
 
@@ -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 = {
startup.lua
Show inline comments
 
@@ -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';
0 comments (0 inline, 0 general)