Skip to content

Commit

Permalink
add marble
Browse files Browse the repository at this point in the history
partially attends to pandorabox-io/pandorabox.io#482
  • Loading branch information
BuckarooBanzay committed Apr 11, 2020
1 parent a88cae1 commit 89c03fa
Show file tree
Hide file tree
Showing 14 changed files with 61 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
unused_args = false
allow_defined_top = true

globals = {
"planet_mars",
"planetoids",
"vacuum",
"skybox"
Expand Down
1 change: 1 addition & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 .. ")")
2 changes: 1 addition & 1 deletion mapgen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
53 changes: 53 additions & 0 deletions marble.lua
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Binary file added textures/planet_mars_blackmarble.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added textures/planet_mars_blackmarble_bricks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added textures/planet_mars_blackmarble_polished.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added textures/planet_mars_bluemarble.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added textures/planet_mars_bluemarble_bricks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added textures/planet_mars_bluemarble_polished.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added textures/planet_mars_redmarble.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added textures/planet_mars_redmarble_bricks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added textures/planet_mars_redmarble_polished.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 89c03fa

Please sign in to comment.