Add a user setting for whether signs glow

This commit is contained in:
FaceDeer 2017-01-27 21:03:50 -07:00
parent ef17a27ef4
commit 6ed1924eca
2 changed files with 13 additions and 1 deletions

View File

@ -9,6 +9,14 @@
-- When a blank tag stack is used to punch an in-world tag, it inherits that tag's values (continues the chain) -- When a blank tag stack is used to punch an in-world tag, it inherits that tag's values (continues the chain)
-- Can turn a tag stack blank again via crafting menu -- Can turn a tag stack blank again via crafting menu
local glow = minetest.setting_get("breadcrumbs_glow_in_the_dark")
local glow_level
if glow == true or glow == nil then
glow_level = 4
else
glow_level = 0
end
local formspec = "size[8,2]" .. default.gui_bg .. local formspec = "size[8,2]" .. default.gui_bg ..
default.gui_bg_img .. default.gui_bg_img ..
"field[0.5,1;7.5,0;label;Label:;]" .. "field[0.5,1;7.5,0;label;Label:;]" ..
@ -89,7 +97,7 @@ minetest.register_node("breadcrumbs:marker", {
is_ground_content = false, is_ground_content = false,
walkable = false, walkable = false,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
light_source = 4, light_source = glow_level,
node_box = { node_box = {
type = "wallmounted", type = "wallmounted",
wall_top = {-0.3125, 0.4375, -0.3125, 0.3125, 0.5, 0.3125}, wall_top = {-0.3125, 0.4375, -0.3125, 0.3125, 0.5, 0.3125},

4
settingtypes.txt Normal file
View File

@ -0,0 +1,4 @@
#Causes path marker signs to emit a very dim light, making it easier
#to spot them in pitch darkness but otherwise not illuminating their
#surroundings
breadcrumbs_glow_in_the_dark (Glowing marker signs) bool true