Skip to content

Commit

Permalink
Default: Shorter and better ABMs (#1739)
Browse files Browse the repository at this point in the history
Action of some abm's call functions directly, instead of calling the function inside a function.
  • Loading branch information
theFox6 authored and SmallJoker committed May 20, 2017
1 parent b25317f commit e523c3a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions mods/default/functions.lua
Expand Up @@ -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

Expand Down Expand Up @@ -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({
Expand All @@ -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
})


Expand Down

0 comments on commit e523c3a

Please sign in to comment.