From d74f2fa27bd322585a5d20fce762987bf4f9395c Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Wed, 28 Jun 2017 09:43:51 +0100 Subject: [PATCH] falling velocity no longer exceeds self.fall_speed --- api.lua | 19 ++++++++----------- crafts.lua | 2 +- locale/de.txt | 2 +- locale/pt.txt | 2 +- locale/tr.txt | 2 +- 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/api.lua b/api.lua index 09989b9..7ed45e6 100644 --- a/api.lua +++ b/api.lua @@ -1,9 +1,9 @@ --- Mobs Api (24th June 2017) +-- Mobs Api (28th June 2017) mobs = {} mobs.mod = "redo" -mobs.version = "20170624" +mobs.version = "20170628" -- Intllib @@ -1942,14 +1942,17 @@ local falling = function(self, pos) -- floating in water (or falling) local v = self.object:getvelocity() - -- going up then apply gravity - if v.y > 0.1 then + if v.y > self.fall_speed then + -- fall downwards self.object:setacceleration({ x = 0, y = self.fall_speed, z = 0 }) + else + -- stop accelerating once max fall speed hit + self.object:setacceleration({x = 0, y = 0, z = 0}) end -- in water then float up @@ -1965,14 +1968,8 @@ local falling = function(self, pos) }) end else - -- fall downwards - self.object:setacceleration({ - x = 0, - y = self.fall_speed, - z = 0 - }) - -- fall damage + -- fall damage onto solid ground if self.fall_damage == 1 and self.object:getvelocity().y == 0 then diff --git a/crafts.lua b/crafts.lua index 80cc5e2..8b8d042 100644 --- a/crafts.lua +++ b/crafts.lua @@ -42,7 +42,7 @@ minetest.register_craft({ -- lasso minetest.register_tool("mobs:lasso", { - description = S("Magic Lasso (right-click animal to put in inventory)"), + description = S("Lasso (right-click animal to put in inventory)"), inventory_image = "mobs_magic_lasso.png", }) diff --git a/locale/de.txt b/locale/de.txt index aa7a7a7..f4776be 100644 --- a/locale/de.txt +++ b/locale/de.txt @@ -25,7 +25,7 @@ Nametag = Namensschild Leather = Leder Raw Meat = Rohes Fleisch Meat = Fleisch -Magic Lasso (right-click animal to put in inventory) = Magisches Lasso (Rechtsklick auf Tier,\num es ins Inventar zu legen) +Magic Lasso (right-click animal to put in inventory) = Lasso (Rechtsklick auf Tier,\num es ins Inventar zu legen) Net (right-click animal to put in inventory) = Netz (Rechtsklick auf Tier,\num es ins Inventar zu legen) Steel Shears (right-click to shear) = Stahlschere (Rechtsklick zum Scheren) diff --git a/locale/pt.txt b/locale/pt.txt index 064631f..76b4eb0 100644 --- a/locale/pt.txt +++ b/locale/pt.txt @@ -25,7 +25,7 @@ Nametag = Etiqueta Leather = Couro Raw Meat = Carne crua Meat = Carne -Magic Lasso (right-click animal to put in inventory) = Laço Magico (clique-direito no animal para por no inventario) +Magic Lasso (right-click animal to put in inventory) = Laço (clique-direito no animal para por no inventario) Net (right-click animal to put in inventory) = Net (clique-direito no animal para por no inventario) Steel Shears (right-click to shear) = Tesoura de Aço (clique-direito para tosquiar) diff --git a/locale/tr.txt b/locale/tr.txt index 3f2833e..11f5afc 100644 --- a/locale/tr.txt +++ b/locale/tr.txt @@ -26,7 +26,7 @@ Nametag = İsim etiketi Leather = Deri Raw Meat = Çiğ et Meat = Et -Magic Lasso (right-click animal to put in inventory) = Sihirli kement (hayvana sağ tıklayarak envantere koy) +Magic Lasso (right-click animal to put in inventory) = Kement (hayvana sağ tıklayarak envantere koy) Net (right-click animal to put in inventory) = Ağ (hayvana sağ tıklayarak envantere koy) Steel Shears (right-click to shear) = Çelik makas (sağ tıklayarak kes)