Add checker border style
This commit is contained in:
parent
ce5a3cee76
commit
a5c92aaa9a
13
init.lua
13
init.lua
@ -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,
|
||||
|
@ -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
|
||||
|
BIN
textures/schemedit_border_checkers.png
Normal file
BIN
textures/schemedit_border_checkers.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 90 B |
Loading…
x
Reference in New Issue
Block a user