hc
2023-02-13 e440ec23c5a540cdd3f7464e8779219be6fd3d95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From 626cd8e9c7c2a5d5c907a12abbaa6066b6d5f2ff Mon Sep 17 00:00:00 2001
From: "vorunbekannt75@web.de" <vorunbekannt75@web.de>
Date: Tue, 6 Jun 2017 19:20:58 +0200
Subject: [PATCH] Default: Revert "Default: Shorter and better ABMs"
 
This reverts commit e523c3a2965afe76b9102b67992e15fafba1594a to re-enable
the overriding and redefinition of these global functions.
 
[Romain backport from upstream]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 mods/default/functions.lua | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
 
diff --git a/mods/default/functions.lua b/mods/default/functions.lua
index 5dc22ca..327e0c8 100644
--- a/mods/default/functions.lua
+++ b/mods/default/functions.lua
@@ -139,7 +139,9 @@ if minetest.settings:get_bool("enable_lavacooling") ~= false then
         interval = 1,
         chance = 2,
         catch_up = false,
-        action = default.cool_lava,
+        action = function(...)
+            default.cool_lava(...)
+        end,
     })
 end
 
@@ -222,7 +224,9 @@ minetest.register_abm({
     neighbors = {"group:sand"},
     interval = 12,
     chance = 83,
-    action = default.grow_cactus
+    action = function(...)
+        default.grow_cactus(...)
+    end
 })
 
 minetest.register_abm({
@@ -231,7 +235,9 @@ minetest.register_abm({
     neighbors = {"default:dirt", "default:dirt_with_grass"},
     interval = 14,
     chance = 71,
-    action = default.grow_papyrus
+    action = function(...)
+        default.grow_papyrus(...)
+    end
 })
 
 
-- 
2.9.4