Boats, carts mods: Use 'initial_properties' table
authorParamat <paramat@users.noreply.github.com>
Sun, 29 Jul 2018 23:32:18 +0000 (00:32 +0100)
committerGitHub <noreply@github.com>
Sun, 29 Jul 2018 23:32:18 +0000 (00:32 +0100)
mods/boats/init.lua
mods/carts/cart_entity.lua

index c6d0e2918474e64ae2729aa7c1e2f4f7c4e68d0c..00cf7918d473c577e57dac75308b3e00dfa30691 100644 (file)
@@ -33,13 +33,15 @@ end
 --
 
 local boat = {
-       physical = true,
-       -- Warning: Do not change the position of the collisionbox top surface,
-       -- lowering it causes the boat to fall through the world if underwater
-       collisionbox = {-0.5, -0.35, -0.5, 0.5, 0.3, 0.5},
-       visual = "mesh",
-       mesh = "boats_boat.obj",
-       textures = {"default_wood.png"},
+       initial_properties = {
+               physical = true,
+               -- Warning: Do not change the position of the collisionbox top surface,
+               -- lowering it causes the boat to fall through the world if underwater
+               collisionbox = {-0.5, -0.35, -0.5, 0.5, 0.3, 0.5},
+               visual = "mesh",
+               mesh = "boats_boat.obj",
+               textures = {"default_wood.png"},
+       },
 
        driver = nil,
        v = 0,
index 38337dbcb9898685c6c00fc498914337a4797b08..855450da29089cdf53583cc8c935a9c7e9a269e8 100644 (file)
@@ -1,10 +1,12 @@
 local cart_entity = {
-       physical = false, -- otherwise going uphill breaks
-       collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
-       visual = "mesh",
-       mesh = "carts_cart.b3d",
-       visual_size = {x=1, y=1},
-       textures = {"carts_cart.png"},
+       initial_properties = {
+               physical = false, -- otherwise going uphill breaks
+               collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
+               visual = "mesh",
+               mesh = "carts_cart.b3d",
+               visual_size = {x=1, y=1},
+               textures = {"carts_cart.png"},
+       },
 
        driver = nil,
        punched = false, -- used to re-send velocity and position