diff --git a/README.md b/README.md index 3f15f7a..38cb44a 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Change log: - 2.5 - Added HUD text to show when player is inside a protected area (updates every 5 seconds) - 2.6 - Add protection against CSM tampering, updated Intllib support (thanks codexp), tweaked block textures - 2.7 - Remove protection field entity when protector has been dug -- 2.8 - Added 'protector_show_interval' setting to minetest.conf, default is 5 +- 2.8 - Added 'protector_show_interval' setting to minetest.conf [default is 5], make protection field glow in dark. Lucky Blocks: 10 diff --git a/init.lua b/init.lua index 50e434d..8cde269 100644 --- a/init.lua +++ b/init.lua @@ -5,10 +5,11 @@ local S = dofile(MP .. "/intllib.lua") local F = minetest.formspec_escape -protector = {} -protector.mod = "redo" -protector.modpath = MP -protector.intllib = S +protector = { + mod = "redo", + modpath = MP, + intllib = S +} local protector_max_share_count = 12 -- get minetest.conf settings @@ -620,12 +621,13 @@ minetest.register_entity("protector:display", { visual_size = {x = 0.67, y = 0.67}, textures = {"protector:display_node"}, timer = 0, + glow = 10, on_step = function(self, dtime) self.timer = self.timer + dtime - -- remove after 5 seconds + -- remove after set number of seconds if self.timer > protector_show then self.object:remove() end