update API

This commit is contained in:
Severak 2019-09-06 23:42:47 +02:00
parent 40a5f88f22
commit 301b3155e6
1 changed files with 16 additions and 3 deletions

19
gui.lua
View File

@ -24,7 +24,7 @@ menu2codes = {}
issued_command = {}
-- constructors
-- API
function verb(def)
def.is_verb = true
@ -45,8 +45,6 @@ function item(def)
return def
end
-- global functions
function cls()
text.value = ""
end
@ -84,6 +82,21 @@ function walk(where, nocls)
show_verbs()
end
function has(what)
return game[what].w=="me"
end
function location_of(what)
return game[what].w
end
function is_here(what)
return game[what].w==game.me.w
end
-- end of API
-- TODO - checkovat všechny parametry
function _has_subj_of(verb)
local parCode = verb.params[#params+1]