diff --git a/.luacheckrc b/.luacheckrc index 0270997..cee9996 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -1,7 +1,6 @@ -unused_args = false -allow_defined_top = true globals = { + "planet_mars", "planetoids", "vacuum", "skybox" diff --git a/init.lua b/init.lua index 07c6bf9..40b0a98 100644 --- a/init.lua +++ b/init.lua @@ -21,5 +21,6 @@ dofile(MP.."/ores.lua") dofile(MP.."/mapgen.lua") dofile(MP.."/skybox.lua") dofile(MP.."/vacuum.lua") +dofile(MP.."/marble.lua") print("[OK] Planet: mars (start: " .. planet_mars.y_start .. ", height:" .. planet_mars.y_height .. ")") diff --git a/mapgen.lua b/mapgen.lua index 2352e10..2651a6b 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -86,7 +86,7 @@ local mountain_perlin_map = {} local cave_perlin_map = {} local biome_perlin_map = {} -minetest.register_on_generated(function(minp, maxp, seed) +minetest.register_on_generated(function(minp, maxp) if minp.y < y_start or minp.y > (y_start + y_height) then -- not in range diff --git a/marble.lua b/marble.lua new file mode 100644 index 0000000..dfc5262 --- /dev/null +++ b/marble.lua @@ -0,0 +1,53 @@ + +for _, color in ipairs({"red", "blue", "black"}) do + + minetest.register_craft({ + output = "planet_mars:" .. color .. "marble_polished", + recipe = { + {"planet_mars:" .. color .. "marble"}, + } + }) + + minetest.register_craft({ + output = "planet_mars:" .. color .. "marble_bricks 4", + recipe = { + {"planet_mars:" .. color .. "marble", "planet_mars:" .. color .. "marble"}, + {"planet_mars:" .. color .. "marble", "planet_mars:" .. color .. "marble"}, + } + }) + + minetest.register_node("planet_mars:" .. color .. "marble_polished", { + description = "polished " .. color .. " marble", + tiles = {"planet_mars_" .. color .. "marble_polished.png"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + }) + + minetest.register_node("planet_mars:" .. color .. "marble_bricks", { + description = color .. " marble bricks", + tiles = {"planet_mars_" .. color .. "marble_bricks.png"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + }) + + minetest.register_node("planet_mars:" .. color .. "marble", { + description = color .. " marble", + tiles = {"planet_mars_" .. color .. "marble.png"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "planet_mars:" .. color .. "marble", + wherein = "default:desert_stone", + clust_scarcity = 7*7*7, + clust_num_ores = 5, + clust_size = 5, + y_max = planet_mars.y_start + planet_mars.y_height, + y_min = planet_mars.y_start, + }) +end diff --git a/readme.md b/readme.md index cee85e4..f3413ac 100644 --- a/readme.md +++ b/readme.md @@ -4,3 +4,8 @@ Planet mars mod for minetest # Overview Mapgen defaults to y 5000 to 11 000 + + +# License + +* textures/planet_mars_*marble https://forum.minetest.net/viewtopic.php?t=12798 diff --git a/textures/planet_mars_blackmarble.png b/textures/planet_mars_blackmarble.png new file mode 100644 index 0000000..83c3b6f Binary files /dev/null and b/textures/planet_mars_blackmarble.png differ diff --git a/textures/planet_mars_blackmarble_bricks.png b/textures/planet_mars_blackmarble_bricks.png new file mode 100644 index 0000000..dbf0a8d Binary files /dev/null and b/textures/planet_mars_blackmarble_bricks.png differ diff --git a/textures/planet_mars_blackmarble_polished.png b/textures/planet_mars_blackmarble_polished.png new file mode 100644 index 0000000..39d87ae Binary files /dev/null and b/textures/planet_mars_blackmarble_polished.png differ diff --git a/textures/planet_mars_bluemarble.png b/textures/planet_mars_bluemarble.png new file mode 100644 index 0000000..5f5b529 Binary files /dev/null and b/textures/planet_mars_bluemarble.png differ diff --git a/textures/planet_mars_bluemarble_bricks.png b/textures/planet_mars_bluemarble_bricks.png new file mode 100644 index 0000000..5a478d8 Binary files /dev/null and b/textures/planet_mars_bluemarble_bricks.png differ diff --git a/textures/planet_mars_bluemarble_polished.png b/textures/planet_mars_bluemarble_polished.png new file mode 100644 index 0000000..4eb3f3e Binary files /dev/null and b/textures/planet_mars_bluemarble_polished.png differ diff --git a/textures/planet_mars_redmarble.png b/textures/planet_mars_redmarble.png new file mode 100644 index 0000000..2d49d8c Binary files /dev/null and b/textures/planet_mars_redmarble.png differ diff --git a/textures/planet_mars_redmarble_bricks.png b/textures/planet_mars_redmarble_bricks.png new file mode 100644 index 0000000..1efa28e Binary files /dev/null and b/textures/planet_mars_redmarble_bricks.png differ diff --git a/textures/planet_mars_redmarble_polished.png b/textures/planet_mars_redmarble_polished.png new file mode 100644 index 0000000..fb59378 Binary files /dev/null and b/textures/planet_mars_redmarble_polished.png differ