forked from MTSR/jonez
updates
This commit is contained in:
parent
f89798f8fe
commit
5684b50231
18
chisel.lua
18
chisel.lua
@ -6,8 +6,6 @@ chisel.group_style_index = {}
|
||||
chisel.group_style_nodes = {}
|
||||
chisel.player_copied_style = {}
|
||||
|
||||
|
||||
|
||||
chisel.register_chiselable = function(node_name, group_name, style)
|
||||
chisel.chiselable[ node_name ] = {}
|
||||
chisel.chiselable[ node_name ].group_name = group_name
|
||||
@ -20,8 +18,6 @@ chisel.register_chiselable = function(node_name, group_name, style)
|
||||
chisel.group_style_nodes[ group_name ][ style ] = node_name
|
||||
end
|
||||
|
||||
|
||||
|
||||
chisel.register_chiselable_stair_and_slab = function(node_subname, group_subname, style)
|
||||
chisel.register_chiselable("stairs:stair_" .. node_subname, "stairs:stair_" .. group_subname, style)
|
||||
chisel.register_chiselable("stairs:stair_inner_" .. node_subname, "stairs:stair_inner_" .. group_subname, style)
|
||||
@ -29,8 +25,6 @@ chisel.register_chiselable_stair_and_slab = function(node_subname, group_subname
|
||||
chisel.register_chiselable("stairs:slab_" .. node_subname, "stairs:slab_" .. group_subname, style)
|
||||
end
|
||||
|
||||
|
||||
|
||||
local function chisel_interact(player, pointed_thing, is_right_click)
|
||||
if pointed_thing.type ~= "node" then return end
|
||||
|
||||
@ -62,7 +56,6 @@ local function chisel_interact(player, pointed_thing, is_right_click)
|
||||
local group = chisel.group_style_nodes[ group_name ]
|
||||
local new_style , new_node_name
|
||||
|
||||
|
||||
-- Now branch on the four user-input cases
|
||||
if is_right_click then
|
||||
if is_sneak then
|
||||
@ -83,7 +76,8 @@ local function chisel_interact(player, pointed_thing, is_right_click)
|
||||
|
||||
new_node_name = group[ new_style ]
|
||||
if not new_node_name then
|
||||
minetest.chat_send_player(player_name, "Chisel style " .. new_style .. " is not supported by this chisel group " .. group_name)
|
||||
minetest.chat_send_player(player_name, "Chisel style " .. new_style ..
|
||||
" is not supported by this chisel group " .. group_name)
|
||||
return
|
||||
end
|
||||
end
|
||||
@ -112,14 +106,14 @@ local function chisel_interact(player, pointed_thing, is_right_click)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- Check if rotation could be preserved
|
||||
local nodedef = minetest.registered_nodes[node_name]
|
||||
local new_nodedef = minetest.registered_nodes[new_node_name]
|
||||
local rotation , new_rotation
|
||||
|
||||
if nodedef and new_nodedef then
|
||||
if ( nodedef.paramtype2 == "facedir" or nodedef.paramtype2 == "colorfacedir" ) and ( new_nodedef.paramtype2 == "facedir" or new_nodedef.paramtype2 == "colorfacedir" ) then
|
||||
if ( nodedef.paramtype2 == "facedir" or nodedef.paramtype2 == "colorfacedir" )
|
||||
and( new_nodedef.paramtype2 == "facedir" or new_nodedef.paramtype2 == "colorfacedir" ) then
|
||||
rotation = node.param2 % 32 --rotation are on the last 5 digits
|
||||
end
|
||||
end
|
||||
@ -141,8 +135,6 @@ local function chisel_interact(player, pointed_thing, is_right_click)
|
||||
minetest.sound_play("jonez_carve", {pos = pos, gain = 0.7, max_hear_distance = 5})
|
||||
end
|
||||
|
||||
|
||||
|
||||
--The chisel to carve the marble
|
||||
minetest.register_craftitem("jonez:chisel", {
|
||||
description = S("Chisel for Marble"),
|
||||
@ -158,8 +150,6 @@ minetest.register_craftitem("jonez:chisel", {
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shaped",
|
||||
output = "jonez:chisel",
|
||||
|
5
init.lua
5
init.lua
@ -132,8 +132,6 @@ local styles = {
|
||||
"corinthian"
|
||||
}
|
||||
|
||||
|
||||
|
||||
-- The Crafting of the Greek Set
|
||||
|
||||
minetest.register_craft({
|
||||
@ -176,8 +174,6 @@ minetest.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
|
||||
for i = 1, #styles do
|
||||
|
||||
chisel.register_chiselable("jonez:"..styles[i].."_architrave", "jonez:architrave", styles[i] )
|
||||
@ -452,7 +448,6 @@ minetest.register_node("jonez:versailles_pavement", {
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'jonez:versailles_pavement',
|
||||
type = "shaped",
|
||||
|
Loading…
Reference in New Issue
Block a user