From f977ac821aa2f6c7053ec7f65d289c57de1e91a8 Mon Sep 17 00:00:00 2001 From: Jeija Date: Sat, 22 Nov 2014 22:09:26 +0100 Subject: Re-implement settings system: Settings can now be retrieved by mesecon.setting(, ) 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 --- mesecons_detector/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesecons_detector') diff --git a/mesecons_detector/init.lua b/mesecons_detector/init.lua index ab997ce..1a8595d 100644 --- a/mesecons_detector/init.lua +++ b/mesecons_detector/init.lua @@ -23,7 +23,7 @@ end -- returns true if player was found, false if not local object_detector_scan = function (pos) - local objs = minetest.get_objects_inside_radius(pos, OBJECT_DETECTOR_RADIUS) + local objs = minetest.get_objects_inside_radius(pos, mesecon.setting("detector_radius", 6)) for k, obj in pairs(objs) do local isname = obj:get_player_name() -- "" is returned if it is not a player; "" ~= nil! local scanname = minetest.get_meta(pos):get_string("scanname") -- cgit v1.2.3