forked from minetest-mods/mesecons
Re-implement settings system:
Settings can now be retrieved by mesecon.setting(<name>, <default>) and can be modified without editing the source code by adding the setting to minetest.conf For instance, you can add mesecon.blinky_plant_interval = 0.5 to minetest.conf in order to increase the blinking speed. Rewrite the blinky plant with nodetimers. Fixes #161
This commit is contained in:
@ -59,7 +59,7 @@ function mesecon.register_pressure_plate(basename, description, textures_off, te
|
||||
pressureplate_basename = basename,
|
||||
on_timer = pp_on_timer,
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(PRESSURE_PLATE_INTERVAL)
|
||||
minetest.get_node_timer(pos):start(mesecon.setting("pplate_interval", 0.1))
|
||||
end,
|
||||
},{
|
||||
mesecons = {receptor = { state = mesecon.state.off, rules = mesecon.rules.pplate }},
|
||||
|
Reference in New Issue
Block a user