|
|
global {
|
|
|
solarscale_stays = false
|
|
|
}
|
|
|
|
|
|
function make_tbg_slice(scale, theme)
|
|
|
local src = pixels.new('images/' .. theme .. '_theme/text_bg.png'):scale(scale);
|
|
|
local tbg, tbg_slice
|
|
|
local frw, frh, fdx, fdy
|
|
|
if theme == 'main' or theme == 'bwm' then
|
|
|
tbg, tbg_slice = dire_slice_9(src, {
|
|
|
x = 9 * scale,
|
|
|
y = 6 * scale,
|
|
|
w = 96 * scale,
|
|
|
h = 96 * scale
|
|
|
});
|
|
|
else
|
|
|
tbg, tbg_slice = dire_slice_9(src, {
|
|
|
x = 6 * scale,
|
|
|
y = 6 * scale,
|
|
|
w = 128 * scale,
|
|
|
h = 128 * scale
|
|
|
});
|
|
|
end;
|
|
|
|
|
|
return tbg, tbg_slice;
|
|
|
end;
|
|
|
|
|
|
function make_ending_frame(scale, theme, tbg, tbg_slice)
|
|
|
local fdx, fdy, frw, frh;
|
|
|
|
|
|
if theme == 'main' or theme == 'bwm' then
|
|
|
frw = 978 * scale;
|
|
|
frh = 612 * scale;
|
|
|
fdx = 9 * scale;
|
|
|
fdy = 6 * scale;
|
|
|
else
|
|
|
frw = 970 * scale;
|
|
|
frh = 610 * scale;
|
|
|
fdx = 5 * scale;
|
|
|
fdy = 5 * scale;
|
|
|
end;
|
|
|
|
|
|
local bgframe = pixels.new(frw, frh);
|
|
|
dire_draw_9(tbg, bgframe, {x = 0; y = 0; w = frw; h = frh}, {parts=tbg_slice});
|
|
|
return bgframe, fdx, fdy, frw, frh;
|
|
|
end;
|
|
|
|
|
|
function show_ending(theme, image, position, hide_textbg)
|
|
|
--[[
|
|
|
position: nil or 0 -- center, 1 -- bottom-left
|
|
|
]]
|
|
|
--frames, process, delay, frame_nr
|
|
|
|
|
|
local scale = diretheme.get_scale();
|
|
|
|
|
|
local unscaled_sw, unscaled_sh = diretheme.get_scaled_screen();
|
|
|
|
|
|
local unscaled_w = 960;
|
|
|
local unscaled_h = 600;
|
|
|
|
|
|
local ox = math.floor((unscaled_sw - unscaled_w) / 2);
|
|
|
local oy = math.floor((unscaled_sh - unscaled_h) / 2);
|
|
|
|
|
|
if position == 1 then
|
|
|
if ox < 0 then
|
|
|
ox = 0;
|
|
|
end;
|
|
|
if oy < 0 then
|
|
|
oy = unscaled_sh - unscaled_h;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if hide_textbg then
|
|
|
D {'textbg'};
|
|
|
else
|
|
|
local sw, sh = diretheme.get_screen();
|
|
|
local tx = 24 * scale;
|
|
|
local tw = sw - tx - 24 * scale;
|
|
|
if tw > 600 * scale then
|
|
|
tw = 600 * scale;
|
|
|
tx = (sw - tw) / 2;
|
|
|
end;
|
|
|
local th = 160 * scale;
|
|
|
local ty = sh - th - 24 * scale;
|
|
|
|
|
|
local textbg = pixels.new(tw, th);
|
|
|
local tbg, tbg_slice = make_tbg_slice(scale, theme);
|
|
|
dire_draw_9(tbg, textbg, {x = 0; y = 0; w = tw; h = th}, {parts=tbg_slice});
|
|
|
D {'textbg', 'img', textbg:sprite(), x=tx, y=ty, w=tw, h=th, z=0, background=true};
|
|
|
end;
|
|
|
|
|
|
local themebg = pixels.new(unscaled_sw, unscaled_sh);
|
|
|
local bgtile = pixels.new('images/' .. theme .. '_theme/background.png');
|
|
|
dire_draw_tile(bgtile, themebg, {x=0, y=0, w=unscaled_sw, h=unscaled_sh}, {xoffset=-1, yoffset=-1});
|
|
|
|
|
|
if (ox > 0) or (oy > 0) then
|
|
|
--Don't bother painting border if it's not visible (Effective screen < 960x600)
|
|
|
local tbg, tbg_slice = make_tbg_slice(1, theme);
|
|
|
local bgframe, fdx, fdy, frw, frh = make_ending_frame(1, theme, tbg, tbg_slice);
|
|
|
dire_draw_center(bgframe, themebg, {x = ox - fdx, y = oy - fdy, w = frw, h = frh});
|
|
|
end;
|
|
|
|
|
|
dire_draw_center(pixels.new(image), themebg, {x = ox, y = oy, w = 960, h = 600});
|
|
|
|
|
|
local bgcolor = '#89C6AE';
|
|
|
if theme == 'bwm' then
|
|
|
bgcolor = '#B2B2B2';
|
|
|
elseif theme == 'bwt' then
|
|
|
bgcolor = '#1F1F1F';
|
|
|
elseif theme == 'tower' then
|
|
|
bgcolor = '#181E37';
|
|
|
end;
|
|
|
|
|
|
diretheme.set_background(bgcolor, 255, themebg, {mode=1, scale = true});
|
|
|
end;
|
|
|
|
|
|
function ending_room(s)
|
|
|
s.nofollow = true;
|
|
|
s.noinv = true;
|
|
|
s.nosave = true;
|
|
|
s.noautosave = true;
|
|
|
s.notitle = true;
|
|
|
if not s.disp then
|
|
|
s.disp = translate("ending_locale", 'game_end');
|
|
|
end;
|
|
|
|
|
|
return room(s);
|
|
|
end;
|
|
|
|
|
|
--[[
|
|
|
1. Leaving the tower
|
|
|
]]
|
|
|
room {
|
|
|
state = 0;
|
|
|
{
|
|
|
state = 0;
|
|
|
};
|
|
|
nam = 'ending_left';
|
|
|
nofollow = true;
|
|
|
theme = 'ending_outside';
|
|
|
disp = translate("ending_locale", 'game_end');
|
|
|
noinv = true;
|
|
|
notitle = true;
|
|
|
nosave = true;
|
|
|
noautosave = true;
|
|
|
themeInit = function(s)
|
|
|
local scale = diretheme.get_scale();
|
|
|
local width, height = diretheme.get_scaled_screen();
|
|
|
local dx = math.floor((width - 960) / 2);
|
|
|
local dy = math.floor((height - 600) / 2);
|
|
|
|
|
|
show_ending('main', 'images/endings/tower_left_bg.png');
|
|
|
timer:set(25);
|
|
|
|
|
|
animation_set({
|
|
|
{type="delay", delay=2000};
|
|
|
{
|
|
|
type="image",
|
|
|
image=get_sprite('images/endings/tower_left_bg.png'),
|
|
|
x = dx * scale,
|
|
|
y = dy * scale,
|
|
|
w = 960 * scale,
|
|
|
h = 600 * scale,
|
|
|
background = true
|
|
|
};
|
|
|
{
|
|
|
type="anim",
|
|
|
image=get_sprite('images/endings/tower_left_frames.png'),
|
|
|
x = dx * scale,
|
|
|
y = dy * scale,
|
|
|
w = 960 * scale,
|
|
|
h = 600 * scale,
|
|
|
frames=6,
|
|
|
delay=500,
|
|
|
frame_data = {
|
|
|
{};
|
|
|
{x=0, y=318, w=51, h=16, dx=444, dy=246};
|
|
|
{x=0, y=276, w=51, h=42, dx=444, dy=246};
|
|
|
{x=0, y=202, w=51, h=74, dx=444, dy=246};
|
|
|
{x=0, y=108, w=51, h=94, dx=444, dy=246};
|
|
|
{x=0, y=0, w=51, h=108, dx=444, dy=246};
|
|
|
};
|
|
|
};
|
|
|
}, true);
|
|
|
end;
|
|
|
onenter = function(s)
|
|
|
s.state = s.state + 1;
|
|
|
if s.state == 1 then
|
|
|
p(translate_now("ending_locale", 'left_state_1'));
|
|
|
return false;
|
|
|
elseif s.state == 2 then
|
|
|
p(translate_now("ending_locale", 'left_state_2'));
|
|
|
return false;
|
|
|
elseif s.state == 3 then
|
|
|
p(translate_now("ending_locale", 'left_state_3'));
|
|
|
return false;
|
|
|
end;
|
|
|
|
|
|
if irradiated then
|
|
|
snd.music('sound/bgm_ending_forest_irradiated.ogg');
|
|
|
else
|
|
|
snd.music('sound/bgm_ending_forest.ogg');
|
|
|
end;
|
|
|
|
|
|
enableSmoke('images/endings/tower_left_bg.png');
|
|
|
end;
|
|
|
onexit = function(s)
|
|
|
fading.enabled = false;
|
|
|
end;
|
|
|
dsc = function(s)
|
|
|
p(translate_now("ending_locale", 'left_part_1'));
|
|
|
if solarscale_with_me then
|
|
|
p(translate_now("ending_locale", 'left_part_1_solarscale'));
|
|
|
end;
|
|
|
end;
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), 'ending_left_2'};
|
|
|
};
|
|
|
}
|
|
|
|
|
|
room {
|
|
|
nam = 'ending_left_2';
|
|
|
nofollow = true;
|
|
|
nosave = true;
|
|
|
noautosave = true;
|
|
|
theme = function(s)
|
|
|
if irradiated then
|
|
|
return 'ending_outside_bw';
|
|
|
else
|
|
|
return 'ending_outside';
|
|
|
end;
|
|
|
end;
|
|
|
disp = translate("ending_locale", 'game_end');
|
|
|
noinv = true;
|
|
|
notitle = true;
|
|
|
themeInit = function(s)
|
|
|
if irradiated then
|
|
|
show_ending('bwm', 'images/endings/tower_left_closed_bw.png');
|
|
|
else
|
|
|
show_ending('main', 'images/endings/tower_left_closed.png');
|
|
|
end;
|
|
|
|
|
|
animation_set(false);
|
|
|
end;
|
|
|
dsc = function(s)
|
|
|
pn(translate_now("ending_locale", 'left_part_2'));
|
|
|
if solarscale_with_me then
|
|
|
pn(translate_now("ending_locale", 'solarscale_lost'));
|
|
|
end;
|
|
|
if irradiated then
|
|
|
p(translate_now("ending_locale", 'irradiated'));
|
|
|
end;
|
|
|
end;
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), function(s)
|
|
|
if irradiated then
|
|
|
_'ending_credits'.etype = 'leftbw';
|
|
|
else
|
|
|
_'ending_credits'.etype = 'left';
|
|
|
end;
|
|
|
return 'ending_credits';
|
|
|
end};
|
|
|
};
|
|
|
}
|
|
|
|
|
|
--[[
|
|
|
2. Destroying the tower
|
|
|
]]
|
|
|
|
|
|
room {
|
|
|
nam = 'ending_formatted';
|
|
|
disp = translate("ending_locale", 'game_end');
|
|
|
theme = 'ending_outside';
|
|
|
nofollow = true;
|
|
|
noinv = true;
|
|
|
notitle = true;
|
|
|
theme = 'ending_outside';
|
|
|
nosave = true;
|
|
|
noautosave = true;
|
|
|
themeInit = function(s)
|
|
|
show_ending('main', 'images/endings/tower_ruin.png');
|
|
|
timer:set(25);
|
|
|
end;
|
|
|
onenter = function(s)
|
|
|
if irradiated then
|
|
|
snd.music('sound/bgm_ending_forest_irradiated.ogg');
|
|
|
else
|
|
|
snd.music('sound/bgm_ending_forest.ogg');
|
|
|
end;
|
|
|
end;
|
|
|
onexit = function(s)
|
|
|
fading.enabled = false;
|
|
|
end;
|
|
|
dsc = function(s)
|
|
|
if solarscale_with_me then
|
|
|
p(translate_now("ending_locale", 'formatted_solarscale'));
|
|
|
else
|
|
|
p(translate_now("ending_locale", 'formatted_alone'));
|
|
|
end;
|
|
|
end;
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), 'ending_formatted_2'};
|
|
|
};
|
|
|
}
|
|
|
|
|
|
room {
|
|
|
nam = 'ending_formatted_2';
|
|
|
nofollow = true;
|
|
|
theme = function(s)
|
|
|
if irradiated then
|
|
|
return 'ending_outside_bw';
|
|
|
else
|
|
|
return 'ending_outside';
|
|
|
end;
|
|
|
end;
|
|
|
nosave = true;
|
|
|
noautosave = true;
|
|
|
disp = translate("ending_locale", 'game_end');
|
|
|
noinv = true;
|
|
|
notitle = true;
|
|
|
themeInit = function(s)
|
|
|
if irradiated then
|
|
|
return show_ending('bwm', 'images/endings/tower_ruin_bw.png');
|
|
|
else
|
|
|
return show_ending('main', 'images/endings/tower_ruin.png');
|
|
|
end;
|
|
|
end;
|
|
|
dsc = function(s)
|
|
|
pn(translate_now("ending_locale", 'formatted_2'));
|
|
|
if solarscale_with_me then
|
|
|
pn(translate_now("ending_locale", 'solarscale_lost'));
|
|
|
end;
|
|
|
if irradiated then
|
|
|
p(translate_now("ending_locale", 'irradiated'));
|
|
|
end;
|
|
|
end;
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), function(s)
|
|
|
if irradiated then
|
|
|
_'ending_credits'.etype = 'formatbw';
|
|
|
else
|
|
|
_'ending_credits'.etype = 'format';
|
|
|
end;
|
|
|
return 'ending_credits';
|
|
|
end};
|
|
|
};
|
|
|
}
|
|
|
|
|
|
--[[
|
|
|
3. True ending stage 1
|
|
|
]]
|
|
|
|
|
|
-- 3a. With solarscale
|
|
|
|
|
|
ending_room {
|
|
|
nam = 'ending_dissolving_tower_solarscale';
|
|
|
theme = 'ending_outside';
|
|
|
dsc = translate("ending_locale", 'ending_dissolving_tower_solarscale');
|
|
|
onenter = function(s)
|
|
|
enableSmoke('images/endings/crater_edge/tower_solarscale.png', 1);
|
|
|
end;
|
|
|
themeInit = function(s)
|
|
|
local scale = diretheme.get_scale();
|
|
|
local width, height = diretheme.get_scaled_screen();
|
|
|
local dx = math.floor((width - 960) / 2);
|
|
|
local dy = math.floor((height - 600) / 2);
|
|
|
|
|
|
if dx < 0 then
|
|
|
dx = 0;
|
|
|
end;
|
|
|
|
|
|
if dy < 0 then
|
|
|
dy = height - 600;
|
|
|
end;
|
|
|
|
|
|
show_ending('main', 'images/endings/crater_edge/tower_solarscale.png', 1);
|
|
|
animation_set({
|
|
|
{type="delay", delay=2000};
|
|
|
{
|
|
|
type="anim",
|
|
|
image=get_sprite('images/endings/crater_edge/tower_animation.png'),
|
|
|
x = (dx + 445) * scale,
|
|
|
y = (dy + 311) * scale,
|
|
|
w = 40 * scale,
|
|
|
h = 94 * scale,
|
|
|
frames = 14,
|
|
|
delay = 150,
|
|
|
};
|
|
|
}, true);
|
|
|
timer:set(25);
|
|
|
end;
|
|
|
onexit = function(s)
|
|
|
fading.enabled = false;
|
|
|
end;
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), 'ending_solarscale_flies_away'};
|
|
|
};
|
|
|
}
|
|
|
|
|
|
room {
|
|
|
nam = 'ending_solarscale_pre';
|
|
|
theme = 'tower';
|
|
|
disp = translate("tower_locale", 'tower_level_4_room_2_disp');
|
|
|
nofollow = true;
|
|
|
noinv = true;
|
|
|
nosave = true;
|
|
|
noautosave = true;
|
|
|
pic = 'images/tower_level_4_room_2_light.png';
|
|
|
dsc = translate("ending_locale", 'ending_solarscale_pre');
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), 'ending_solarscale_dlg'};
|
|
|
};
|
|
|
}
|
|
|
|
|
|
local solarscale_convince = function(s)
|
|
|
_'ending_solarscale_dlg'.weight = _'ending_solarscale_dlg'.weight + 1;
|
|
|
if _'ending_solarscale_dlg'.weight >= 5 then
|
|
|
walk('ending_solarscale_stays');
|
|
|
elseif _'ending_solarscale_dlg'.weight >= 3 then
|
|
|
return translate_now("ending_locale", "true_solarscale_convince_level_3");
|
|
|
elseif _'ending_solarscale_dlg'.weight >= 2 then
|
|
|
return translate_now("ending_locale", "true_solarscale_convince_level_2");
|
|
|
elseif _'ending_solarscale_dlg'.weight == 1 then
|
|
|
return translate_now("ending_locale", "true_solarscale_convince_level_1");
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
dlg {
|
|
|
weight = 0;
|
|
|
nam = 'ending_solarscale_dlg';
|
|
|
nofollow = true;
|
|
|
theme = 'tower';
|
|
|
noinv = true;
|
|
|
disp = translate("solarscale_locale", 'disp');
|
|
|
nosave = true;
|
|
|
noautosave = true;
|
|
|
pic = 'images/tower_level_4_room_2_light.png;images/characters/solarscale_tower_dusk.png';
|
|
|
enter = translate("ending_locale", 'true_solarscale_dlg_enter');
|
|
|
phr = {
|
|
|
{translate("ending_locale", "true_solarscale_dlg_1"), function(s)
|
|
|
walk('ending_solarscale_leaving_hold');
|
|
|
end};
|
|
|
{translate("ending_locale", "true_solarscale_dlg_2"), translate("ending_locale", "true_solarscale_dlg_2_response"), next='#convince'};
|
|
|
{translate("ending_locale", "true_solarscale_dlg_end"), function(s)
|
|
|
walk('ending_solarscale_leaving_farewell');
|
|
|
end};
|
|
|
{false, '#convince',
|
|
|
{translate("ending_locale", "true_solarscale_dlg_1"), function(s)
|
|
|
walk('ending_solarscale_leaving_hold');
|
|
|
end};
|
|
|
{cond=function(s) return _'ending_solarscale_dlg'.weight > 0 end; translate("ending_locale", "true_solarscale_dlg_end"), function(s)
|
|
|
walk('ending_solarscale_leaving_farewell')
|
|
|
end};
|
|
|
{translate("ending_locale", "true_solarscale_dlg_3"), solarscale_convince},
|
|
|
{cond=function(s) return _'solarscale_ally'.after_discussed end; translate("ending_locale", "true_solarscale_dlg_4"), solarscale_convince},
|
|
|
{cond=function(s) return had_tea and tea_answer_1 == 1 and tea_answer_2 == 1 and tea_answer_3 == 1 end; translate("ending_locale", "true_solarscale_dlg_5"), solarscale_convince},
|
|
|
{cond=function(s) return solarscale_tower end; translate("ending_locale", "true_solarscale_dlg_6"), solarscale_convince},
|
|
|
{cond=function(s) return solarscale_helps < 2 end; translate("ending_locale", "true_solarscale_dlg_7"), solarscale_convince};
|
|
|
{cond=function(s) return solarscale_glade_visited end; translate("ending_locale", "true_solarscale_dlg_8"), solarscale_convince};
|
|
|
};
|
|
|
};
|
|
|
}
|
|
|
|
|
|
room {
|
|
|
nam = 'ending_solarscale_stays';
|
|
|
nofollow = true;
|
|
|
theme = 'tower';
|
|
|
nosave = true;
|
|
|
noautosave = true;
|
|
|
noinv = true;
|
|
|
disp = translate("solarscale_locale", 'disp');
|
|
|
pic = 'images/tower_level_4_room_2_light.png;images/characters/solarscale_tower_dusk.png';
|
|
|
decor = translate("ending_locale", "true_solarscale_convince_level_4");
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), 'ending_solarscale_stays_part_2'};
|
|
|
};
|
|
|
};
|
|
|
|
|
|
room {
|
|
|
nam = 'ending_solarscale_stays_part_2';
|
|
|
notitle = true;
|
|
|
nofollow = true;
|
|
|
theme = 'ending_outside';
|
|
|
noinv = true;
|
|
|
disp = translate("ending_locale", 'game_end');
|
|
|
nosave = true;
|
|
|
noautosave = true;
|
|
|
dsc = translate("ending_locale", 'true_solarscale_stays');
|
|
|
onenter = function(s)
|
|
|
solarscale_stays = true;
|
|
|
enableSmoke('images/endings/crater_edge/crater_edge.png', 1);
|
|
|
end;
|
|
|
themeInit = function(s)
|
|
|
local scale = diretheme.get_scale();
|
|
|
local width, height = diretheme.get_scaled_screen();
|
|
|
local dx = math.floor((width - 960) / 2);
|
|
|
local dy = math.floor((height - 600) / 2);
|
|
|
|
|
|
if dx < 0 then
|
|
|
dx = 0;
|
|
|
end;
|
|
|
|
|
|
if dy < 0 then
|
|
|
dy = height - 600;
|
|
|
end;
|
|
|
|
|
|
show_ending('main', 'images/endings/crater_edge/crater_edge.png', 1);
|
|
|
animation_set({
|
|
|
{type="delay", delay=2000};
|
|
|
{
|
|
|
type="anim",
|
|
|
image=get_sprite('images/endings/crater_edge/tower_animation.png'),
|
|
|
x = (dx + 445) * scale,
|
|
|
y = (dy + 311) * scale,
|
|
|
w = 40 * scale,
|
|
|
h = 94 * scale,
|
|
|
frames = 14,
|
|
|
delay = 150,
|
|
|
};
|
|
|
}, true);
|
|
|
|
|
|
timer:set(25);
|
|
|
end;
|
|
|
onexit = function(s)
|
|
|
fading.enabled = false;
|
|
|
end;
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), 'ending_welcome'};
|
|
|
};
|
|
|
};
|
|
|
|
|
|
room {
|
|
|
nam = 'ending_solarscale_leaving_farewell';
|
|
|
nofollow = true;
|
|
|
theme = 'tower';
|
|
|
nosave = true;
|
|
|
noautosave = true;
|
|
|
noinv = true;
|
|
|
disp = translate("tower_locale", 'tower_level_4_room_2_disp');
|
|
|
pic = 'images/tower_level_4_room_2_light.png';
|
|
|
decor = translate("ending_locale", "true_solarscale_dlg_end_response");
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), 'ending_solarscale_leaving_part_2'};
|
|
|
};
|
|
|
};
|
|
|
|
|
|
room {
|
|
|
nam = 'ending_solarscale_leaving_hold';
|
|
|
nofollow = true;
|
|
|
theme = 'tower';
|
|
|
nosave = true;
|
|
|
noautosave = true;
|
|
|
noinv = true;
|
|
|
pic = 'images/tower_level_4_room_2_light.png';
|
|
|
disp = translate("tower_locale", 'tower_level_4_room_2_disp');
|
|
|
decor = translate("ending_locale", "true_solarscale_dlg_1_response");
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), 'ending_solarscale_leaving_part_2'};
|
|
|
};
|
|
|
};
|
|
|
|
|
|
room {
|
|
|
nam = 'ending_solarscale_leaving_part_2';
|
|
|
notitle = true;
|
|
|
nofollow = true;
|
|
|
noinv = true;
|
|
|
disp = translate("ending_locale", 'game_end');
|
|
|
theme = 'ending_outside';
|
|
|
nosave = true;
|
|
|
noautosave = true;
|
|
|
onenter = function(s)
|
|
|
enableSmoke('images/endings/tower_left_bg.png');
|
|
|
end;
|
|
|
themeInit = function(s)
|
|
|
local scale = diretheme.get_scale();
|
|
|
local width, height = diretheme.get_scaled_screen();
|
|
|
local dx = math.floor((width - 960) / 2);
|
|
|
local dy = math.floor((height - 600) / 2);
|
|
|
|
|
|
show_ending('main', 'images/endings/tower_left_bg.png');
|
|
|
animation_set({
|
|
|
{type="delay", delay=2000};
|
|
|
{
|
|
|
type="image",
|
|
|
image=get_sprite('images/endings/tower_left_bg.png'),
|
|
|
x = dx * scale,
|
|
|
y = dy * scale,
|
|
|
w = 960 * scale,
|
|
|
h = 600 * scale,
|
|
|
background = true
|
|
|
};
|
|
|
{
|
|
|
type="anim",
|
|
|
image=get_sprite('images/endings/solarscale_left_frames.png'),
|
|
|
x = dx * scale,
|
|
|
y = dy * scale,
|
|
|
w = 960 * scale,
|
|
|
h = 600 * scale,
|
|
|
frames = 15,
|
|
|
delay = 100,
|
|
|
background = true,
|
|
|
frame_data = {
|
|
|
{},
|
|
|
{x=214, y=326, w=8, h=8, dx=467, dy=294},
|
|
|
{x=214, y=309, w=28, h=17, dx=458, dy=288},
|
|
|
{x=49, y=518, w=44, h=18, dx=449, dy=295},
|
|
|
{x=0, y=518, w=49, h=24, dx=445, dy=293},
|
|
|
{x=214, y=272, w=43, h=37, dx=447, dy=293},
|
|
|
{x=153, y=505, w=73, h=47, dx=431, dy=296},
|
|
|
{x=0, y=342, w=153, h=59, dx=388, dy=288},
|
|
|
{x=0, y=272, w=214, h=70, dx=364, dy=272},
|
|
|
{x=0, y=401, w=142, h=117, dx=396, dy=229},
|
|
|
{x=153, y=342, w=102, h=163, dx=422, dy=144},
|
|
|
{x=0, y=0, w=257, h=163, dx=347, dy=50},
|
|
|
{x=0, y=163, w=257, h=109, dx=347, dy=0},
|
|
|
{x=93, y=518, w=22, h=31, dx=462, dy=0},
|
|
|
{}
|
|
|
};
|
|
|
};
|
|
|
{
|
|
|
type="anim",
|
|
|
image=get_sprite('images/endings/tower_left_frames.png'),
|
|
|
x = dx * scale,
|
|
|
y = dy * scale,
|
|
|
w = 960 * scale,
|
|
|
h = 600 * scale,
|
|
|
frames=6,
|
|
|
delay=500,
|
|
|
frame_data = {
|
|
|
{};
|
|
|
{x=0, y=318, w=51, h=16, dx=444, dy=246};
|
|
|
{x=0, y=276, w=51, h=42, dx=444, dy=246};
|
|
|
{x=0, y=202, w=51, h=74, dx=444, dy=246};
|
|
|
{x=0, y=108, w=51, h=94, dx=444, dy=246};
|
|
|
{x=0, y=0, w=51, h=108, dx=444, dy=246};
|
|
|
};
|
|
|
};
|
|
|
}, true);
|
|
|
|
|
|
timer:set(25);
|
|
|
end;
|
|
|
onexit = function(s)
|
|
|
fading.enabled = false;
|
|
|
end;
|
|
|
pic = 'images/tower_level_4_room_2_light.png';
|
|
|
decor = translate("ending_locale", 'true_solarscale_leaving');
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), 'ending_dissolving_tower_solarscale_alt'};
|
|
|
};
|
|
|
}
|
|
|
|
|
|
room {
|
|
|
nam = 'ending_dissolving_tower_solarscale_alt';
|
|
|
notitle = true;
|
|
|
nofollow = true;
|
|
|
theme = 'ending_outside';
|
|
|
noinv = true;
|
|
|
notitle = true;
|
|
|
nosave = true;
|
|
|
noautosave = true;
|
|
|
disp = translate("ending_locale", 'game_end');
|
|
|
themeInit = function(s)
|
|
|
local scale = diretheme.get_scale();
|
|
|
local width, height = diretheme.get_scaled_screen();
|
|
|
local dx = math.floor((width - 960) / 2);
|
|
|
local dy = math.floor((height - 600) / 2);
|
|
|
|
|
|
if dx < 0 then
|
|
|
dx = 0;
|
|
|
end;
|
|
|
|
|
|
if dy < 0 then
|
|
|
dy = height - 600;
|
|
|
end;
|
|
|
|
|
|
show_ending('main', 'images/endings/crater_edge/tower_solarscale.png', 1);
|
|
|
animation_set({
|
|
|
{type="delay", delay=2000};
|
|
|
{
|
|
|
type="anim",
|
|
|
image=get_sprite('images/endings/crater_edge/tower_animation.png'),
|
|
|
x = (dx + 445) * scale,
|
|
|
y = (dy + 311) * scale,
|
|
|
w = 40 * scale,
|
|
|
h = 94 * scale,
|
|
|
frames = 14,
|
|
|
delay = 150,
|
|
|
};
|
|
|
}, true);
|
|
|
timer:set(25);
|
|
|
end;
|
|
|
dsc = translate("ending_locale", 'ending_dissolving_tower_solarscale_alt');
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), 'ending_solarscale_flies_away'};
|
|
|
};
|
|
|
};
|
|
|
|
|
|
room {
|
|
|
nam = 'ending_solarscale_flies_away';
|
|
|
notitle = true;
|
|
|
nofollow = true;
|
|
|
theme = 'ending_outside';
|
|
|
noinv = true;
|
|
|
notitle = true;
|
|
|
nosave = true;
|
|
|
noautosave = true;
|
|
|
disp = translate("ending_locale", 'game_end');
|
|
|
themeInit = function(s)
|
|
|
local scale = diretheme.get_scale();
|
|
|
local width, height = diretheme.get_scaled_screen();
|
|
|
local dx = math.floor((width - 960) / 2);
|
|
|
local dy = math.floor((height - 600) / 2);
|
|
|
|
|
|
if dx < 0 then
|
|
|
dx = 0;
|
|
|
end;
|
|
|
|
|
|
if dy < 0 then
|
|
|
dy = height - 600;
|
|
|
end;
|
|
|
|
|
|
show_ending('main', 'images/endings/crater_edge/solarscale.png', 1);
|
|
|
animation_set({
|
|
|
{type="delay", delay=2000};
|
|
|
{
|
|
|
type="image",
|
|
|
image=get_sprite('images/endings/crater_edge/crater_edge_no_tower.png'),
|
|
|
x = dx * scale,
|
|
|
y = dy * scale,
|
|
|
w = 960 * scale,
|
|
|
h = 600 * scale,
|
|
|
background = true
|
|
|
};
|
|
|
{
|
|
|
type="anim",
|
|
|
image=get_sprite("images/endings/crater_edge/solarscale_frames.png");
|
|
|
x = dx * scale,
|
|
|
y = dy * scale,
|
|
|
w = 960 * scale,
|
|
|
h = 600 * scale,
|
|
|
frames = 28,
|
|
|
delay = 125,
|
|
|
background = true,
|
|
|
frame_data = {
|
|
|
--fx, fy, w, h, dx, dy
|
|
|
{x=653, y=0, w=154, h=384, dx=0, dy=216};
|
|
|
{x=494, y=658, w=226, h=400, dx=0, dy=200};
|
|
|
{x=0, y=658, w=494, h=406, dx=0, dy=194};
|
|
|
{x=0, y=0, w=653, h=280, dx=0, dy=290};
|
|
|
{x=0, y=280, w=647, h=378, dx=0, dy=222};
|
|
|
{x=0, y=1064, w=481, h=280, dx=89, dy=320};
|
|
|
{x=481, y=1064, w=299, h=239, dx=226, dy=361};
|
|
|
{x=365, y=1344, w=326, h=214, dx=241, dy=386};
|
|
|
{x=0, y=1344, w=365, h=228, dx=270, dy=372};
|
|
|
{x=365, y=1558, w=209, h=119, dx=354, dy=397};
|
|
|
{x=0, y=1572, w=155, h=103, dx=407, dy=395};
|
|
|
{x=653, y=472, w=119, h=54, dx=427, dy=389};
|
|
|
{x=653, y=384, w=136, h=88, dx=457, dy=339};
|
|
|
{x=653, y=526, w=71, h=41, dx=520, dy=253};
|
|
|
{x=789, y=397, w=15, h=27, dx=583, dy=210};
|
|
|
{x=724, y=526, w=25, h=18, dx=609, dy=168};
|
|
|
{x=789, y=424, w=12, h=7, dx=627, dy=133};
|
|
|
{x=647, y=280, w=5, h=2, dx=664, dy=81};
|
|
|
{x=772, y=472, w=32, h=35, dx=666, dy=47};
|
|
|
{x=647, y=282, w=3, h=3, dx=665, dy=80};
|
|
|
{x=690, y=567, w=20, h=37, dx=659, dy=73};
|
|
|
{x=653, y=567, w=37, h=27, dx=650, dy=68};
|
|
|
{x=653, y=594, w=27, h=25, dx=654, dy=69};
|
|
|
{x=789, y=384, w=17, h=13, dx=658, dy=75};
|
|
|
{x=789, y=431, w=11, h=11, dx=661, dy=76};
|
|
|
{x=800, y=431, w=7, h=7, dx=663, dy=78};
|
|
|
{x=650, y=282, w=1, h=1, dx=666, dy=81};
|
|
|
{};
|
|
|
};
|
|
|
};
|
|
|
}, true);
|
|
|
end;
|
|
|
dsc = translate("ending_locale", 'true_solarscale_outside_part_2');
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), 'ending_welcome'};
|
|
|
};
|
|
|
}
|
|
|
|
|
|
ending_room {
|
|
|
nam = 'ending_welcome';
|
|
|
theme = 'ending_inside';
|
|
|
themeInit = function(s)
|
|
|
local scale = diretheme.get_scale();
|
|
|
local uwidth, uheight = diretheme.get_screen();
|
|
|
local width, height = diretheme.get_scaled_screen();
|
|
|
local pic_dx = math.floor((width - 960) / 2);
|
|
|
local pic_dy = math.floor((height - 600) / 2);
|
|
|
local dx = 0;
|
|
|
local dy = 0;
|
|
|
if width > 960 then
|
|
|
dx = math.floor((width - 960) / 2);
|
|
|
width = 960;
|
|
|
pic_dx = 0;
|
|
|
end;
|
|
|
if height > 600 then
|
|
|
dy = math.floor((height - 600) / 2);
|
|
|
height = 600;
|
|
|
pic_dy = 0;
|
|
|
end;
|
|
|
|
|
|
local src, dst, newsrc;
|
|
|
if solarscale_stays then
|
|
|
src = sprite.new('images/endings/pre_space_1_solarscale.png');
|
|
|
dst = sprite.new('images/endings/pre_space_2_solarscale.png');
|
|
|
else
|
|
|
src = sprite.new('images/endings/pre_space_1.png');
|
|
|
dst = sprite.new('images/endings/pre_space_2.png');
|
|
|
end;
|
|
|
newsrc = sprite.new(width, height);
|
|
|
src:copy(-pic_dx, -pic_dy, width, height, newsrc, 0, 0);
|
|
|
|
|
|
local alpha = 1;
|
|
|
local part = 0;
|
|
|
local partcount = 10;
|
|
|
local partheight = math.floor(600 / partcount);
|
|
|
local parts = {};
|
|
|
|
|
|
for i = 1, partcount do
|
|
|
parts[i] = sprite.new(width, partheight);
|
|
|
dst:copy(-pic_dx, (i - 1) * partheight, width, partheight, parts[i], 0, 0);
|
|
|
end;
|
|
|
|
|
|
local process = function(s)
|
|
|
src:copy(-pic_dx, part * partheight, width, partheight, newsrc, 0, pic_dy + part * partheight);
|
|
|
|
|
|
if alpha < 255 then
|
|
|
dst:draw(-pic_dx, part * partheight, width, partheight, newsrc, 0, pic_dy + part * partheight, alpha);
|
|
|
else
|
|
|
dst:copy(-pic_dx, part * partheight, width, partheight, newsrc, 0, pic_dy + part * partheight);
|
|
|
end;
|
|
|
|
|
|
part = part + 1
|
|
|
if part >= partcount then
|
|
|
part = 0
|
|
|
alpha = alpha + 2
|
|
|
if alpha > 255 then
|
|
|
s.process = nil
|
|
|
-- TODO End
|
|
|
end;
|
|
|
|
|
|
if scale ~= 1 then
|
|
|
s.sprite = newsrc:scale(scale, scale, false);
|
|
|
else
|
|
|
newsrc:copy(s.sprite, 0, 0);
|
|
|
end;
|
|
|
|
|
|
return false;
|
|
|
end;
|
|
|
|
|
|
return true;
|
|
|
end;
|
|
|
|
|
|
if solarscale_stays then
|
|
|
show_ending('tower', 'images/endings/pre_space_1_solarscale.png');
|
|
|
else
|
|
|
show_ending('tower', 'images/endings/pre_space_1.png');
|
|
|
end;
|
|
|
local spr
|
|
|
if scale ~= 1 then
|
|
|
spr = newsrc:scale(scale, scale, false);
|
|
|
else
|
|
|
spr = newsrc:dup();
|
|
|
end;
|
|
|
|
|
|
animation_set({
|
|
|
{type="image", image=spr, x=dx * scale, y=dy * scale, w=width * scale, h=height * scale, process=process, delay=25, background=true};
|
|
|
});
|
|
|
spr = nil; -- remove reference
|
|
|
timer:set(25);
|
|
|
end;
|
|
|
dsc = translate("ending_locale", 'ending_welcome');
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), function(s)
|
|
|
if solarscale_stays then
|
|
|
return 'ending_solarscale_flight';
|
|
|
else
|
|
|
return 'ending_space_1';
|
|
|
end;
|
|
|
end};
|
|
|
};
|
|
|
};
|
|
|
|
|
|
ending_room {
|
|
|
nam = 'ending_solarscale_flight';
|
|
|
theme = 'ending_inside';
|
|
|
themeInit = function(s)
|
|
|
local scale = diretheme.get_scale();
|
|
|
local width, height = diretheme.get_scaled_screen();
|
|
|
local dx = math.floor((width - 960) / 2);
|
|
|
local dy = math.floor((height - 600) / 2);
|
|
|
|
|
|
show_ending('tower', 'images/endings/solarscale/solarscale_first.png');
|
|
|
animation_set({
|
|
|
{type="delay", delay=2000};
|
|
|
{
|
|
|
type="image",
|
|
|
image="images/endings/solarscale/solarscale_bg.png",
|
|
|
x = dx * scale,
|
|
|
y = dy * scale,
|
|
|
w = 960 * scale,
|
|
|
h = 600 * scale,
|
|
|
background = true
|
|
|
},
|
|
|
{
|
|
|
type="anim",
|
|
|
image=get_sprite("images/endings/solarscale/solarscale_frames.png"),
|
|
|
x = dx * scale,
|
|
|
y = dy * scale,
|
|
|
w = 960 * scale,
|
|
|
h = 600 * scale,
|
|
|
frames = 70,
|
|
|
delay={
|
|
|
150, 150, 150, 150, 150,
|
|
|
150, 150, 150, 150, 150,
|
|
|
150, 150, 150, 150, 150,
|
|
|
150, 150, 150, 150, 150,
|
|
|
150, 150, 150, 150, 150,
|
|
|
150, 150, 150, 200, 100,
|
|
|
100, 200, 200, 250, 250,
|
|
|
150, 150, 150, 200, 150,
|
|
|
150, 200, 200, 200, 200,
|
|
|
200, 200, 150, 150, 100,
|
|
|
100, 100, 100, 100, 100,
|
|
|
100, 100, 100, 100, 100,
|
|
|
100, 100, 100, 100, 100,
|
|
|
150, 150, 150, 150, 150,
|
|
|
},
|
|
|
frame_data = {
|
|
|
{x=1106, y=1385, w=592, h=454, dx=368, dy=146},
|
|
|
{x=0 , y=2294, w=592, h=453, dx=368, dy=147},
|
|
|
{x=3037, y=924 , w=558, h=459, dx=402, dy=141},
|
|
|
{x=592 , y=1840, w=479, h=449, dx=481, dy=151},
|
|
|
{x=4181, y=0 , w=485, h=459, dx=475, dy=141},
|
|
|
{x=4107, y=3124, w=571, h=342, dx=373, dy=258},
|
|
|
{x=0 , y=3199, w=840, h=311, dx=120, dy=289},
|
|
|
{x=2226, y=3194, w=667, h=329, dx=253, dy=271},
|
|
|
{x=2795, y=2747, w=588, h=408, dx=372, dy=192},
|
|
|
{x=3383, y=3124, w=724, h=348, dx=192, dy=243},
|
|
|
{x=840 , y=3199, w=606, h=288, dx=215, dy=287},
|
|
|
{x=548 , y=719 , w=186, h=188, dx=439, dy=88},
|
|
|
{x=1692, y=3335, w=220, h=81 , dx=573, dy=34},
|
|
|
{x=355 , y=1656, w=104, h=161, dx=788, dy=121},
|
|
|
{x=355 , y=1424, w=152, h=232, dx=616, dy=199},
|
|
|
{x=1446, y=3335, w=246, h=134, dx=349, dy=330},
|
|
|
{x=548 , y=504 , w=296, h=215, dx=43 , dy=248},
|
|
|
{x=1500, y=2881, w=183, h=94 , dx=122, dy=68},
|
|
|
{x=1500, y=2747, w=164, h=134, dx=343, dy=69},
|
|
|
{x=1446, y=3199, w=259, h=136, dx=392, dy=178},
|
|
|
{x=0 , y=1424, w=355, h=338, dx=366, dy=53},
|
|
|
{x=0 , y=0 , w=845, h=504, dx=115, dy=96},
|
|
|
{x=3383, y=2747, w=615, h=377, dx=345, dy=223},
|
|
|
{x=3998, y=2747, w=599, h=375, dx=361, dy=225},
|
|
|
{x=2226, y=2747, w=569, h=447, dx=391, dy=153},
|
|
|
{x=519 , y=1385, w=587, h=455, dx=373, dy=145},
|
|
|
{x=1698, y=1385, w=592, h=454, dx=368, dy=146},
|
|
|
{x=1106, y=1839, w=592, h=454, dx=368, dy=146},
|
|
|
{x=1698, y=1839, w=592, h=454, dx=368, dy=146},
|
|
|
{x=2630, y=1383, w=467, h=457, dx=414, dy=143},
|
|
|
{x=0 , y=2747, w=469, h=452, dx=433, dy=148},
|
|
|
{x=548 , y=926 , w=521, h=459, dx=355, dy=141},
|
|
|
{x=4156, y=1839, w=521, h=453, dx=355, dy=147},
|
|
|
{x=3313, y=2294, w=533, h=453, dx=367, dy=147},
|
|
|
{x=3846, y=2294, w=533, h=453, dx=367, dy=147},
|
|
|
{x=4138, y=1383, w=531, h=453, dx=370, dy=147},
|
|
|
{x=2779, y=2294, w=534, h=453, dx=370, dy=147},
|
|
|
{x=1705, y=2293, w=537, h=453, dx=370, dy=147},
|
|
|
{x=2242, y=2294, w=537, h=453, dx=370, dy=147},
|
|
|
{x=1705, y=2746, w=521, h=453, dx=355, dy=147},
|
|
|
{x=2111, y=926 , w=519, h=459, dx=357, dy=141},
|
|
|
{x=0 , y=965 , w=519, h=459, dx=357, dy=141},
|
|
|
{x=4150, y=924 , w=516, h=459, dx=360, dy=141},
|
|
|
{x=1184, y=2293, w=521, h=454, dx=354, dy=146},
|
|
|
{x=4133, y=463 , w=519, h=459, dx=357, dy=141},
|
|
|
{x=1069, y=926 , w=521, h=459, dx=356, dy=141},
|
|
|
{x=1590, y=926 , w=521, h=459, dx=356, dy=141},
|
|
|
{x=469 , y=2747, w=469, h=452, dx=433, dy=148},
|
|
|
{x=3097, y=1383, w=467, h=457, dx=414, dy=143},
|
|
|
{x=845 , y=0 , w=560, h=463, dx=352, dy=137},
|
|
|
{x=1405, y=0 , w=560, h=463, dx=352, dy=137},
|
|
|
{x=1965, y=0 , w=560, h=463, dx=352, dy=137},
|
|
|
{x=2525, y=0 , w=560, h=463, dx=352, dy=137},
|
|
|
{x=3085, y=0 , w=548, h=463, dx=366, dy=137},
|
|
|
{x=3633, y=0 , w=548, h=463, dx=366, dy=137},
|
|
|
{x=845 , y=463 , w=548, h=463, dx=366, dy=137},
|
|
|
{x=1393, y=463 , w=548, h=463, dx=366, dy=137},
|
|
|
{x=3037, y=463 , w=548, h=461, dx=366, dy=139},
|
|
|
{x=3585, y=463 , w=548, h=461, dx=366, dy=139},
|
|
|
{x=0 , y=504 , w=548, h=461, dx=366, dy=139},
|
|
|
{x=1941, y=463 , w=548, h=463, dx=366, dy=137},
|
|
|
{x=2489, y=463 , w=548, h=463, dx=366, dy=137},
|
|
|
{x=3595, y=924 , w=555, h=459, dx=370, dy=141},
|
|
|
{x=3564, y=1383, w=574, h=456, dx=365, dy=144},
|
|
|
{x=938 , y=2747, w=562, h=451, dx=377, dy=149},
|
|
|
{x=3564, y=1839, w=592, h=454, dx=368, dy=146},
|
|
|
{x=2290, y=1840, w=592, h=454, dx=368, dy=146},
|
|
|
{x=2882, y=1840, w=592, h=454, dx=368, dy=146},
|
|
|
{x=0 , y=1840, w=592, h=454, dx=368, dy=146},
|
|
|
{x=592 , y=2293, w=592, h=454, dx=368, dy=146}
|
|
|
}
|
|
|
};
|
|
|
});
|
|
|
timer:set(25);
|
|
|
end;
|
|
|
dsc = translate("ending_locale", 'ending_solarscale_flight');
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), 'ending_space_1'};
|
|
|
};
|
|
|
}
|
|
|
|
|
|
ending_room {
|
|
|
nam = 'ending_space_1';
|
|
|
theme = 'ending_inside';
|
|
|
themeInit = function(s)
|
|
|
if solarscale_stays then
|
|
|
show_ending('tower', 'images/endings/solarscale/solarscale_first.png');
|
|
|
else
|
|
|
show_ending('tower', 'images/endings/space.png');
|
|
|
end;
|
|
|
animation_set(false);
|
|
|
end;
|
|
|
dsc = function(s)
|
|
|
if solarscale_stays then
|
|
|
pr(translate_now("ending_locale", 'true_step_1_solarscale'));
|
|
|
else
|
|
|
pr(translate_now("ending_locale", 'true_step_1_alone'));
|
|
|
end;
|
|
|
pn();
|
|
|
pr(translate_now("ending_locale", 'true_step_1'));
|
|
|
end;
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), function(s)
|
|
|
if irradiated then
|
|
|
return 'ending_space_2_irradiated';
|
|
|
else
|
|
|
return 'ending_space_2';
|
|
|
end;
|
|
|
end};
|
|
|
}
|
|
|
};
|
|
|
|
|
|
room {
|
|
|
nam = 'ending_space_2';
|
|
|
disp = translate("ending_locale", 'game_end');
|
|
|
noinv = true;
|
|
|
notitle = true;
|
|
|
nofollow = true;
|
|
|
nosave = true;
|
|
|
noautosave = true;
|
|
|
theme = 'ending_inside';
|
|
|
themeInit = function(s)
|
|
|
if solarscale_stays then
|
|
|
show_ending('tower', 'images/endings/solarscale/solarscale_first.png');
|
|
|
else
|
|
|
show_ending('tower', 'images/endings/space.png');
|
|
|
end;
|
|
|
timer:set(25);
|
|
|
end;
|
|
|
dsc = function(s)
|
|
|
if solarscale_stays then
|
|
|
return translate_now("ending_locale", 'true_step_2_solarscale');
|
|
|
else
|
|
|
return translate_now("ending_locale", 'true_step_2_alone');
|
|
|
end;
|
|
|
end;
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), function(s)
|
|
|
if solarscale_stays then
|
|
|
_'ending_credits'.etype = 'main_solarscale';
|
|
|
else
|
|
|
_'ending_credits'.etype = 'main';
|
|
|
end;
|
|
|
return 'ending_credits';
|
|
|
end};
|
|
|
};
|
|
|
};
|
|
|
|
|
|
room {
|
|
|
nam = 'ending_space_2_irradiated';
|
|
|
disp = translate("ending_locale", 'game_end');
|
|
|
noinv = true;
|
|
|
notitle = true;
|
|
|
nofollow = true;
|
|
|
nosave = true;
|
|
|
noautosave = true;
|
|
|
theme = 'ending_inside_bw';
|
|
|
themeInit = function(s)
|
|
|
show_ending('bwt', 'images/endings/space_bw.png');
|
|
|
end;
|
|
|
dsc = translate("ending_locale", 'true_step_2_irradiated');
|
|
|
way = {
|
|
|
path {translate("common_locale", 'continue'), function(s)
|
|
|
_'ending_credits'.etype = 'bwm';
|
|
|
return 'ending_credits';
|
|
|
end};
|
|
|
};
|
|
|
};
|
|
|
|
|
|
room {
|
|
|
nam = 'ending_credits';
|
|
|
disp = translate("ending_locale", 'thank_you_for_playing');
|
|
|
noinv = true;
|
|
|
nofollow = true;
|
|
|
nosave = true;
|
|
|
noautosave = true;
|
|
|
etype = false; -- main, mbw, left, leftbw, format, formatbw
|
|
|
theme = function(s)
|
|
|
if s.etype == 'main' or s.etype == 'main_solarscale' then
|
|
|
return 'credits_inside';
|
|
|
elseif s.etype == 'bwm' then
|
|
|
return 'credits_inside_bw';
|
|
|
elseif s.etype == 'left' or s.etype == 'format' then
|
|
|
return 'credits_outside';
|
|
|
elseif s.etype == 'leftbw' or s.etype == 'formatbw' then
|
|
|
return 'credits_outside_bw';
|
|
|
else
|
|
|
error('Unexpected ending');
|
|
|
end;
|
|
|
end;
|
|
|
themeInit = function(s)
|
|
|
if s.etype == 'main' then
|
|
|
show_ending('tower', 'images/endings/space_credits.png', 0, true);
|
|
|
elseif s.etype == 'main_solarscale' then
|
|
|
show_ending('bwt', 'images/endings/solarscale_credits.png', 0, true);
|
|
|
elseif s.etype == 'bwm' then
|
|
|
show_ending('bwt', 'images/endings/space_bw.png', 0, true);
|
|
|
elseif s.etype == 'left' then
|
|
|
show_ending('main', 'images/endings/tower_left_credits.png', 0, true);
|
|
|
elseif s.etype == 'format' then
|
|
|
show_ending('main', 'images/endings/tower_ruin_credits.png', 0, true);
|
|
|
elseif s.etype == 'leftbw' then
|
|
|
show_ending('bwm', 'images/endings/tower_left_bw_credits.png', 0, true);
|
|
|
elseif s.etype == 'formatbw' then
|
|
|
show_ending('bwm', 'images/endings/tower_ruin_bw_credits.png', 0, true);
|
|
|
else
|
|
|
error('Unexpected ending');
|
|
|
end;
|
|
|
timer:set(25);
|
|
|
|
|
|
if s.etype == 'main' and not irradiated then
|
|
|
prefs.completed = true;
|
|
|
end;
|
|
|
fmt.para = false;
|
|
|
end;
|
|
|
themeDispose = function(s)
|
|
|
fmt.para = true;
|
|
|
end;
|
|
|
decor = function(s)
|
|
|
return translate_now("menu_locale", 'credits_author') .. ': Khaelenmore Thaal^' ..
|
|
|
translate_now("menu_locale", 'credits_art') .. ': Sabra Naikomy^' ..
|
|
|
translate_now("menu_locale", 'credits_music') .. ': Khaelenmore Thaal^' ..
|
|
|
translate_now("menu_locale", 'credits_engine') .. ': INSTEAD ' .. translate_now("menu_locale", 'credits_engine_author') .. ' {$link https://github.com/instead-hub/instead/}^' ..
|
|
|
translate_now("menu_locale", 'credits_sounds') .. ': {$link https://freesound.org/} CC-0^' ..
|
|
|
translate_now("menu_locale", 'credits_fonts') .. ': VileR {$link https://int10h.org/oldschool-pc-fonts/} CC-BY-SA 4.0^^' ..
|
|
|
translate_now("menu_locale", 'credits_closed_beta') .. ': ' .. closed_beta_participants.. '^^'..
|
|
|
translate_now("menu_locale", 'credits_thanks');
|
|
|
end;
|
|
|
way = {
|
|
|
path {translate("ending_locale", 'show_menu'), 'reset'};
|
|
|
};
|
|
|
}
|
|
|
|
|
|
room {
|
|
|
nam = 'reset';
|
|
|
onenter = function(s)
|
|
|
std.gamefile('main3.lua', true);
|
|
|
return false;
|
|
|
end;
|
|
|
};
|
|
\ No newline at end of file
|