Skip to content

Commit e523c3a

Browse files
theFox6SmallJoker
authored andcommittedMay 20, 2017
Default: Shorter and better ABMs (#1739)
Action of some abm's call functions directly, instead of calling the function inside a function.
1 parent b25317f commit e523c3a

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed
 

Diff for: ‎mods/default/functions.lua

+3-9
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,7 @@ if minetest.setting_getbool("enable_lavacooling") ~= false then
139139
interval = 1,
140140
chance = 2,
141141
catch_up = false,
142-
action = function(...)
143-
default.cool_lava(...)
144-
end,
142+
action = default.cool_lava,
145143
})
146144
end
147145

@@ -224,9 +222,7 @@ minetest.register_abm({
224222
neighbors = {"group:sand"},
225223
interval = 12,
226224
chance = 83,
227-
action = function(...)
228-
default.grow_cactus(...)
229-
end
225+
action = default.grow_cactus
230226
})
231227

232228
minetest.register_abm({
@@ -235,9 +231,7 @@ minetest.register_abm({
235231
neighbors = {"default:dirt", "default:dirt_with_grass"},
236232
interval = 14,
237233
chance = 71,
238-
action = function(...)
239-
default.grow_papyrus(...)
240-
end
234+
action = default.grow_papyrus
241235
})
242236

243237

0 commit comments

Comments
 (0)
Please sign in to comment.