diff options
author | stujones11 <stujones111@gmail.com> | 2016-01-13 19:51:50 +0000 |
---|---|---|
committer | stujones11 <stujones111@gmail.com> | 2016-01-13 21:06:38 +0000 |
commit | 4416e9b8ad399afa9016a9454e2f84926797cbb5 (patch) | |
tree | 26ebd2fc79da9181d26c2dd78cdd32ed7d013381 /railcart | |
parent | 6dfdaf78522a9c92e4323fa5bb77eb3a7c11aa30 (diff) |
Remove placement privs until a better solution is found & misc fixes
Diffstat (limited to 'railcart')
-rw-r--r-- | railcart/init.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railcart/init.lua b/railcart/init.lua index df9d4f1..417b429 100644 --- a/railcart/init.lua +++ b/railcart/init.lua @@ -32,6 +32,10 @@ minetest.register_globalstep(function(dtime) end end) +minetest.register_on_shutdown(function() + railcart:save() +end) + minetest.register_privilege("carts", "Player can pick-up and place carts.") minetest.register_entity("railcart:cart_entity", { @@ -58,6 +62,7 @@ minetest.register_entity("railcart:cart_entity", { if self.cart then if self.cart.id then railcart.allcarts[self.cart.id] = nil + railcart:save() end end self.object:remove() @@ -136,6 +141,7 @@ minetest.register_craftitem("railcart:cart", { cart.prev = vector.new(pos) cart.accel = railtrack:get_acceleration(pos) table.insert(railcart.allcarts, cart) + railcart:save() if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end |