58 lines
1.3 KiB
Lua
58 lines
1.3 KiB
Lua
function room_scene(self) return true; end
|
|
|
|
function par(space,...)
|
|
local i, res
|
|
local a = {...};
|
|
for i = 1, stead.table.maxn(a) do
|
|
if type(a[i]) == 'string' then
|
|
if res == nil then res = "" end
|
|
res = res..a[i];
|
|
end
|
|
end
|
|
return res;
|
|
end
|
|
stead.par = par
|
|
|
|
word_simple = function(word)
|
|
return obj{
|
|
nam = '',
|
|
_word = word,
|
|
_enabled = true,
|
|
dsc = function(this)
|
|
value = ""
|
|
if (this._enabled == true) then
|
|
value = this._word
|
|
else
|
|
value = string.rep("█",string.len(this._word)/2)
|
|
end
|
|
return "{".. value .."}"
|
|
end,
|
|
act = function(this)
|
|
this._enabled = not this._enabled
|
|
return true
|
|
end
|
|
}
|
|
end
|
|
sentence = function(...)
|
|
value = obj{
|
|
nam = '',
|
|
dsc = '',
|
|
obj = {}
|
|
}
|
|
size = table.maxn(arg)
|
|
for i,v in ipairs(arg) do
|
|
if (i > 1 and v ~= 'comma' and v ~= 'question' and v ~= 'colon' and v ~= 'dot' and v ~= 'exclamation' and v ~= 'space') then table.insert(value.obj,'space') end
|
|
table.insert(value.obj,v)
|
|
if (i == size) then table.insert(value.obj,'space') end
|
|
end
|
|
return value
|
|
end
|
|
newline = vobj("^^", "^^")
|
|
space = vobj(" ", " ")
|
|
dash = vobj("--", "--")
|
|
comma = vobj(",", ",")
|
|
dot = vobj(".", ".")
|
|
exclamation = vobj("!", "!")
|
|
question = vobj("?", "?")
|
|
colon = vobj(":", ":")
|
|
signed = vobj(" ", txtr("Проверено: цензор ███████████^^")) |