update API
This commit is contained in:
parent
40a5f88f22
commit
301b3155e6
19
gui.lua
19
gui.lua
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue