add player.create, test.set_setting, test.sleep_until, world.count_chunks

This commit is contained in:
MihailRis
2024-12-12 15:54:56 +03:00
parent 8a5042f2a2
commit 9ec8788838
10 changed files with 84 additions and 34 deletions
+12 -1
View File
@@ -1 +1,12 @@
print("hello world")
test.set_setting("chunks.load-distance", 2)
test.set_setting("chunks.load-speed", 16)
test.new_world("demo", "2019", "core:default")
local pid = player.create("Xerxes")
assert(player.get_name(pid) == "Xerxes")
test.sleep_until(function() return world.count_chunks() >= 9 end, 1000)
print(world.count_chunks())
assert(block.get(0, 0, 0) == block.index("core:obstacle"))
block.destruct(0, 0, 0, pid)
assert(block.get(0, 0, 0) == 0)
test.close_world(true)