This commit is contained in:
2022-03-29 15:47:44 -04:00
parent 945e5fc847
commit 3da06c8226
2 changed files with 9 additions and 10 deletions

View File

@@ -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")

View File

@@ -8,7 +8,6 @@ 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})