Add checker border style

This commit is contained in:
Wuzzy 2022-11-22 11:51:18 +01:00
parent ce5a3cee76
commit a5c92aaa9a
3 changed files with 17 additions and 1 deletions

View File

@ -42,6 +42,17 @@ local function renumber(t)
return res
end
local get_border_texture = function()
local val = minetest.settings:get("schemedit_border_style")
if val == "checkers" then
-- checkers style
return "schemedit_border_checkers.png"
else
-- edges style
return "schemedit_border.png"
end
end
local NEEDED_PRIV = "server"
local function check_priv(player_name, quit)
local privs = minetest.get_player_privs(player_name)
@ -1343,7 +1354,7 @@ minetest.register_node("schemedit:void", {
-- [entity] Visible schematic border
minetest.register_entity("schemedit:display", {
visual = "upright_sprite",
textures = {"schemedit_border.png"},
textures = {get_border_texture()},
visual_size = {x=10, y=10},
pointable = false,
physical = false,

View File

@ -1,3 +1,8 @@
# If enabled, exporting a schematic will also create a .lua file
# in addition to the .mts file.
schemedit_export_lua (.lua file schematic export) bool false
# Specify the style of the visual border markers.
# * edges: Show borders at the edges
# * checkers: Checker pattern at the sides
schemedit_border_style (Border style) enum edges edges,checkers

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B