diff --git a/init.lua b/init.lua index 3f009bd..2206500 100644 --- a/init.lua +++ b/init.lua @@ -8,12 +8,32 @@ function firstToUpper(str) return (str:gsub("^%l", string.upper)) end +local function on_punch_marble(pos, player, replace_item) + local wielded_item = player:get_wielded_item() + local wielded_item_name = wielded_item:get_name() + if wielded_item_name == "jonez:chisel" then + minetest.set_node(pos, {name= replace_item}) + minetest.sound_play("jonez_carve", {pos = pos, gain = 0.7, max_hear_distance = 5}) + end +end + minetest.register_node("jonez:marble", { description = S("Ancient Marble"), tiles = {"jonez_marble.png"}, is_ground_content = true, groups = {cracky=3}, sounds = default.node_sound_stone_defaults(), + on_punch = function(pos, node, player, pointed_thing) + on_punch_marble(pos, player, "jonez:marble_polished") + end, +}) + +minetest.register_node("jonez:marble_polished", { + description = S("Ancient Polished Marble"), + tiles = {"jonez_marble_polished.png"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), }) stairs.register_stair_and_slab( @@ -41,16 +61,54 @@ minetest.register_node("jonez:marble_brick", { is_ground_content = true, groups = {cracky=3}, sounds = default.node_sound_stone_defaults(), + on_punch = function(pos, node, player, pointed_thing) + on_punch_marble(pos, player, "jonez:marble_brick_polished") + end, }) +minetest.register_node("jonez:marble_brick_polished", { + description = S("Ancient Marble Polished Brick"), + tiles = {"jonez_marble_brick_polished.png"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +stairs.register_stair_and_slab( + "marble_polished", + "jonez:marble_polished", + {choppy = 2, stone = 1}, + {"jonez_marble_polished.png"}, + S("Ancient Polished Marble Stair"), + S("Ancient Polished Marble Slab"), + default.node_sound_stone_defaults() +) +stairs.register_stair_and_slab( + "marble_brick_polished", + "jonez:marble_brick_polished", + {choppy = 2, stone = 1}, + {"jonez_marble_brick_polished.png"}, + S("Ancient Polished Marble Brick Stair"), + S("Ancient Polished Marble Brick Slab"), + default.node_sound_stone_defaults() +) + minetest.register_craft({ - output = 'jonez:marble_bricks', + output = 'jonez:marble_brick', recipe = { {'jonez:marble', 'jonez:marble'}, {'jonez:marble', 'jonez:marble'}, } }) +minetest.register_craft({ + output = 'jonez:marble_brick_polished', + recipe = { + {'jonez:marble_polished', 'jonez:marble_polished'}, + {'jonez:marble_polished', 'jonez:marble_polished'}, + } +}) + minetest.register_ore({ ore_type = "scatter", ore = "jonez:marble", @@ -243,6 +301,27 @@ local pavements= { {'stairs:slab_marble_brick', 'stairs:slab_marble_brick', ''}, } }, + {name= "jonez:mosaic_pavement", description= "Ancient Mosaic Pavement", texture= "jonez_mosaic_pavement.png", + recipe = { + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick', 'stairs:slab_marble_brick'}, + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick', 'stairs:slab_marble_brick'}, + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick', 'stairs:slab_marble_brick'}, + } + }, + {name= "jonez:diamond_pavement", description= "Ancient Diamond Pavement", texture= "jonez_diamond_pavement.png", + recipe = { + {'', 'stairs:slab_marble', ''}, + {'stairs:slab_marble', '', 'stairs:slab_marble'}, + {'', 'stairs:slab_marble', ''}, + } + }, + {name= "jonez:pebbled_pavement", description= "Ancient Pebbled Pavement", texture= "jonez_pebbled_pavement.png", + recipe = { + {'', 'stairs:slab_marble_brick_polished', ''}, + {'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick_polished'}, + {'', 'stairs:slab_marble_brick_polished', ''}, + } + }, } for i = 1, #pavements do diff --git a/locale/jonez.es.tr b/locale/jonez.es.tr index 92f3eb9..364f03b 100644 --- a/locale/jonez.es.tr +++ b/locale/jonez.es.tr @@ -25,4 +25,11 @@ Mosaic Glass Panel=Panel de mosaico Blossom Glass Panel=Panel mosaico florido Ancient Blossom Pavement=Pavimento antiguo floreado Ancient Tiled Pavement=Pavimento de baldosas antiguas - +Ancient Mosaic Pavement=Pavimento de mosaico antiguo +Ancient Diamond Pavement=Pavimento de rombos antiguo +Ancient Pebbled Pavement=Pavimento de guijarros antiguo +Ancient Polished Marble=Marmol pulido antiguo +Ancient Polished Marble Stair=Escalera de mármol pulido antiguo +Ancient Polished Marble Slab=Losa de mármol pulido antiguo +Ancient Polished Marble Brick Stair=Escalera de ladrillo de mármol pulido antiguo +Ancient Polished Marble Brick Slab=Losa de ladrillo de mármol pulido antiguo diff --git a/textures/jonez_diamond_pavement.png b/textures/jonez_diamond_pavement.png new file mode 100644 index 0000000..a25cd7a Binary files /dev/null and b/textures/jonez_diamond_pavement.png differ diff --git a/textures/jonez_marble_brick_polished.png b/textures/jonez_marble_brick_polished.png new file mode 100644 index 0000000..293a15c Binary files /dev/null and b/textures/jonez_marble_brick_polished.png differ diff --git a/textures/jonez_marble_polished.png b/textures/jonez_marble_polished.png index 6cb0db9..c18f1c4 100644 Binary files a/textures/jonez_marble_polished.png and b/textures/jonez_marble_polished.png differ diff --git a/textures/jonez_mosaic_pavement.png b/textures/jonez_mosaic_pavement.png new file mode 100644 index 0000000..9630905 Binary files /dev/null and b/textures/jonez_mosaic_pavement.png differ diff --git a/textures/jonez_pebbled_pavement.png b/textures/jonez_pebbled_pavement.png new file mode 100644 index 0000000..31225c9 Binary files /dev/null and b/textures/jonez_pebbled_pavement.png differ