added model with textures and screwdriver
This commit is contained in:
parent
953d07f71e
commit
ddd592ec53
15
README.md
15
README.md
@ -2,8 +2,21 @@ Circular saw for easy crafting of stairplus-nodes (includes glue for recycling)
|
||||
|
||||
Depends on stairsplus (after all what it offers are stairsplus-nodes!)
|
||||
|
||||
Many thanks to aximx51v for creating the model and textures for the circular saw and to RealBadAngel to
|
||||
allow me to provide a copy of his screwdriver for those people who do not have his technic mod installed!
|
||||
|
||||
Version: 1.1
|
||||
|
||||
Craft: Place eight cobblestone stairs in the way you would place things for a furnace or normal chest.
|
||||
For the shared locked version, place a circular saw and a lock next to each other in the crafting grid.
|
||||
Screwdriver (if you do not have technic installed): Craft above each other: steel ingot, steel ingot, stick.
|
||||
|
||||
Changes:
|
||||
25.01.13 Added textures and nodebox-model created by aximx51v.
|
||||
Added a copy of the screwdriver from RealBadAngels technic mod for those who do not have
|
||||
technic installed and support for the stairplus nodes (marble, marblebrick, granite, obsidian)
|
||||
from the technic mod.
|
||||
|
||||
|
||||
Usage: Place the material (full nodes, i.e. sandstone, cobble, ..) in the input field of the circular saw.
|
||||
|
||||
@ -26,3 +39,5 @@ Usage: Place the material (full nodes, i.e. sandstone, cobble, ..) in the input
|
||||
Circular saws can only be operated by their owner. The shared locked version allows to set additional
|
||||
users.
|
||||
|
||||
The screwdriver allows you to change the orientation of e.g. stairs and rotate them according to your needs.
|
||||
It comes from the technic mod from RealBadAngel. See http://forum.minetest.net/viewtopic.php?id=2538
|
||||
|
70
init.lua
70
init.lua
@ -12,6 +12,20 @@ for i,v in ipairs( {"wood","stone","cobble","mossycobble","brick","sandstone","s
|
||||
table.insert( circularsaw.known_stairs, "default:"..v );
|
||||
end
|
||||
|
||||
if( minetest.get_modpath("technic") ~= nil ) then
|
||||
|
||||
-- technic has its own stairs
|
||||
for i,v in ipairs( {"concrete", "marble", "marble_bricks", "granite", "obsidian"} ) do
|
||||
table.insert( circularsaw.known_stairs, "technic:"..v );
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
-- add a copy of the screwdriver from RealBadAngels technic mod
|
||||
dofile(minetest.get_modpath("circularsaw").."/technic_screwdriver.lua");
|
||||
end
|
||||
|
||||
|
||||
-- how many microblocks does this shape at the output inventory cost?
|
||||
circularsaw.cost_in_microblocks = { 6, 4, 7, 2, 1, 3, 3,
|
||||
6, 4, 7, 2, 1, 3, 3,
|
||||
@ -124,10 +138,8 @@ circularsaw.update_inventory = function( pos, amount )
|
||||
-- display as many full blocks as possible
|
||||
inv:set_list("input", { modname.. ":" .. material .. " "..math.floor( (akt + amount) / 8 ) });
|
||||
|
||||
-- TODO: not really optimal
|
||||
if( modname == "default" ) then
|
||||
-- the stairnodes themshelves come frome stairsplus - regardless of their original full blocks
|
||||
modname = "stairsplus";
|
||||
end
|
||||
|
||||
--print("circularsaw set to "..modname.." : "..material.." with "..(akt+amount).." microblocks.");
|
||||
|
||||
@ -290,8 +302,30 @@ end,
|
||||
|
||||
minetest.register_node("circularsaw:circularsaw", {
|
||||
description = "circular saw",
|
||||
tiles = {"default_furnace_top.png", "default_furnace_bottom.png", "default_furnace_side.png",
|
||||
"default_furnace_side.png", "default_furnace_side.png", "default_furnace_front.png"},
|
||||
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
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
|
||||
{-0.4, -0.5, 0.25, -0.25, 0.25, 0.4}, --leg
|
||||
{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}, --table top
|
||||
{-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
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
type = "regular",
|
||||
},
|
||||
inventory_image = "circularsaw.png",
|
||||
tiles = {"circularsaw_top.png", "circularsaw_bottom.png", "circularsaw_side.png"},
|
||||
|
||||
paramtype = "light",
|
||||
is_ground_content = true,
|
||||
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=2},
|
||||
legacy_facedir_simple = true,
|
||||
@ -377,8 +411,30 @@ if( minetest.get_modpath("locks") ~= nil ) then
|
||||
|
||||
minetest.register_node("circularsaw:circularsaw_shared", {
|
||||
description = "shared locked circular saw",
|
||||
tiles = {"default_furnace_top.png", "default_furnace_bottom.png", "default_furnace_side.png",
|
||||
"default_furnace_side.png", "default_furnace_side.png", "default_furnace_front.png"},
|
||||
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
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
|
||||
{-0.4, -0.5, 0.25, -0.25, 0.25, 0.4}, --leg
|
||||
{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}, --table top
|
||||
{-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
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
type = "regular",
|
||||
},
|
||||
inventory_image = "circularsaw.png",
|
||||
tiles = {"circularsaw_top.png", "circularsaw_bottom.png", "circularsaw_side.png"},
|
||||
|
||||
paramtype = "light",
|
||||
is_ground_content = true,
|
||||
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=2},
|
||||
legacy_facedir_simple = true,
|
||||
|
53
technic_screwdriver.lua
Normal file
53
technic_screwdriver.lua
Normal file
@ -0,0 +1,53 @@
|
||||
-- Author: RealBadAngel
|
||||
-- Modifications done by Sokomine:
|
||||
-- - renamed tool modname and texture prefix so that it can be used inside the circularsaw-mod
|
||||
-- - changed crafting receipe to use 2x steel_ingot instead of 1x stainless_steel_ingot (which is only available in technic)
|
||||
|
||||
minetest.register_tool("circularsaw:screwdriver", {
|
||||
description = "Screwdriver",
|
||||
inventory_image = "circularsaw_technic_screwdriver.png",
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
-- Must be pointing to facedir applicable node
|
||||
if pointed_thing.type~="node" then return end
|
||||
local pos=minetest.get_pointed_thing_position(pointed_thing,above)
|
||||
local node=minetest.env:get_node(pos)
|
||||
local node_name=node.name
|
||||
if minetest.registered_nodes[node_name].paramtype2 == "facedir" or minetest.registered_nodes[node_name].paramtype2 == "wallmounted" then
|
||||
if node.param2==nil then return end
|
||||
-- Get ready to set the param2
|
||||
local n = node.param2
|
||||
if minetest.registered_nodes[node_name].paramtype2 == "facedir" then
|
||||
n = n+1
|
||||
if n == 4 then n = 0 end
|
||||
else
|
||||
n = n+1
|
||||
if n == 6 then n = 0 end
|
||||
end
|
||||
-- hacky_swap_node, unforunatly.
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local meta0 = meta:to_table()
|
||||
node.param2 = n
|
||||
minetest.env:set_node(pos,node)
|
||||
meta = minetest.env:get_meta(pos)
|
||||
meta:from_table(meta0)
|
||||
local item=itemstack:to_table()
|
||||
local item_wear=tonumber((item["wear"]))
|
||||
item_wear=item_wear+819
|
||||
if item_wear>65535 then itemstack:clear() return itemstack end
|
||||
item["wear"]=tostring(item_wear)
|
||||
itemstack:replace(item)
|
||||
return itemstack
|
||||
else
|
||||
return itemstack
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "circularsaw:screwdriver",
|
||||
recipe = {
|
||||
{"default:steel_ingot"},
|
||||
{"default:steel_ingot"},
|
||||
{"default:stick"}
|
||||
}
|
||||
})
|
BIN
textures/circularsaw.png
Normal file
BIN
textures/circularsaw.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 352 KiB |
BIN
textures/circularsaw_bottom.png
Normal file
BIN
textures/circularsaw_bottom.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 905 B |
BIN
textures/circularsaw_side.png
Normal file
BIN
textures/circularsaw_side.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 905 B |
BIN
textures/circularsaw_technic_screwdriver.png
Normal file
BIN
textures/circularsaw_technic_screwdriver.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1001 B |
BIN
textures/circularsaw_top.png
Normal file
BIN
textures/circularsaw_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 905 B |
Loading…
x
Reference in New Issue
Block a user