убираем ненужный код

This commit is contained in:
Alexander Yakovlev 2020-12-21 17:20:39 +07:00
parent 6a033ee5a8
commit 749d8a58b0
Signed by: oreolek
GPG key ID: 1CDC4B7820C93BD3
2 changed files with 60 additions and 59 deletions

View file

@ -17,7 +17,7 @@ local function istable(t) return type(t) == 'table' end
-- "Ты/вы" в разных падежах: им, род, дат, вин, твор, пред.
function mp.shortcut.you(case)
if case == nil then
if case == nil or case == '' then
case = 'им'
end
if case == 'им' then
@ -26,31 +26,31 @@ function mp.shortcut.you(case)
end
return 'ты'
end
if case == 'род' then
if case == 'род' or case == 'рд' then
if pl.plural then
return 'вас'
end
return 'тебя'
end
if case == 'дат' then
if case == 'дат' or case == 'дт' then
if pl.plural then
return 'вам'
end
return 'тебе'
end
if case == 'вин' then
if case == 'вин' or case == 'вн' then
if pl.plural then
return 'вас'
end
return 'тебя'
end
if case == 'твор' then
if case == 'твор' or case == 'тв' then
if pl.plural then
return 'вами'
end
return 'тобой'
end
if case == 'пред' then
if case == 'пред' or case == 'пр' then
if pl.plural then
return 'вас'
end
@ -93,56 +93,3 @@ function mp.shortcut.g(options)
end
return options[1]
end
game:dict {
["Димидий/мр,C,но,ед"] = {
"Димидий/им",
"Димидий/вн",
"Димидия/рд",
"Димидию/дт",
"Димидием/тв",
"Димидии/пр",
}
}
function game:before_Any(ev, w)
if ev == "Ask" or ev == "Say" or ev == "Tell" or ev == "AskFor" or ev == "AskTo" then
p [[Попробуйте просто поговорить.]];
return
end
return false
end
function mp:pre_input(str)
local a = std.split(str)
if #a <= 1 or #a > 3 then
return str
end
if a[1] == 'в' or a[1] == 'на' or a[1] == 'во' or
a[1] == "к" or a[1] == 'ко' then
return "идти "..str
end
return str
end
Distance = Class {
before_Default = function(s, ev)
if ev == "Exam" or ev == "Look" or ev == "Search" then
return false
end
p ("Но ", s:noun(), " очень далеко.");
end;
}:attr 'scenery'
Furniture = Class {
['before_Push,Pull,Transfer,Take'] = [[Пусть лучше
{#if_hint/#first,plural,стоят,стоит} там, где
{#if_hint/#first,plural,стоят,стоит}.]];
}:attr 'static'
Prop = Class {
before_Default = function(s, ev)
p ("Тебе нет дела до ", s:noun 'рд', ".")
end;
}:attr 'scenery'

54
unused.lua Normal file
View file

@ -0,0 +1,54 @@
-- Примеры кода для метапарсера, пока что не используются.
game:dict {
["Димидий/мр,C,но,ед"] = {
"Димидий/им",
"Димидий/вн",
"Димидия/рд",
"Димидию/дт",
"Димидием/тв",
"Димидии/пр",
}
}
function game:before_Any(ev, w)
if ev == "Ask" or ev == "Say" or ev == "Tell" or ev == "AskFor" or ev == "AskTo" then
p [[Попробуйте просто поговорить.]];
return
end
return false
end
function mp:pre_input(str)
local a = std.split(str)
if #a <= 1 or #a > 3 then
return str
end
if a[1] == 'в' or a[1] == 'на' or a[1] == 'во' or
a[1] == "к" or a[1] == 'ко' then
return "идти "..str
end
return str
end
Distance = Class {
before_Default = function(s, ev)
if ev == "Exam" or ev == "Look" or ev == "Search" then
return false
end
p ("Но ", s:noun(), " очень далеко.");
end;
}:attr 'scenery'
Furniture = Class {
['before_Push,Pull,Transfer,Take'] = [[Пусть лучше
{#if_hint/#first,plural,стоят,стоит} там, где
{#if_hint/#first,plural,стоят,стоит}.]];
}:attr 'static'
Prop = Class {
before_Default = function(s, ev)
p ("Тебе нет дела до ", s:noun 'рд', ".")
end;
}:attr 'scenery'