initial commit

This commit is contained in:
Ulrich 2020-05-17 13:12:29 +02:00
commit 944fdae95b
11 changed files with 74 additions and 0 deletions

2
dev/x.html Normal file
View File

@ -0,0 +1,2 @@
<html bgcolor="green"> <body style="background-color:green;">
<img src=yl_decals_crack_01.png>

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

BIN
dev/yl_decals_crack_01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

BIN
dev/yl_decals_crack_02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
dev/yl_decals_crack_03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

72
init.lua Normal file
View File

@ -0,0 +1,72 @@
local function rotate_on_rightclick(pos, node, player, itemstack, pointed_thing)
local node_name = minetest.get_node(pos).name
local rot = (node_name:sub(#node_name,#node_name) + 1 ) % 4
node.name = node_name:sub(1,-2) .. rot
minetest.swap_node(pos, node)
end
local rotations={0,1,2,3}
for _,v in pairs(rotations) do
local tile = {"yl_decals_crack_01.png^[transform"..v}
minetest.register_node("yl_decals:crack_01_"..v, {
description = "Crack Double",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "wallmounted",
drawtype = "signlike",
tiles = tile,
walkable = false,
pointable = true,
diggable = false,
buildable_to = true,
on_rightclick = rotate_on_rightclick,
groups = {not_in_creative_inventory = 1},
})
end
for _,v in pairs(rotations) do
local tile = {"yl_decals_crack_02.png^[transform"..v}
minetest.register_node("yl_decals:crack_02_"..v, {
description = "Crack Double",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "wallmounted",
drawtype = "signlike",
tiles = tile,
walkable = false,
pointable = true,
diggable = false,
buildable_to = true,
on_rightclick = rotate_on_rightclick,
groups = {not_in_creative_inventory = 1},
})
end
for _,v in pairs(rotations) do
local tile = {"yl_decals_crack_03.png^[transform"..v}
minetest.register_node("yl_decals:crack_03_"..v, {
description = "Crack Double",
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "wallmounted",
drawtype = "signlike",
tiles = tile,
walkable = false,
pointable = true,
diggable = false,
buildable_to = true,
on_rightclick = rotate_on_rightclick,
groups = {not_in_creative_inventory = 1},
})
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB