Default: Shorter and better ABMs (#1739)
authortheFox6 <the.fox6@gmx.de>
Sat, 20 May 2017 12:32:52 +0000 (14:32 +0200)
committerSmallJoker <SmallJoker@users.noreply.github.com>
Sat, 20 May 2017 12:32:52 +0000 (14:32 +0200)
Action of some abm's call functions directly, instead of calling the function inside a function.

mods/default/functions.lua

index 936712cac272c187f007f0fe63f19ebe7ec61321..6d93f4281d93f797ac4fd1166c294437c1a66005 100644 (file)
@@ -139,9 +139,7 @@ if minetest.setting_getbool("enable_lavacooling") ~= false then
                interval = 1,
                chance = 2,
                catch_up = false,
-               action = function(...)
-                       default.cool_lava(...)
-               end,
+               action = default.cool_lava,
        })
 end
 
@@ -224,9 +222,7 @@ minetest.register_abm({
        neighbors = {"group:sand"},
        interval = 12,
        chance = 83,
-       action = function(...)
-               default.grow_cactus(...)
-       end
+       action = default.grow_cactus
 })
 
 minetest.register_abm({
@@ -235,9 +231,7 @@ minetest.register_abm({
        neighbors = {"default:dirt", "default:dirt_with_grass"},
        interval = 14,
        chance = 71,
-       action = function(...)
-               default.grow_papyrus(...)
-       end
+       action = default.grow_papyrus
 })