changes
This commit is contained in:
@@ -80,8 +80,8 @@ NilIsZero={
|
|||||||
end }
|
end }
|
||||||
|
|
||||||
function MakeMap()
|
function MakeMap()
|
||||||
local rad=2
|
local rad=6
|
||||||
for x=-rad,rad do for y=-rad,rad do
|
for x=-rad,rad do for y=-rad,rad do if math.random(1,5)==1 then
|
||||||
t={class='army',x=x,y=y,z=0,plane='main',graphic='army'}
|
t={class='army',x=x,y=y,z=0,plane='main',graphic='army'}
|
||||||
print("Building an army:")
|
print("Building an army:")
|
||||||
pprint(t)
|
pprint(t)
|
||||||
@@ -94,7 +94,7 @@ function MakeMap()
|
|||||||
end end
|
end end
|
||||||
print("Here's what was built:")
|
print("Here's what was built:")
|
||||||
pprint(nt)
|
pprint(nt)
|
||||||
end end
|
end end end
|
||||||
end
|
end
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -217,7 +217,7 @@ function seq(a,b,c) return a<=b and b<=c or false end
|
|||||||
function num2(a) if a<=9 then return " "..a else return a end end
|
function num2(a) if a<=9 then return " "..a else return a end end
|
||||||
|
|
||||||
function player.cb_map(actor,place,dialog)
|
function player.cb_map(actor,place,dialog)
|
||||||
local rad=1
|
local rad=4
|
||||||
scratch={}
|
scratch={}
|
||||||
local lis=tangible.near(actor,1.5*rad,true,false)
|
local lis=tangible.near(actor,1.5*rad,true,false)
|
||||||
print("\27[38;5;9mMap:\27[0m")
|
print("\27[38;5;9mMap:\27[0m")
|
||||||
|
|||||||
@@ -3,16 +3,15 @@ makeclass('login')
|
|||||||
function login.interface(actor, place)
|
function login.interface(actor, place)
|
||||||
gui.menu_item("cb_becomeplayer", "Become a Player")
|
gui.menu_item("cb_becomeplayer", "Become a Player")
|
||||||
gui.menu_item("cb_p123", "Print 1, 2, 3")
|
gui.menu_item("cb_p123", "Print 1, 2, 3")
|
||||||
end
|
end
|
||||||
|
|
||||||
function login.cb_becomeplayer(actor, place, dialog)
|
function login.cb_becomeplayer(actor, place, dialog)
|
||||||
actor.kind='P'
|
actor.kind='P'
|
||||||
actor.Count={}
|
actor.Count={}
|
||||||
actor.Count.Foobar=42
|
|
||||||
setmetatable(actor.Count,NilIsZero)
|
setmetatable(actor.Count,NilIsZero)
|
||||||
tangible.setclass(actor, player)
|
tangible.setclass(actor, player)
|
||||||
tangible.animate(actor,{action="warp",plane="main",x=0,y=0,z=0})
|
tangible.animate(actor,{action="warp",plane="main",x=0,y=0,z=0})
|
||||||
end
|
end
|
||||||
|
|
||||||
function login.cb_p123(actor, place, dialog)
|
function login.cb_p123(actor, place, dialog)
|
||||||
print(1)
|
print(1)
|
||||||
@@ -20,14 +19,14 @@ function login.cb_p123(actor, place, dialog)
|
|||||||
print(2)
|
print(2)
|
||||||
wait(1)
|
wait(1)
|
||||||
print(3)
|
print(3)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- this is function documentation for setfoo.
|
-- this is function documentation for setfoo.
|
||||||
function setfoo(n)
|
function setfoo(n)
|
||||||
tangible.nopredict()
|
tangible.nopredict()
|
||||||
tangible.actor().inventory.foo = n
|
tangible.actor().inventory.foo = n
|
||||||
end
|
end
|
||||||
|
|
||||||
function buildq()
|
function buildq()
|
||||||
return tangible.build{class="login", x=10, y=0, z=0, plane="nowhere", graphic="what"}
|
return tangible.build{class="login", x=10, y=0, z=0, plane="nowhere", graphic="what"}
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user