1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-09 12:00:17 +01:00
server-nalc/mods/paintings/init.lua
Ombridride 2e895a7790 Merge server with github repository
Pas mal de changement n’ont pas été pushé sur le github du serveur,
voici l’occasion de faire une bonne synchronisation :)
2014-11-16 22:23:16 +01:00

58 lines
1.7 KiB
Lua

-- 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.setting_getbool("log_mods") then
minetest.log("action", "Carbone: [paintings] loaded.")
end