Imported from trollstream "ContentDB"

master
OldCoder 2022-09-04 22:01:52 -07:00
commit 2afa9ce39e
11 changed files with 246 additions and 0 deletions

9
README.md Normal file
View File

@ -0,0 +1,9 @@
This mod replaces the default earthlike setting of Minetest with a generic moon of Saturn. Currently, this moon has not been named yet since I have not found a real moon of Saturn that is generic enough.
The only ores on the moon so far are iron, copper, tin, gold, and ice. Dungeons are still present, but the mossy cobblestone looks like ice.
This mod was an experiment to see the effects of changing a Minetest world into something otherworldly.
Since this mod only uses default blocks, virtually all texture packs are supported.
The code is licenced under LGPL 2.1 and the textures are licenced under CC-BY-SA. This mod was made by Red_King_Cyclops, but the textures are from Minetest Saturn by Foghrye4, the skybox code is modified code taken from https://forum.minetest.net/viewtopic.php?f=9&t=13775&hilit=skybox by emperor_genshin, and all of the ore registrations (except for the ice) are copied from default.

1
depends.txt Normal file
View File

@ -0,0 +1 @@
default

1
description.txt Normal file
View File

@ -0,0 +1 @@
Replaces Minetest's earthlike setting with a generic moon of Saturn.

235
init.lua Normal file
View File

@ -0,0 +1,235 @@
--SKY--
--Version 0.2
pos = {x=0, y=0, z=0}
local space = -31000 --value for space, change the value to however you like.
--The skybox for space, feel free to change it to however you like.
local spaceskybox = {
"sky_pos_y.png^[transform3",
"sky_neg_y.png^[transform1",
"sky_pos_z.png",
"sky_neg_z.png",
"sky_neg_x.png",
"sky_pos_x.png",
}
local time = 0
minetest.register_globalstep(function(dtime)
time = time + dtime
if time > 1 then for _, player in ipairs(minetest.get_connected_players()) do
time = 0
local name = player:get_player_name()
local pos = player:getpos()
--If the player has reached Space
if minetest.get_player_by_name(name) and pos.y >= space then
player:set_physics_override(1, 0.6, 0.2) -- speed, jump, gravity
player:set_sky({}, "skybox", spaceskybox) -- Sets skybox
player:set_clouds({density = 0})
--If the player is on Earth
elseif minetest.get_player_by_name(name) and pos.y < space then
player:set_physics_override(1, 1, 1) -- speed, jump, gravity [default]
player:set_sky({}, "regular", {}) -- Sets skybox, in this case it sets the skybox to it's default setting if and only if the player's Y value is less than the value of space.
player:set_clouds({density = 0.4})
end
end
end
end)
minetest.register_on_leaveplayer(function(player)
local name = player:get_player_name()
if name then
player:set_sky({}, "regular", {})
end
end)
--MAPGEN--
--minetest.clear_registered_ores()
minetest.clear_registered_biomes()
minetest.clear_registered_decorations()
minetest.override_item("default:mossycobble", {tiles = {"default_ice.png"}})
minetest.register_biome({
name = "saturn_moon",
node_dust = "default:gravel",
node_top = "default:stone",
depth_top = 1,
node_filler = "default:stone",
depth_filler = 3,
node_stone = "default:stone",
node_water_top = "air",
depth_water_top =1 ,
node_water = "air",
node_river_water = "air",
y_min = -31000,
y_max = 200,
heat_point = 50,
humidity_point = 50,
})
--[[
--the following ores were taken from default
-- Iron
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 9 * 9 * 9,
clust_num_ores = 12,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 7 * 7 * 7,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = 0,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 24 * 24 * 24,
clust_num_ores = 27,
clust_size = 6,
y_min = -31000,
y_max = -64,
})
-- Copper
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_copper",
wherein = "default:stone",
clust_scarcity = 9 * 9 * 9,
clust_num_ores = 5,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_copper",
wherein = "default:stone",
clust_scarcity = 12 * 12 * 12,
clust_num_ores = 4,
clust_size = 3,
y_min = -63,
y_max = -16,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_copper",
wherein = "default:stone",
clust_scarcity = 9 * 9 * 9,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -64,
})
-- Tin
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_tin",
wherein = "default:stone",
clust_scarcity = 10 * 10 * 10,
clust_num_ores = 5,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_tin",
wherein = "default:stone",
clust_scarcity = 13 * 13 * 13,
clust_num_ores = 4,
clust_size = 3,
y_min = -127,
y_max = -32,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_tin",
wherein = "default:stone",
clust_scarcity = 10 * 10 * 10,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -128,
})
-- Gold
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_gold",
wherein = "default:stone",
clust_scarcity = 13 * 13 * 13,
clust_num_ores = 5,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_gold",
wherein = "default:stone",
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 3,
clust_size = 2,
y_min = -255,
y_max = -64,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_gold",
wherein = "default:stone",
clust_scarcity = 13 * 13 * 13,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -256,
})
]]
--this is an original ore-- ice (although ice is taken from default)
minetest.register_ore({
ore_type = "scatter",
ore = "default:ice",
wherein = "default:stone",
clust_scarcity = 9 * 9 * 9,
clust_num_ores = 12,
clust_size = 3,
y_min = -31000,
y_max = 31000,
})

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

BIN
textures/sky_neg_x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1024 KiB

BIN
textures/sky_neg_y.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
textures/sky_neg_z.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 KiB

BIN
textures/sky_pos_x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

BIN
textures/sky_pos_y.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
textures/sky_pos_z.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB