Highlight the Northern border by default
This commit is contained in:
parent
f5beb59b54
commit
28ede3cc26
12
init.lua
12
init.lua
@ -937,7 +937,7 @@ function schemedit.mark(pos)
|
|||||||
local offset
|
local offset
|
||||||
|
|
||||||
-- XY plane markers
|
-- XY plane markers
|
||||||
for _, z in ipairs({pos1.z - 0.5, pos2.z + 0.5}) do
|
for i, z in ipairs({pos1.z - 0.5, pos2.z + 0.5}) do
|
||||||
if low then
|
if low then
|
||||||
offset = -0.01
|
offset = -0.01
|
||||||
else
|
else
|
||||||
@ -945,8 +945,17 @@ function schemedit.mark(pos)
|
|||||||
end
|
end
|
||||||
local marker = minetest.add_entity({x = pos1.x + sizex - 0.5, y = pos1.y + sizey - 0.5, z = z + offset}, "schemedit:display")
|
local marker = minetest.add_entity({x = pos1.x + sizex - 0.5, y = pos1.y + sizey - 0.5, z = z + offset}, "schemedit:display")
|
||||||
if marker ~= nil then
|
if marker ~= nil then
|
||||||
|
local textures
|
||||||
|
if i == 2 then
|
||||||
|
if minetest.settings:get_bool("schemedit_highlight_north", true) then
|
||||||
|
-- Highlight Northern side
|
||||||
|
textures = marker:get_properties().textures
|
||||||
|
textures[1] = "("..textures[1] .. ")^[brighten"
|
||||||
|
end
|
||||||
|
end
|
||||||
marker:set_properties({
|
marker:set_properties({
|
||||||
visual_size={x=(sizex+0.01) * 2, y=(sizey+0.01) * 2},
|
visual_size={x=(sizex+0.01) * 2, y=(sizey+0.01) * 2},
|
||||||
|
textures=textures,
|
||||||
})
|
})
|
||||||
marker:get_luaentity().id = id
|
marker:get_luaentity().id = id
|
||||||
marker:get_luaentity().owner = owner
|
marker:get_luaentity().owner = owner
|
||||||
@ -963,7 +972,6 @@ function schemedit.mark(pos)
|
|||||||
else
|
else
|
||||||
offset = 0.01
|
offset = 0.01
|
||||||
end
|
end
|
||||||
|
|
||||||
local marker = minetest.add_entity({x = x + offset, y = pos1.y + sizey - 0.5, z = pos1.z + sizez - 0.5}, "schemedit:display")
|
local marker = minetest.add_entity({x = x + offset, y = pos1.y + sizey - 0.5, z = pos1.z + sizez - 0.5}, "schemedit:display")
|
||||||
if marker ~= nil then
|
if marker ~= nil then
|
||||||
marker:set_properties({
|
marker:set_properties({
|
||||||
|
@ -6,3 +6,6 @@ schemedit_export_lua (.lua file schematic export) bool false
|
|||||||
# * edges: Show borders at the edges
|
# * edges: Show borders at the edges
|
||||||
# * checkers: Checker pattern at the sides
|
# * checkers: Checker pattern at the sides
|
||||||
schemedit_border_style (Border style) enum edges edges,checkers
|
schemedit_border_style (Border style) enum edges edges,checkers
|
||||||
|
|
||||||
|
# If enabled, the Northern border marker will be brighter.
|
||||||
|
schemedit_highlight_north (Highlight Northern border) bool true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user