rename test library to app & rename app.name to app.script
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
test.set_setting("chunks.load-distance", 3)
|
||||
test.set_setting("chunks.load-speed", 1)
|
||||
app.set_setting("chunks.load-distance", 3)
|
||||
app.set_setting("chunks.load-speed", 1)
|
||||
|
||||
test.reconfig_packs({"base"}, {})
|
||||
test.new_world("demo", "2019", "core:default")
|
||||
app.reconfig_packs({"base"}, {})
|
||||
app.new_world("demo", "2019", "core:default")
|
||||
|
||||
local pid1 = player.create("Xerxes")
|
||||
assert(player.get_name(pid1) == "Xerxes")
|
||||
@@ -21,7 +21,7 @@ for i=1,25 do
|
||||
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()
|
||||
app.tick()
|
||||
end
|
||||
|
||||
test.close_world(true)
|
||||
app.close_world(true)
|
||||
|
||||
+6
-6
@@ -1,23 +1,23 @@
|
||||
-- Create/close/open/close world
|
||||
|
||||
-- Open
|
||||
test.new_world("demo", "2019", "core:default")
|
||||
app.new_world("demo", "2019", "core:default")
|
||||
assert(world.is_open())
|
||||
assert(world.get_generator() == "core:default")
|
||||
test.sleep(1)
|
||||
app.sleep(1)
|
||||
assert(world.get_total_time() > 0.0)
|
||||
print(world.get_total_time())
|
||||
|
||||
-- Close
|
||||
test.close_world(true)
|
||||
app.close_world(true)
|
||||
assert(not world.is_open())
|
||||
|
||||
-- Reopen
|
||||
test.open_world("demo")
|
||||
app.open_world("demo")
|
||||
assert(world.is_open())
|
||||
assert(world.get_total_time() > 0.0)
|
||||
assert(world.get_seed() == 2019)
|
||||
test.tick()
|
||||
app.tick()
|
||||
|
||||
-- Close
|
||||
test.close_world(true)
|
||||
app.close_world(true)
|
||||
|
||||
Reference in New Issue
Block a user