Slabs not buildable-to. Change player skin on spacesuit status. Tune footstep and breath check chances
This commit is contained in:
parent
e1764cf635
commit
095f21c312
46
README.txt
46
README.txt
@ -1,25 +1,16 @@
|
|||||||
moonrealm 0.9.2 by paramat
|
moonrealm 0.10.0 by paramat
|
||||||
For Minetest 0.4.12 or later
|
For Minetest 0.4.14 or later
|
||||||
Depends default
|
Depends default
|
||||||
Licenses: Code LGPL 2.1. Media CC BY-SA
|
Licenses: Code LGPL 2.1. Media CC BY-SA
|
||||||
|
|
||||||
|
|
||||||
Version changes:
|
|
||||||
|
|
||||||
Hlsource crafting bugfix.
|
|
||||||
Remove moonrealm:sapling crafting.
|
|
||||||
Moonrealm:appleleaf drops more saplings.
|
|
||||||
More items given on spawn.
|
|
||||||
Cleanup code.
|
|
||||||
|
|
||||||
|
|
||||||
Crafting
|
Crafting
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Spacesuit.
|
Spacesuit
|
||||||
To avoid drowning in the vacuum nodes put a spacesuit in your inventory.
|
To avoid drowning in the vacuum nodes put a spacesuit in your inventory.
|
||||||
|
|
||||||
Mesetinted helmet.
|
Mesetinted helmet
|
||||||
-C-
|
-C-
|
||||||
-G-
|
-G-
|
||||||
-S-
|
-S-
|
||||||
@ -27,14 +18,14 @@ C = default mese crystal (mese tint)
|
|||||||
G = default glass
|
G = default glass
|
||||||
S = default steel ingot
|
S = default steel ingot
|
||||||
|
|
||||||
Lifesupport backpack.
|
Lifesupport backpack
|
||||||
SSS
|
SSS
|
||||||
S-S
|
S-S
|
||||||
SMS
|
SMS
|
||||||
S = default steel ingot
|
S = default steel ingot
|
||||||
M = default mese block (power source)
|
M = default mese block (power source)
|
||||||
|
|
||||||
Spacesuit.
|
Spacesuit
|
||||||
WHW
|
WHW
|
||||||
-L-
|
-L-
|
||||||
W-W
|
W-W
|
||||||
@ -42,28 +33,28 @@ W = wool white (fabric)
|
|||||||
H = moonrealm helmet
|
H = moonrealm helmet
|
||||||
L = moonrealm lifesupport
|
L = moonrealm lifesupport
|
||||||
|
|
||||||
Moon stone brick x 4.
|
Moon stone brick x 4
|
||||||
MM
|
MM
|
||||||
MM
|
MM
|
||||||
M = moon stone
|
M = moon stone
|
||||||
|
|
||||||
Moon stone stair x 4.
|
Moon stone stair x 4
|
||||||
M
|
M
|
||||||
MM
|
MM
|
||||||
M = moon stone
|
M = moon stone
|
||||||
|
|
||||||
Moon stone slab x 4.
|
Moon stone slab x 4
|
||||||
MM
|
MM
|
||||||
M = moon stone
|
M = moon stone
|
||||||
|
|
||||||
Default furnace.
|
Default furnace
|
||||||
You can cook moon dust to moonrealm glass, use mese crystal as fuel.
|
You can cook moon dust to moonrealm glass, use mese crystal as fuel.
|
||||||
MMM
|
MMM
|
||||||
M-M
|
M-M
|
||||||
MMM
|
MMM
|
||||||
M = moon stone
|
M = moon stone
|
||||||
|
|
||||||
Airgen.
|
Airgen
|
||||||
Place in the centre of a sealed habitat.
|
Place in the centre of a sealed habitat.
|
||||||
Moonrealm air will spread to a distance of roughly 16 nodes.
|
Moonrealm air will spread to a distance of roughly 16 nodes.
|
||||||
SIS
|
SIS
|
||||||
@ -73,7 +64,7 @@ S = default steel ingot
|
|||||||
I = moonrealm waterice
|
I = moonrealm waterice
|
||||||
M = default mese block (power source)
|
M = default mese block (power source)
|
||||||
|
|
||||||
Airlock with light source.
|
Airlock with light source
|
||||||
Walk through it, life support air cannot pass through.
|
Walk through it, life support air cannot pass through.
|
||||||
S-S
|
S-S
|
||||||
SMS
|
SMS
|
||||||
@ -88,12 +79,19 @@ GGG
|
|||||||
G = moonrealm glass
|
G = moonrealm glass
|
||||||
M = default mese block (power source)
|
M = default mese block (power source)
|
||||||
|
|
||||||
Default water source.
|
Light x 1
|
||||||
Ice spawns in dust at mid to low altitudes.
|
GC
|
||||||
|
shapeless crafting
|
||||||
|
G = moonrealm glass
|
||||||
|
C = default mese crystal (power source)
|
||||||
|
|
||||||
|
Default water source
|
||||||
|
Ice spawns in dust at mid to low altitudes
|
||||||
I
|
I
|
||||||
|
shapeless crafting
|
||||||
I = moonrealm waterice
|
I = moonrealm waterice
|
||||||
|
|
||||||
Hydroponic liquid source.
|
Hydroponic liquid source
|
||||||
Hydroponic liquid will saturate the 5x5 node area of dust around it, to a depth of 5 nodes,
|
Hydroponic liquid will saturate the 5x5 node area of dust around it, to a depth of 5 nodes,
|
||||||
changing it to moonrealm soil. You can grow any farming mod crop in the soil.
|
changing it to moonrealm soil. You can grow any farming mod crop in the soil.
|
||||||
A depth of 2 soil nodes with moonrealm air above is needed for a moonrealm sapling to grow.
|
A depth of 2 soil nodes with moonrealm air above is needed for a moonrealm sapling to grow.
|
||||||
|
39
init.lua
39
init.lua
@ -113,17 +113,27 @@ minetest.register_on_mapgen_init(function(mgparams)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
-- Player positions
|
-- Player positions, spacesuit texture status
|
||||||
|
|
||||||
local player_pos = {}
|
local player_pos = {}
|
||||||
local player_pos_previous = {}
|
local player_pos_previous = {}
|
||||||
|
local player_spacesuit = {}
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
player_pos_previous[player:get_player_name()] = {x = 0, y = 0, z = 0}
|
player_pos_previous[player:get_player_name()] = {x = 0, y = 0, z = 0}
|
||||||
|
|
||||||
|
if player:get_inventory():contains_item("main", "moonrealm:spacesuit") then
|
||||||
|
player:set_properties({textures = {"moonrealm_space_character.png"}})
|
||||||
|
player_spacesuit[player:get_player_name()] = true
|
||||||
|
else
|
||||||
|
player:set_properties({textures = {"moonrealm_character.png"}})
|
||||||
|
player_spacesuit[player:get_player_name()] = false
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_on_leaveplayer(function(player)
|
minetest.register_on_leaveplayer(function(player)
|
||||||
player_pos_previous[player:get_player_name()] = nil
|
player_pos_previous[player:get_player_name()] = nil
|
||||||
|
player_spacesuit[player:get_player_name()] = nil
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
@ -131,8 +141,8 @@ end)
|
|||||||
|
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
for _, player in ipairs(minetest.get_connected_players()) do
|
for _, player in ipairs(minetest.get_connected_players()) do
|
||||||
if player_pos_previous[player:get_player_name()] ~= nil and -- footprints
|
if FOOT and math.random() < 0.2 and -- footprints
|
||||||
FOOT and math.random() < 0.3 then
|
player_pos_previous[player:get_player_name()] ~= nil then
|
||||||
local pos = player:getpos()
|
local pos = player:getpos()
|
||||||
player_pos[player:get_player_name()] = {
|
player_pos[player:get_player_name()] = {
|
||||||
x = math.floor(pos.x + 0.5),
|
x = math.floor(pos.x + 0.5),
|
||||||
@ -177,14 +187,25 @@ minetest.register_globalstep(function(dtime)
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
if math.random() < 0.1 then -- spacesuit restores breath
|
if math.random() < 0.04 then -- spacesuit restores breath, reset spacesuit texture
|
||||||
if player:get_inventory():contains_item("main", "moonrealm:spacesuit") and
|
if player:get_inventory():contains_item("main", "moonrealm:spacesuit") then
|
||||||
player:get_breath() < 10 then
|
if player:get_breath() < 10 then
|
||||||
player:set_breath(10)
|
player:set_breath(10)
|
||||||
|
end
|
||||||
|
|
||||||
|
if player_spacesuit[player:get_player_name()] == false then -- if no spacesuit texture, add
|
||||||
|
player:set_properties({textures = {"moonrealm_space_character.png"}})
|
||||||
|
player_spacesuit[player:get_player_name()] = true
|
||||||
|
end
|
||||||
|
else -- no spacesuit in inventory
|
||||||
|
if player_spacesuit[player:get_player_name()] == true then -- if spacesuit texture, remove
|
||||||
|
player:set_properties({textures = {"moonrealm_character.png"}})
|
||||||
|
player_spacesuit[player:get_player_name()] = false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if math.random() > 0.99 then -- set gravity, skybox and override light
|
if math.random() < 0.01 then -- set gravity, skybox and override light
|
||||||
local pos = player:getpos()
|
local pos = player:getpos()
|
||||||
if pos.y > YMIN and pos.y < YMAX then -- entering realm
|
if pos.y > YMIN and pos.y < YMAX then -- entering realm
|
||||||
player:set_physics_override(1, 0.6, 0.2) -- speed, jump, gravity
|
player:set_physics_override(1, 0.6, 0.2) -- speed, jump, gravity
|
||||||
@ -377,7 +398,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
vm:write_to_map(data)
|
vm:write_to_map(data)
|
||||||
|
|
||||||
local chugent = math.ceil((os.clock() - t1) * 1000)
|
local chugent = math.ceil((os.clock() - t1) * 1000)
|
||||||
print ("[moonrealm] "..chugent.." ms chunk ("..x0.." "..y0.." "..z0..")")
|
print ("[moonrealm] "..chugent.." ms")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
18
nodes.lua
18
nodes.lua
@ -277,7 +277,8 @@ minetest.register_node("moonrealm:light", {
|
|||||||
|
|
||||||
minetest.register_node("moonrealm:stonebrick", {
|
minetest.register_node("moonrealm:stonebrick", {
|
||||||
description = "Moon Stone Brick",
|
description = "Moon Stone Brick",
|
||||||
tiles = {"moonrealm_stonebricktop.png", "moonrealm_stonebrickbot.png", "moonrealm_stonebrick.png"},
|
tiles = {"moonrealm_stonebricktop.png", "moonrealm_stonebrickbot.png",
|
||||||
|
"moonrealm_stonebrick.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky=3},
|
groups = {cracky=3},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
@ -285,12 +286,12 @@ minetest.register_node("moonrealm:stonebrick", {
|
|||||||
|
|
||||||
minetest.register_node("moonrealm:stoneslab", {
|
minetest.register_node("moonrealm:stoneslab", {
|
||||||
description = "Moon Stone Slab",
|
description = "Moon Stone Slab",
|
||||||
tiles = {"moonrealm_stonebricktop.png", "moonrealm_stonebrickbot.png", "moonrealm_stonebrick.png"},
|
tiles = {"moonrealm_stonebricktop.png", "moonrealm_stonebrickbot.png",
|
||||||
|
"moonrealm_stonebrick.png"},
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
sunlight_propagates = true,
|
--sunlight_propagates = true,
|
||||||
buildable_to = true,
|
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
@ -309,7 +310,8 @@ minetest.register_node("moonrealm:stoneslab", {
|
|||||||
|
|
||||||
minetest.register_node("moonrealm:stonestair", {
|
minetest.register_node("moonrealm:stonestair", {
|
||||||
description = "Moon Stone Stair",
|
description = "Moon Stone Stair",
|
||||||
tiles = {"moonrealm_stonebricktop.png", "moonrealm_stonebrickbot.png", "moonrealm_stonebrick.png"},
|
tiles = {"moonrealm_stonebricktop.png", "moonrealm_stonebrickbot.png",
|
||||||
|
"moonrealm_stonebrick.png"},
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -465,6 +467,12 @@ minetest.register_craft({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "moonrealm:light 1",
|
||||||
|
recipe = {"moonrealm:glass", "default:mese_crystal"},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
-- Cooking
|
-- Cooking
|
||||||
|
|
||||||
|
BIN
textures/moonrealm_character.png
Normal file
BIN
textures/moonrealm_character.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
BIN
textures/moonrealm_space_character.png
Normal file
BIN
textures/moonrealm_space_character.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
Loading…
x
Reference in New Issue
Block a user