Added a config option 'ta_apiary_abm_enabled' to control if the ABMs are enabled or not
This commit is contained in:
parent
851e6c1759
commit
32de288068
@ -317,6 +317,8 @@ minetest.register_craft({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if ta_apiary.abm_enabled then
|
||||||
|
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
label = "spawn bee particles",
|
label = "spawn bee particles",
|
||||||
nodenames = {"ta_apiary:bee_hive"},
|
nodenames = {"ta_apiary:bee_hive"},
|
||||||
@ -367,3 +369,5 @@ minetest.register_abm({
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
3
lib.lua
3
lib.lua
@ -15,6 +15,9 @@ local M = minetest.get_meta
|
|||||||
|
|
||||||
ta_apiary = {}
|
ta_apiary = {}
|
||||||
|
|
||||||
|
ta_apiary.abm_enabled = minetest.settings:get_bool("ta_apiary_abm_enabled") ~= false
|
||||||
|
|
||||||
|
|
||||||
ta_apiary.S = minetest.get_translator("ta_apiary")
|
ta_apiary.S = minetest.get_translator("ta_apiary")
|
||||||
|
|
||||||
ta_apiary.CRD = function(pos) return (minetest.registered_nodes[techage.get_node_lvm(pos).name] or {}).consumer or {} end
|
ta_apiary.CRD = function(pos) return (minetest.registered_nodes[techage.get_node_lvm(pos).name] or {}).consumer or {} end
|
||||||
|
2
settingtypes.txt
Normal file
2
settingtypes.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Disables ABMs (to potentially increase performance)
|
||||||
|
ta_apiary_abm_enabled(Enable Apiary ABMs) bool true
|
Loading…
x
Reference in New Issue
Block a user