mirror of
https://notabug.org/TenPlus1/protector.git
synced 2025-01-24 16:11:29 +01:00
code tidy, make protection field glow in dark
This commit is contained in:
parent
8a5739486f
commit
08a07a76a9
@ -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
|
||||
|
||||
|
12
init.lua
12
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
|
||||
|
Loading…
Reference in New Issue
Block a user