update vctest & add new test

This commit is contained in:
MihailRis
2024-12-18 05:16:06 +03:00
parent d745a34657
commit a144dd75b7
5 changed files with 39 additions and 31 deletions
+27
View File
@@ -0,0 +1,27 @@
test.set_setting("chunks.load-distance", 3)
test.set_setting("chunks.load-speed", 1)
test.reconfig_packs({"base"}, {})
test.new_world("demo", "2019", "core:default")
local pid1 = player.create("Xerxes")
assert(player.get_name(pid1) == "Xerxes")
local pid2 = player.create("Segfault")
assert(player.get_name(pid2) == "Segfault")
local seed = math.floor(math.random() * 1e6)
print("random seed", seed)
math.randomseed(seed)
for i=1,25 do
if i % 5 == 0 then
print(tostring(i*4).." % done")
print("chunks loaded", world.count_chunks())
end
player.set_pos(pid1, math.random() * 100 - 50, 100, math.random() * 100 - 50)
player.set_pos(pid2, math.random() * 200 - 100, 100, math.random() * 200 - 100)
test.tick()
end
test.close_world(true)