1
0
Fork 0
mirror of https://gitlab.com/Oreolek/duel.git synced 2024-04-26 06:09:51 +03:00

Широкая тема для игры

This commit is contained in:
Alexander Yakovlev 2017-03-07 17:54:47 +07:00
parent 1bfc54aab6
commit d877bdefcf
5 changed files with 90 additions and 36 deletions

BIN
images/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View file

@ -1,10 +1,13 @@
room {
nam = 'main',
noinv = true,
disp = 'Ремонтник',
decor = '^^'..fmt.c('{start|Начать игру}')..[[^^
Игра использует код Петра Косых по лицензии MIT (модуль ]]..fmt.em('proxymenu)')..[[^^
F2 - сохранить игру^
F3 - загрузить игру
F3 - загрузить игру^^
Использованные изображения:^
- Feathered от Martuchox -- subtlepatterns.com
]],
obj = {
obj {

View file

@ -145,12 +145,20 @@ room {
obj {
nam = 'chos_house',
disp = 'дом',
take = 'Вы не знаете, как можно '..fmt.em('взять')..' двухэтажный дом.',
act = [[К типовому двухэтажному дому из нанотрубок со временем допечатывали несколько модулей.
Часть второго этажа выглядит совсем новой возможно, её недавно расширили.]],
};
obj {
nam = 'angelina',
disp = 'старушка',
take = 'Старушке это не понравится.',
disp = function()
if not visited('cho_dlg2') then
return 'старушка'
else
return 'Ангелина'
end
end,
act = 'Старушка мирно посапывает, раскачиваясь в гамаке.',
talk = function() return walk('cho_dlg'); end,
}
@ -508,11 +516,17 @@ dlg {
dlg {
nam = 'cho_dlg',
disp = false,
dsc = [[
-- А? Что? Вы… вы ]]..engineer()..[[ из фирмы? Нет, я не сплю.^^
dsc = function(s)
if not visited('cho_dlg2') then
return [[
-- А? Что? Вы… вы ]]..engineer()..[[ из фирмы? Нет, я не сплю.^^
Она встаёт и протирает глаза.
]],
Она встаёт и протирает глаза.
]]
end
s:reset '#разговор'
return [[-- А? Это вы? Извините, я задремала.]]
end,
decor = [[
Старушка внимательно смотрит на вас.
]],
@ -528,7 +542,7 @@ dlg {
'Ангелина. Я вызывала мастера по гарантии.',
next = '#комбайн-начало'
}
},
};
{ '#комбайн-начало',
{
'Что случилось?',
@ -538,7 +552,25 @@ dlg {
fmt.em('Можно посмотреть комбайн?'),
function() return walk('cho_dlg2') end,
};
},
};
{ '#разговор',
{
always = true,
'Вы не могли бы показать мне комбайн ещё раз?',
'Она приводит вас к комбайну. Машина в том же сломанном состоянии. Вы возвращаетесь.'
};
{
'Вы давно здесь живёте?',
'Она пожимает плечами:^^-- Лет тридцать. Начинали всего с одним роботом.'
};
{
fmt.em('Ничего. Доброе утро.'),
function()
pn('-- И вам того же.^^Она закрывает глаза и засыпает.')
return walk('chos_house')
end,
};
}
}
}
@ -628,7 +660,6 @@ dlg {
]],
obj = {{
onempty = function()
char.quests.main = 1
char.quests.kathy = 0
p "Она отворачивается. Видимо, разговор закончен."
walk('chos')

View file

@ -5,25 +5,23 @@ stead.proxy_prefix = '   '
local function proxy_wrap(nam, fwd)
if not fwd then fwd = nam end
return function(s, ...)
local t
local o = _(s.ref)
local act = s.acts or { }
local act = act[nam] or nam
local t
local react
act = act[nam] or nam
local r, v = std.call(std.game, 'before_'..act, o, ...)
t = std.par(std.scene_delim, t or false, r)
if v == false then
return t or r, true
end
if act == 'use' then
if nam == 'use' then
local oo = {...}
oo = oo[1]
if oo:type 'proxy' then
oo = _(oo.ref)
end
r, v = std.call(oo, 'used', o, ...)
r, v = std.call(oo, s.acts.used or 'used', o, ...)
t = std.par(std.scene_delim, t or false, r)
if v == true then
oo['__nr_used'] = (oo['__nr_used'] or 0) + 1
@ -181,35 +179,37 @@ std.menu_player = std.class ({
v.room = 'main'
end
v.invent = std.list {}
return std.player.new(self, v)
return std.player(v)
end;
inventory = function(s)
return s.invent
end;
}, std.player)
function proxy_obj(v)
local vv = {
ref = v.ref;
use_mode = v.use_mode;
sources = v.sources;
acts = v.acts;
}
return std.proxy_obj(vv)
end
function proxy_menu(v)
local vv = {
nam = v.nam;
disp = v.disp;
use_mode = v.use_mode;
sources = v.sources;
acts = v.acts;
}
return std.proxy_menu(vv):close()
end
std.mod_init(function() -- declarations
declare 'proxy_obj' (function(v)
local vv = {
ref = v.ref;
use_mode = v.use_mode;
sources = v.sources;
acts = v.acts;
}
return std.proxy_obj(vv)
end)
declare 'proxy_menu' (function(v)
local vv = {
nam = v.nam;
disp = v.disp;
use_mode = v.use_mode;
sources = v.sources;
acts = v.acts;
}
return std.proxy_menu(vv):close()
end)
declare 'proxy_obj' (proxy_obj)
declare 'proxy_menu' (proxy_menu)
end)
std.mod_step(function()

20
theme.ini Normal file
View file

@ -0,0 +1,20 @@
; $Name:Мягкая$
; $Name(ru):Мягкая$
; $Name(en):Subtle$
scr.gfx.scalable = 2
scr.w = 1024
scr.h = 576
win.y = 8
inv.y = 8
win.w = 800
win.h = 560
inv.x = 860
inv.w = 184
inv.h = 560
inv.col.fg = #555555
inv.col.link = #555555
menu.button.x = 950
menu.button.y = 540
scr.gfx.bg = images/bg.png