2015-01-11 22:21:33 +01:00
|
|
|
--[[
|
2015-01-12 17:46:22 +01:00
|
|
|
More Blocks: circular saw
|
2015-01-11 22:21:33 +01:00
|
|
|
|
2020-01-01 04:09:24 +01:00
|
|
|
Copyright © 2011-2020 Hugo Locurcio, Sokomine and contributors.
|
2015-01-11 22:21:33 +01:00
|
|
|
Licensed under the zlib license. See LICENSE.md for more information.
|
|
|
|
--]]
|
2022-06-14 01:11:20 +02:00
|
|
|
local api = stairsplus.api
|
|
|
|
local S = stairsplus.S
|
|
|
|
local cm = stairsplus.resources.craft_materials
|
|
|
|
|
2022-06-15 01:30:41 +02:00
|
|
|
api.register_station("stairsplus:circular_saw", {"legacy"}, {
|
2016-12-15 23:56:45 +01:00
|
|
|
description = S("Circular Saw"),
|
|
|
|
drawtype = "nodebox",
|
2014-03-09 10:38:18 +01:00
|
|
|
node_box = {
|
2016-12-15 23:56:45 +01:00
|
|
|
type = "fixed",
|
2014-03-09 10:38:18 +01:00
|
|
|
fixed = {
|
|
|
|
{-0.4, -0.5, -0.4, -0.25, 0.25, -0.25}, -- Leg
|
|
|
|
{0.25, -0.5, 0.25, 0.4, 0.25, 0.4}, -- Leg
|
2016-12-15 23:56:45 +01:00
|
|
|
{-0.4, -0.5, 0.25, -0.25, 0.25, 0.4}, -- Leg
|
2014-03-09 10:38:18 +01:00
|
|
|
{0.25, -0.5, -0.4, 0.4, 0.25, -0.25}, -- Leg
|
|
|
|
{-0.5, 0.25, -0.5, 0.5, 0.375, 0.5}, -- Tabletop
|
|
|
|
{-0.01, 0.4375, -0.125, 0.01, 0.5, 0.125}, -- Saw blade (top)
|
|
|
|
{-0.01, 0.375, -0.1875, 0.01, 0.4375, 0.1875}, -- Saw blade (bottom)
|
|
|
|
{-0.25, -0.0625, -0.25, 0.25, 0.25, 0.25}, -- Motor case
|
2013-07-11 20:33:02 +02:00
|
|
|
},
|
2014-03-09 10:38:18 +01:00
|
|
|
},
|
2022-06-14 01:11:20 +02:00
|
|
|
tiles = {
|
2022-06-14 20:17:06 +02:00
|
|
|
"stairsplus_circular_saw_top.png",
|
|
|
|
"stairsplus_circular_saw_bottom.png",
|
|
|
|
"stairsplus_circular_saw_side.png"
|
2022-06-14 01:11:20 +02:00
|
|
|
},
|
2016-12-15 23:56:45 +01:00
|
|
|
paramtype = "light",
|
2014-03-09 10:38:18 +01:00
|
|
|
sunlight_propagates = true,
|
2016-12-15 23:56:45 +01:00
|
|
|
paramtype2 = "facedir",
|
2022-06-12 03:17:41 +02:00
|
|
|
groups = {choppy = 2, oddly_breakable_by_hand = 2},
|
2022-06-14 20:17:06 +02:00
|
|
|
sounds = stairsplus.resources.sounds.wood,
|
2013-07-11 20:33:02 +02:00
|
|
|
})
|
2022-06-12 03:17:41 +02:00
|
|
|
|
2022-06-14 01:11:20 +02:00
|
|
|
if cm.steel_ingot then
|
2022-06-14 20:17:06 +02:00
|
|
|
if stairsplus.settings.circular_saw_crafting then
|
2022-06-14 01:11:20 +02:00
|
|
|
minetest.register_craft({
|
|
|
|
output = "stairsplus:circular_saw",
|
|
|
|
recipe = {
|
|
|
|
{"", cm.steel_ingot, ""},
|
|
|
|
{"group:wood", "group:wood", "group:wood"},
|
|
|
|
{"group:wood", "", "group:wood"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|