1234567891011121314151617181920212223242526272829303132333435363738394041 |
- -- TODO: stakes must degrade if left in place for too much time.
- -- they are meant for marking construction ground not to stand forever.
- -- TODO: make them usable as fuel, or craft them into simple sticks.
- stakemarkers = {}
- stakemarkers.colors = {"red", "blue", "orange", "yellow", "green"}
- stakemarkers.nodebox = {
- type = "fixed",
- fixed = {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16}
- }
- function stakemarkers.register()
- for i, v in ipairs(stakemarkers.colors) do
- minetest.register_node("stakemarkers:marker_" .. v, {
- description = "Marker " .. v ..
- "\nUse to mark ground for construction.",
- paramtype = "light",
- drawtype = "nodebox",
- node_box = stakemarkers.nodebox,
- tiles = {"default_wood.png"},
- overlay_tiles = {"", "", "stakemarkers_" .. v .. ".png"},
- groups = {level=1, dig_immediate=2, attached_node=1},
- is_ground_content = false
- })
- minetest.register_craft({
- output = "stakemarkers:marker_" .. v .. " 8",
- recipe = {
- {"dye:" .. v},
- {"group:wood"},
- {"group:wood"}
- }
- })
- end
- end
- stakemarkers.register()
|