commit e284a46abb5f4285e03b00a8884c45a6d32686d7 Author: runs Date: Sat May 16 19:52:26 2020 +0200 first commit diff --git a/LICENSE.MD b/LICENSE.MD new file mode 100644 index 0000000..39b31fc --- /dev/null +++ b/LICENSE.MD @@ -0,0 +1,16 @@ +#LICENSES + +## Source Code + +- GPLv3 + +## Textures + +- Textures made by runs +- CC BY-SA 4.0 + +## Sounds + +- File: jonez_carve.ogg +- Author: runs +- License: CC BY-SA 4.0 diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..39d2bd5 --- /dev/null +++ b/init.lua @@ -0,0 +1,260 @@ +jonez = {} + +--Variables +local modname = "jonez" +local modpath = minetest.get_modpath(modname) +local S = minetest.get_translator(minetest.get_current_modname()) + +function firstToUpper(str) + return (str:gsub("^%l", string.upper)) +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(), +}) + +stairs.register_stair_and_slab( + "marble", + "jonez:marble", + {choppy = 2, stone = 1}, + {"jonez_marble.png"}, + S("Ancient Marble Stair"), + S("Ancient Marble Slab"), + default.node_sound_stone_defaults() +) +stairs.register_stair_and_slab( + "marble_brick", + "jonez:marble_brick", + {choppy = 2, stone = 1}, + {"jonez_marble_brick.png"}, + S("Ancient Marble Brick Stair"), + S("Ancient Marble Brick Slab"), + default.node_sound_stone_defaults() +) + +minetest.register_node("jonez:marble_brick", { + description = S("Ancient Marble Brick"), + tiles = {"jonez_marble_brick.png"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craft({ + output = 'jonez:marble_bricks', + recipe = { + {'jonez:marble', 'jonez:marble'}, + {'jonez:marble', 'jonez:marble'}, + } +}) + +minetest.register_ore({ + ore_type = "scatter", + ore = "jonez:marble", + wherein = "default:stone", + clust_scarcity = 7*7*7, + clust_num_ores = 5, + clust_size = 3, + height_min = -31000, + height_max = -1000, + flags = "absheight", +}) + +local styles = { + "roman", + "greek", + "germanic", + "tuscan", + "romanic" +} + +--The chisel to carve the marble +minetest.register_craftitem("jonez:chisel", { + description = S("Chisel for Marble"), + inventory_image = "jonez_chisel.png", + wield_image = "jonez_chisel.png^[transformR180" +}) + +minetest.register_craft({ + type = "shaped", + output = "jonez:chisel", + recipe = { + {"", "", "default:diamond"}, + {"", "default:steel_ingot", ""}, + {"default:stick", "", ""}, + } +}) + +local function save_meta(pos, i, element) + local meta = minetest.get_meta(pos) + meta:set_int("jonez:style", i) + meta:set_string("jonez:element", element) +end + +local function on_punch(pos, player) + local wielded_item = player:get_wielded_item() + local wielded_item_name = wielded_item:get_name() + if wielded_item_name == "jonez:chisel" then + local meta = minetest.get_meta(pos) + local style = meta:get_int("jonez:style") + local element = meta:get_string("jonez:element") + style = style + 1 + if style > # styles then + style = 1 + end + minetest.set_node(pos, {name= "jonez:"..styles[style].."_"..element}) + minetest.sound_play("jonez_carve", {pos = pos, gain = 0.7, max_hear_distance = 5}) + end +end + +for i = 1, #styles do + + minetest.register_node("jonez:"..styles[i].."_architrave", { + description = S("Ancient").." "..S(firstToUpper(styles[i])).." "..S("Architrave"), + tiles = {"jonez_"..styles[i].."_top_bottom.png", "jonez_"..styles[i].."_top_bottom.png", "jonez_"..styles[i].."_architrave.png"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + on_construct = function(pos) + save_meta(pos, i, "architrave") + end, + on_punch = function(pos, node, player, pointed_thing) + on_punch(pos, player) + end, + }) + + minetest.register_node("jonez:"..styles[i].."_capital", { + description = S("Ancient").." "..S(firstToUpper(styles[i])).." "..S("Capital"), + tiles = {"jonez_"..styles[i].."_top_bottom.png", "jonez_"..styles[i].."_top_bottom.png", "jonez_"..styles[i].."_capital.png"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + on_construct = function(pos) + save_meta(pos, i, "capital") + end, + on_punch = function(pos, node, player, pointed_thing) + on_punch(pos, player) + end, + }) + + minetest.register_node("jonez:"..styles[i].."_shaft", { + description = S("Ancient").." "..S(firstToUpper(styles[i])).." "..S("Shaft"), + tiles = {"jonez_"..styles[i].."_top_bottom.png", "jonez_"..styles[i].."_top_bottom.png", "jonez_"..styles[i].."_shaft.png"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + on_construct = function(pos) + save_meta(pos, i, "shaft") + end, + on_punch = function(pos, node, player, pointed_thing) + on_punch(pos, player) + end, + }) + + minetest.register_node("jonez:"..styles[i].."_base", { + description = S("Ancient").." "..S(firstToUpper(styles[i])).." "..S("Base"), + tiles = {"jonez_"..styles[i].."_top_bottom.png", "jonez_"..styles[i].."_top_bottom.png", "jonez_"..styles[i].."_base.png"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + on_construct = function(pos) + save_meta(pos, i, "base") + end, + on_punch = function(pos, node, player, pointed_thing) + on_punch(pos, player) + end, + }) +end + +local vines = { + {name= "jonez:swedish_ivy", description= "Swedish Ivy", texture= "jonez_sweedish_ivy.png"}, + {name= "jonez:ruin_creeper", description= "Ruin Creeper", texture= "jonez_ruin_creeper.png"}, + {name= "jonez:ruin_vine", description= "Ruin Vine", texture= "jonez_ruin_vine.png"}, + {name= "jonez:climbing_rose", description= "Climbing Rose", texture= "jonez_climbing_rose.png"}, +} + +for i = 1, #vines do + minetest.register_node(vines[i].name, { + description = S(vines[i].description), + drawtype = "nodebox", + walkable = true, + paramtype = "light", + paramtype2 = "facedir", + tiles = {vines[i].texture}, + inventory_image = vines[i].texture, + wield_image = vines[i].texture, + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, 0.49, 0.5, 0.5, 0.5} + }, + groups = { + snappy = 2, flammable = 3, oddly_breakable_by_hand = 3, choppy = 2, carpet = 1, leafdecay = 3, leaves = 1 + }, + sounds = default.node_sound_leaves_defaults(), + }) +end + +local panels = { + {name= "jonez_panel_1", description= "Mosaic Glass Panel", texture="jonez_panel_1.png", + recipe = { + {"dye:blue", "dye:black", "dye:pink"}, + {"dye:red", "xpanes:pane_flat", "dye:green"}, + {"dye:yellow", "dye:black", "dye:orange"}, + } + }, + {name= "jonez_panel_2", description= "Blossom Glass Panel", texture="jonez_panel_2.png", + recipe = { + {"dye:blue", "dye:red", "dye:green"}, + {"dye:yellow", "xpanes:pane_flat", "dye:yellow"}, + {"dye:green", "dye:red", "dye:orange"}, + } + }, +} + +for j=1, #panels do + xpanes.register_pane(panels[j].name, { + description = S(panels[j].description), + textures = {panels[j].texture, "", "xpanes_edge.png"}, + inventory_image = panels[j].texture, + wield_image = panels[j].texture, + sounds = default.node_sound_glass_defaults(), + groups = {snappy=2, cracky=3, oddly_breakable_by_hand=3}, + recipe = panels[j].recipe + }) +end + +local pavements= { + {name= "jonez:blossom_pavement", description= "Ancient Blossom Pavement", texture= "jonez_blossom_pavement.png", + recipe = { + {'', 'stairs:slab_marble', ''}, + {'stairs:slab_marble', 'stairs:slab_marble', 'stairs:slab_marble'}, + {'', 'stairs:slab_marble', ''}, + } + }, + {name= "jonez:tiled_pavement", description= "Ancient Tiled Pavement", texture= "jonez_tiled_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', ''}, + } + }, +} + +for i = 1, #pavements do + minetest.register_node(pavements[i].name, { + description = S(pavements[i].description), + tiles = {pavements[i].texture}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + }) + minetest.register_craft({ + output = pavements[i].name, + type = 'shaped', + recipe = pavements[i].recipe, + }) +end diff --git a/locale/jonez.es.tr b/locale/jonez.es.tr new file mode 100644 index 0000000..f014de6 --- /dev/null +++ b/locale/jonez.es.tr @@ -0,0 +1,26 @@ +# textdomain: jonez +Ancient Marble=Mármol antiguo +Chisel for Marble=Cincel para mármol +Ancient=Antiguo +Architrave=Arquitrabe +Capital=Capitel +Shaft=Fuste +Base=Base +Roman=Romano +Greek=Griego +Germanic=Germánico +Tuscan=Toscano +Romanic=Románico +Ancient Marble Stair=Escalera de mármol antiguo +Ancient Marble Slab=Losa de mármol antiguo +Ancient Marble Brick Stair=Escalera de ladrillo de mármol antiguo +Ancient Marble Brick Slab=Losa de ladrillo de mármol antiguo +Swedish Ivy=Planta del dinero +Ruin Creeper=Enredadera de ruina +Ruin Vine=Vid de ruina +Climbing Rose=Rosal trepador +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 + diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..39e5234 --- /dev/null +++ b/mod.conf @@ -0,0 +1,3 @@ +name = jonez +depends = stairs, xpanes +optional_depends = diff --git a/sounds/jonez_carve.ogg b/sounds/jonez_carve.ogg new file mode 100644 index 0000000..33595e6 Binary files /dev/null and b/sounds/jonez_carve.ogg differ diff --git a/textures/jonez_blossom_pavement.png b/textures/jonez_blossom_pavement.png new file mode 100644 index 0000000..e05e8e7 Binary files /dev/null and b/textures/jonez_blossom_pavement.png differ diff --git a/textures/jonez_chisel.png b/textures/jonez_chisel.png new file mode 100644 index 0000000..2bd50c0 Binary files /dev/null and b/textures/jonez_chisel.png differ diff --git a/textures/jonez_climbing_rose.png b/textures/jonez_climbing_rose.png new file mode 100644 index 0000000..21945a0 Binary files /dev/null and b/textures/jonez_climbing_rose.png differ diff --git a/textures/jonez_germanic_architrave.png b/textures/jonez_germanic_architrave.png new file mode 100644 index 0000000..19f51de Binary files /dev/null and b/textures/jonez_germanic_architrave.png differ diff --git a/textures/jonez_germanic_base.png b/textures/jonez_germanic_base.png new file mode 100644 index 0000000..6c0c7a8 Binary files /dev/null and b/textures/jonez_germanic_base.png differ diff --git a/textures/jonez_germanic_capital.png b/textures/jonez_germanic_capital.png new file mode 100644 index 0000000..185013e Binary files /dev/null and b/textures/jonez_germanic_capital.png differ diff --git a/textures/jonez_germanic_shaft.png b/textures/jonez_germanic_shaft.png new file mode 100644 index 0000000..7f29fdb Binary files /dev/null and b/textures/jonez_germanic_shaft.png differ diff --git a/textures/jonez_germanic_top_bottom.png b/textures/jonez_germanic_top_bottom.png new file mode 100644 index 0000000..5f6c785 Binary files /dev/null and b/textures/jonez_germanic_top_bottom.png differ diff --git a/textures/jonez_greek_architrave.png b/textures/jonez_greek_architrave.png new file mode 100644 index 0000000..e4a3c6f Binary files /dev/null and b/textures/jonez_greek_architrave.png differ diff --git a/textures/jonez_greek_base.png b/textures/jonez_greek_base.png new file mode 100644 index 0000000..d407038 Binary files /dev/null and b/textures/jonez_greek_base.png differ diff --git a/textures/jonez_greek_capital.png b/textures/jonez_greek_capital.png new file mode 100644 index 0000000..19214b1 Binary files /dev/null and b/textures/jonez_greek_capital.png differ diff --git a/textures/jonez_greek_shaft.png b/textures/jonez_greek_shaft.png new file mode 100644 index 0000000..3cd7ecb Binary files /dev/null and b/textures/jonez_greek_shaft.png differ diff --git a/textures/jonez_greek_top_bottom.png b/textures/jonez_greek_top_bottom.png new file mode 100644 index 0000000..f1e73a2 Binary files /dev/null and b/textures/jonez_greek_top_bottom.png differ diff --git a/textures/jonez_marble.png b/textures/jonez_marble.png new file mode 100644 index 0000000..2164805 Binary files /dev/null and b/textures/jonez_marble.png differ diff --git a/textures/jonez_marble_brick.png b/textures/jonez_marble_brick.png new file mode 100644 index 0000000..88bb388 Binary files /dev/null and b/textures/jonez_marble_brick.png differ diff --git a/textures/jonez_marble_polished.png b/textures/jonez_marble_polished.png new file mode 100644 index 0000000..6cb0db9 Binary files /dev/null and b/textures/jonez_marble_polished.png differ diff --git a/textures/jonez_panel_1.png b/textures/jonez_panel_1.png new file mode 100644 index 0000000..fe98f0c Binary files /dev/null and b/textures/jonez_panel_1.png differ diff --git a/textures/jonez_panel_2.png b/textures/jonez_panel_2.png new file mode 100644 index 0000000..2626b80 Binary files /dev/null and b/textures/jonez_panel_2.png differ diff --git a/textures/jonez_roman_architrave.png b/textures/jonez_roman_architrave.png new file mode 100644 index 0000000..eaaff3a Binary files /dev/null and b/textures/jonez_roman_architrave.png differ diff --git a/textures/jonez_roman_base.png b/textures/jonez_roman_base.png new file mode 100644 index 0000000..786e29d Binary files /dev/null and b/textures/jonez_roman_base.png differ diff --git a/textures/jonez_roman_capital.png b/textures/jonez_roman_capital.png new file mode 100644 index 0000000..c715df0 Binary files /dev/null and b/textures/jonez_roman_capital.png differ diff --git a/textures/jonez_roman_shaft.png b/textures/jonez_roman_shaft.png new file mode 100644 index 0000000..42a5311 Binary files /dev/null and b/textures/jonez_roman_shaft.png differ diff --git a/textures/jonez_roman_top_bottom.png b/textures/jonez_roman_top_bottom.png new file mode 100644 index 0000000..ec3d62f Binary files /dev/null and b/textures/jonez_roman_top_bottom.png differ diff --git a/textures/jonez_romanic_architrave.png b/textures/jonez_romanic_architrave.png new file mode 100644 index 0000000..651d90c Binary files /dev/null and b/textures/jonez_romanic_architrave.png differ diff --git a/textures/jonez_romanic_base.png b/textures/jonez_romanic_base.png new file mode 100644 index 0000000..c779f84 Binary files /dev/null and b/textures/jonez_romanic_base.png differ diff --git a/textures/jonez_romanic_capital.png b/textures/jonez_romanic_capital.png new file mode 100644 index 0000000..8d49e58 Binary files /dev/null and b/textures/jonez_romanic_capital.png differ diff --git a/textures/jonez_romanic_shaft.png b/textures/jonez_romanic_shaft.png new file mode 100644 index 0000000..a444492 Binary files /dev/null and b/textures/jonez_romanic_shaft.png differ diff --git a/textures/jonez_romanic_top_bottom.png b/textures/jonez_romanic_top_bottom.png new file mode 100644 index 0000000..2bc37fa Binary files /dev/null and b/textures/jonez_romanic_top_bottom.png differ diff --git a/textures/jonez_ruin_creeper.png b/textures/jonez_ruin_creeper.png new file mode 100644 index 0000000..d6e7ff9 Binary files /dev/null and b/textures/jonez_ruin_creeper.png differ diff --git a/textures/jonez_ruin_vine.png b/textures/jonez_ruin_vine.png new file mode 100644 index 0000000..dba4849 Binary files /dev/null and b/textures/jonez_ruin_vine.png differ diff --git a/textures/jonez_sweedish_ivy.png b/textures/jonez_sweedish_ivy.png new file mode 100644 index 0000000..280f4c4 Binary files /dev/null and b/textures/jonez_sweedish_ivy.png differ diff --git a/textures/jonez_tiled_pavement.png b/textures/jonez_tiled_pavement.png new file mode 100644 index 0000000..896d61c Binary files /dev/null and b/textures/jonez_tiled_pavement.png differ diff --git a/textures/jonez_tuscan_architrave.png b/textures/jonez_tuscan_architrave.png new file mode 100644 index 0000000..bdb7f97 Binary files /dev/null and b/textures/jonez_tuscan_architrave.png differ diff --git a/textures/jonez_tuscan_base.png b/textures/jonez_tuscan_base.png new file mode 100644 index 0000000..5403a79 Binary files /dev/null and b/textures/jonez_tuscan_base.png differ diff --git a/textures/jonez_tuscan_capital.png b/textures/jonez_tuscan_capital.png new file mode 100644 index 0000000..8c81f80 Binary files /dev/null and b/textures/jonez_tuscan_capital.png differ diff --git a/textures/jonez_tuscan_shaft.png b/textures/jonez_tuscan_shaft.png new file mode 100644 index 0000000..9245227 Binary files /dev/null and b/textures/jonez_tuscan_shaft.png differ diff --git a/textures/jonez_tuscan_top_bottom.png b/textures/jonez_tuscan_top_bottom.png new file mode 100644 index 0000000..c5e2285 Binary files /dev/null and b/textures/jonez_tuscan_top_bottom.png differ