This repository has been archived by the owner on Aug 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
init.lua
executable file
·57 lines (54 loc) · 1.65 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
-- Licensed under CC0.
-- Painting textures from Stunt Rally <https://code.google.com/p/vdrift-ogre/>, licensed under CC0.
local paintings = {}
paintings.dyes = {
{"white", "White"},
{"grey", "Grey"},
{"black", "Black"},
{"red", "Red"},
{"yellow", "Yellow"},
{"green", "Green"},
{"cyan", "Cyan"},
{"blue", "Blue"},
{"magenta", "Magenta"},
{"orange", "Orange",},
{"violet", "Violet"},
{"brown", "Brown"},
{"pink", "Pink"},
{"dark_grey", "Dark Grey"},
{"dark_green", "Dark Green"},
}
for _, row in ipairs(paintings.dyes) do
local name = row[1]
local desc = row[2]
minetest.register_node("paintings:" .. name, {
description = desc .. " Painting",
drawtype = "nodebox",
tiles = {"paintings_" .. name .. ".png"},
inventory_image = "paintings_" .. name .. ".png",
wield_image = "paintings_" .. name .. ".png",
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
walkable = false,
node_box = {
type = "wallmounted",
wall_top = {-0.5, 0.4375, -0.5, 0.5, 0.5, 0.5},
wall_bottom = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
wall_side = {-0.5, -0.5, -0.5, -0.4375, 0.5, 0.5},
},
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = "paintings:" .. name,
recipe = {
{"group:stick", "group:stick", "group:stick"},
{"group:stick", "wool:" .. name, "group:stick"},
{"group:stick", "group:stick", "group:stick"},
}
})
end
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "Carbone: [paintings] loaded.")
end