makeclass('login')

function login.interface(actor, place)
    gui.menu_item("cb_becomeplayer", "Become a Player")
    gui.menu_item("cb_p123", "Print 1, 2, 3")
end

function login.cb_becomeplayer(actor, place, dialog)
    actor.kind='P'
    actor.Count={}
    setmetatable(actor.Count,{jones=5,__index=function(t,k) return 0 end,__newindex=function(t,k,v) if v~=nil and v~=0 then rawset(t,k,v) end end})
    tangible.setclass(actor, player)
    tangible.animate(actor,{action="warp",plane="main",x=0,y=0,z=0})
end

function login.cb_p123(actor, place, dialog)
    print(1)
    wait(1)
    print(2)
    wait(1)
    print(3)
end

-- this is function documentation for setfoo.
function setfoo(n)
    tangible.nopredict()
    tangible.actor().inventory.foo = n
end

function buildq()
    return tangible.build{class="login", x=10, y=0, z=0, plane="nowhere", graphic="what"}
end
