Spacesuit texture. New mese texture. Vacuum/air floodable. Code style fixes
This commit is contained in:
parent
095f21c312
commit
6ec0ddbdc0
@ -1,14 +1,14 @@
|
|||||||
moonrealm 0.10.0 by paramat
|
moonrealm 0.10.0 by paramat
|
||||||
For Minetest 0.4.14 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 3.0
|
||||||
|
|
||||||
|
|
||||||
Crafting
|
Crafting
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Spacesuit
|
Spacesuit
|
||||||
To avoid drowning in the vacuum nodes put a spacesuit in your inventory.
|
To avoid asphyxiation in vacuum put a spacesuit in your inventory.
|
||||||
|
|
||||||
Mesetinted helmet
|
Mesetinted helmet
|
||||||
-C-
|
-C-
|
||||||
@ -100,4 +100,3 @@ LIL
|
|||||||
LLL
|
LLL
|
||||||
L = moonrealm appleleaf
|
L = moonrealm appleleaf
|
||||||
I = moonrealm waterice
|
I = moonrealm waterice
|
||||||
|
|
||||||
|
@ -12,10 +12,10 @@ function moonrealm_appletree(pos)
|
|||||||
local c_lsair = minetest.get_content_id("moonrealm:air")
|
local c_lsair = minetest.get_content_id("moonrealm:air")
|
||||||
|
|
||||||
local vm = minetest.get_voxel_manip()
|
local vm = minetest.get_voxel_manip()
|
||||||
local pos1 = {x=x-2, y=y-2, z=z-2}
|
local pos1 = {x = x - 2, y = y - 2, z = z - 2}
|
||||||
local pos2 = {x=x+2, y=y+5, z=z+2}
|
local pos2 = {x = x + 2, y = y + 5, z = z + 2}
|
||||||
local emin, emax = vm:read_from_map(pos1, pos2)
|
local emin, emax = vm:read_from_map(pos1, pos2)
|
||||||
local area = VoxelArea:new({MinEdge=emin, MaxEdge=emax})
|
local area = VoxelArea:new({MinEdge = emin, MaxEdge = emax})
|
||||||
local data = vm:get_data()
|
local data = vm:get_data()
|
||||||
|
|
||||||
for j = -2, -1 do -- check for soil
|
for j = -2, -1 do -- check for soil
|
||||||
@ -73,7 +73,7 @@ function moonrealm_appletree(pos)
|
|||||||
vm:write_to_map()
|
vm:write_to_map()
|
||||||
vm:update_map()
|
vm:update_map()
|
||||||
|
|
||||||
print ("[moonrealm] moonrealm apple tree sapling grows")
|
print ("[moonrealm] apple tree sapling grows")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -87,28 +87,29 @@ minetest.register_on_dignode(function(pos, oldnode, digger)
|
|||||||
local c_vacuum = minetest.get_content_id("moonrealm:vacuum")
|
local c_vacuum = minetest.get_content_id("moonrealm:vacuum")
|
||||||
|
|
||||||
local vm = minetest.get_voxel_manip()
|
local vm = minetest.get_voxel_manip()
|
||||||
local pos1 = {x=x-1, y=y-1, z=z-1}
|
local pos1 = {x = x - 1, y = y - 1, z = z - 1}
|
||||||
local pos2 = {x=x+1, y=y+1, z=z+1}
|
local pos2 = {x = x + 1, y = y + 1, z = z + 1}
|
||||||
local emin, emax = vm:read_from_map(pos1, pos2)
|
local emin, emax = vm:read_from_map(pos1, pos2)
|
||||||
local area = VoxelArea:new({MinEdge=emin, MaxEdge=emax})
|
local area = VoxelArea:new({MinEdge = emin, MaxEdge = emax})
|
||||||
local data = vm:get_data()
|
local data = vm:get_data()
|
||||||
|
|
||||||
local vic = area:index(x, y, z)
|
local vic = area:index(x, y, z)
|
||||||
for j = -1,1 do
|
|
||||||
for k = -1,1 do
|
for j = -1, 1 do
|
||||||
local vi = area:index(x-1, y+j, z+k)
|
for k = -1, 1 do
|
||||||
for i = -1,1 do
|
local vi = area:index(x - 1, y + j, z + k)
|
||||||
|
for i = -1, 1 do
|
||||||
if not (i == 0 and j == 0 and k == 0) then
|
if not (i == 0 and j == 0 and k == 0) then
|
||||||
local nodid = data[vi]
|
local nodid = data[vi]
|
||||||
if nodid == c_lsair then
|
if nodid == c_lsair then
|
||||||
local spread = minetest.get_meta({x=x+i,y=y+j,z=z+k}):get_int("spread")
|
local spread = minetest.get_meta({x = x + i, y = y + j, z = z + k}):get_int("spread")
|
||||||
if spread > 0 then
|
if spread > 0 then
|
||||||
data[vic] = c_lsair
|
data[vic] = c_lsair
|
||||||
minetest.get_meta(pos):set_int("spread", (spread - 1))
|
minetest.get_meta(pos):set_int("spread", (spread - 1))
|
||||||
vm:set_data(data)
|
vm:set_data(data)
|
||||||
vm:write_to_map()
|
vm:write_to_map()
|
||||||
vm:update_map()
|
vm:update_map()
|
||||||
print ("[moonrealm] moonrealm air flows into hole")
|
print ("[moonrealm] air flows into hole")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -118,10 +119,12 @@ minetest.register_on_dignode(function(pos, oldnode, digger)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
data[vic] = c_vacuum
|
data[vic] = c_vacuum
|
||||||
|
|
||||||
vm:set_data(data)
|
vm:set_data(data)
|
||||||
vm:write_to_map()
|
vm:write_to_map()
|
||||||
vm:update_map()
|
vm:update_map()
|
||||||
print ("[moonrealm] moonrealm vacuum flows into hole")
|
|
||||||
|
print ("[moonrealm] vacuum flows into hole")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
@ -145,22 +148,22 @@ minetest.register_abm({
|
|||||||
local c_vacuum = minetest.get_content_id("moonrealm:vacuum")
|
local c_vacuum = minetest.get_content_id("moonrealm:vacuum")
|
||||||
|
|
||||||
local vm = minetest.get_voxel_manip()
|
local vm = minetest.get_voxel_manip()
|
||||||
local pos1 = {x=x-1, y=y-1, z=z-1}
|
local pos1 = {x = x - 1, y = y - 1, z = z - 1}
|
||||||
local pos2 = {x=x+1, y=y+1, z=z+1}
|
local pos2 = {x = x + 1, y = y + 1, z = z + 1}
|
||||||
local emin, emax = vm:read_from_map(pos1, pos2)
|
local emin, emax = vm:read_from_map(pos1, pos2)
|
||||||
local area = VoxelArea:new({MinEdge=emin, MaxEdge=emax})
|
local area = VoxelArea:new({MinEdge = emin, MaxEdge = emax})
|
||||||
local data = vm:get_data()
|
local data = vm:get_data()
|
||||||
|
|
||||||
for j = -1,1 do
|
for j = -1, 1 do
|
||||||
for k = -1,1 do
|
for k = -1, 1 do
|
||||||
local vi = area:index(x-1, y+j, z+k)
|
local vi = area:index(x - 1, y + j, z + k)
|
||||||
for i = -1,1 do
|
for i = -1, 1 do
|
||||||
if not (i == 0 and j == 0 and k == 0) then
|
if not (i == 0 and j == 0 and k == 0) then
|
||||||
local nodid = data[vi]
|
local nodid = data[vi]
|
||||||
if nodid == c_vacuum then
|
if nodid == c_vacuum then
|
||||||
data[vi] = c_lsair
|
data[vi] = c_lsair
|
||||||
minetest.get_meta({x=x+i,y=y+j,z=z+k}):set_int("spread", (spread - 1))
|
minetest.get_meta({x = x + i, y = y + j, z = z + k}):set_int("spread", (spread - 1))
|
||||||
print ("[moonrealm] moonrealm air spreads")
|
print ("[moonrealm] air spreads")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
vi = vi + 1
|
vi = vi + 1
|
||||||
@ -193,16 +196,16 @@ minetest.register_abm({
|
|||||||
local c_soil = minetest.get_content_id("moonrealm:soil")
|
local c_soil = minetest.get_content_id("moonrealm:soil")
|
||||||
|
|
||||||
local vm = minetest.get_voxel_manip()
|
local vm = minetest.get_voxel_manip()
|
||||||
local pos1 = {x=x-2, y=y-4, z=z-2}
|
local pos1 = {x = x - 2, y = y - 4, z = z - 2}
|
||||||
local pos2 = {x=x+2, y=y, z=z+2}
|
local pos2 = {x = x + 2, y = y, z = z + 2}
|
||||||
local emin, emax = vm:read_from_map(pos1, pos2)
|
local emin, emax = vm:read_from_map(pos1, pos2)
|
||||||
local area = VoxelArea:new({MinEdge=emin, MaxEdge=emax})
|
local area = VoxelArea:new({MinEdge = emin, MaxEdge = emax})
|
||||||
local data = vm:get_data()
|
local data = vm:get_data()
|
||||||
|
|
||||||
for j = -4,0 do
|
for j = -4, 0 do
|
||||||
for k = -2,2 do
|
for k = -2, 2 do
|
||||||
local vi = area:index(x-2, y+j, z+k)
|
local vi = area:index(x - 2, y + j, z + k)
|
||||||
for i = -2,2 do
|
for i = -2, 2 do
|
||||||
if not (i == 0 and j == 0 and k == 0) then
|
if not (i == 0 and j == 0 and k == 0) then
|
||||||
local nodid = data[vi]
|
local nodid = data[vi]
|
||||||
if nodid == c_dust
|
if nodid == c_dust
|
||||||
@ -238,16 +241,16 @@ minetest.register_abm({
|
|||||||
local c_hlsource = minetest.get_content_id("moonrealm:hlsource")
|
local c_hlsource = minetest.get_content_id("moonrealm:hlsource")
|
||||||
|
|
||||||
local vm = minetest.get_voxel_manip()
|
local vm = minetest.get_voxel_manip()
|
||||||
local pos1 = {x=x-2, y=y, z=z-2}
|
local pos1 = {x = x - 2, y = y, z = z - 2}
|
||||||
local pos2 = {x=x+2, y=y+4, z=z+2}
|
local pos2 = {x = x + 2, y = y + 4, z = z + 2}
|
||||||
local emin, emax = vm:read_from_map(pos1, pos2)
|
local emin, emax = vm:read_from_map(pos1, pos2)
|
||||||
local area = VoxelArea:new({MinEdge=emin, MaxEdge=emax})
|
local area = VoxelArea:new({MinEdge = emin, MaxEdge = emax})
|
||||||
local data = vm:get_data()
|
local data = vm:get_data()
|
||||||
|
|
||||||
local vic = area:index(x, y, z)
|
local vic = area:index(x, y, z)
|
||||||
for j = 0, 4 do
|
for j = 0, 4 do
|
||||||
for k = -2, 2 do
|
for k = -2, 2 do
|
||||||
local vi = area:index(x-2, y+j, z+k)
|
local vi = area:index(x - 2, y + j, z + k)
|
||||||
for i = -2, 2 do
|
for i = -2, 2 do
|
||||||
if not (i == 0 and j == 0 and k == 0) then
|
if not (i == 0 and j == 0 and k == 0) then
|
||||||
local nodid = data[vi]
|
local nodid = data[vi]
|
||||||
@ -259,13 +262,14 @@ minetest.register_abm({
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
data[vic] = c_dust
|
data[vic] = c_dust
|
||||||
|
|
||||||
vm:set_data(data)
|
vm:set_data(data)
|
||||||
vm:write_to_map()
|
vm:write_to_map()
|
||||||
vm:update_map()
|
vm:update_map()
|
||||||
|
|
||||||
print ("[moonrealm] moonrealm soil dries")
|
print ("[moonrealm] soil dries")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -280,4 +284,3 @@ minetest.register_abm({
|
|||||||
moonrealm_appletree(pos)
|
moonrealm_appletree(pos)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
75
init.lua
75
init.lua
@ -15,9 +15,9 @@ local HEXP = 0.5 -- Noise offset exponent above gradcen, 1 = normal 3D perlin te
|
|||||||
local LEXP = 2 -- Noise offset exponent below gradcen
|
local LEXP = 2 -- Noise offset exponent below gradcen
|
||||||
local STOT = 0.04 -- Stone density threshold, depth of dust
|
local STOT = 0.04 -- Stone density threshold, depth of dust
|
||||||
|
|
||||||
local ICECHA = 1 / (13*13*13) -- Ice chance per dust node at terrain centre, decreases with altitude
|
local ICECHA = 1 / (13 * 13 * 13) -- Ice chance per dust node at terrain centre, decreases with altitude
|
||||||
local ICEGRAD = 128 -- Ice gradient, vertical distance for no ice
|
local ICEGRAD = 128 -- Ice gradient, vertical distance for no ice
|
||||||
local ORECHA = 7*7*7 -- Ore 1/x chance per stone node
|
local ORECHA = 7 * 7 * 7 -- Ore 1/x chance per stone node
|
||||||
local TFIS = 0.01 -- Fissure threshold. Controls size of fissures
|
local TFIS = 0.01 -- Fissure threshold. Controls size of fissures
|
||||||
local FOOT = true -- Footprints in dust
|
local FOOT = true -- Footprints in dust
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ local FOOT = true -- Footprints in dust
|
|||||||
local np_terrain = {
|
local np_terrain = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
scale = 1,
|
scale = 1,
|
||||||
spread = {x=512, y=512, z=512},
|
spread = {x = 512, y = 512, z = 512},
|
||||||
seed = 58588900033,
|
seed = 58588900033,
|
||||||
octaves = 6,
|
octaves = 6,
|
||||||
persist = 0.67
|
persist = 0.67
|
||||||
@ -37,7 +37,7 @@ local np_terrain = {
|
|||||||
local np_terralt = {
|
local np_terralt = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
scale = 1,
|
scale = 1,
|
||||||
spread = {x=414, y=414, z=414},
|
spread = {x = 414, y = 414, z = 414},
|
||||||
seed = 13331930910,
|
seed = 13331930910,
|
||||||
octaves = 6,
|
octaves = 6,
|
||||||
persist = 0.67
|
persist = 0.67
|
||||||
@ -48,7 +48,7 @@ local np_terralt = {
|
|||||||
local np_smooth = {
|
local np_smooth = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
scale = 1,
|
scale = 1,
|
||||||
spread = {x=828, y=828, z=828},
|
spread = {x = 828, y = 828, z = 828},
|
||||||
seed = 113,
|
seed = 113,
|
||||||
octaves = 4,
|
octaves = 4,
|
||||||
persist = 0.4
|
persist = 0.4
|
||||||
@ -59,7 +59,7 @@ local np_smooth = {
|
|||||||
local np_fissure = {
|
local np_fissure = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
scale = 1,
|
scale = 1,
|
||||||
spread = {x=256, y=256, z=256},
|
spread = {x = 256, y = 256, z = 256},
|
||||||
seed = 8181112,
|
seed = 8181112,
|
||||||
octaves = 5,
|
octaves = 5,
|
||||||
persist = 0.5
|
persist = 0.5
|
||||||
@ -71,7 +71,7 @@ local np_fissure = {
|
|||||||
local np_fault = {
|
local np_fault = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
scale = 1,
|
scale = 1,
|
||||||
spread = {x=414, y=828, z=414},
|
spread = {x = 414, y = 828, z = 414},
|
||||||
seed = 14440002,
|
seed = 14440002,
|
||||||
octaves = 4,
|
octaves = 4,
|
||||||
persist = 0.5
|
persist = 0.5
|
||||||
@ -82,7 +82,7 @@ local np_fault = {
|
|||||||
local np_gradcen = {
|
local np_gradcen = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
scale = 1,
|
scale = 1,
|
||||||
spread = {x=1024, y=1024, z=1024},
|
spread = {x = 1024, y = 1024, z = 1024},
|
||||||
seed = 9344,
|
seed = 9344,
|
||||||
octaves = 4,
|
octaves = 4,
|
||||||
persist = 0.4
|
persist = 0.4
|
||||||
@ -93,7 +93,7 @@ local np_gradcen = {
|
|||||||
local np_terblen = {
|
local np_terblen = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
scale = 1,
|
scale = 1,
|
||||||
spread = {x=2048, y=2048, z=2048},
|
spread = {x = 2048, y = 2048, z = 2048},
|
||||||
seed = -13002,
|
seed = -13002,
|
||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.4
|
persist = 0.4
|
||||||
@ -102,15 +102,13 @@ local np_terblen = {
|
|||||||
|
|
||||||
-- Do files
|
-- Do files
|
||||||
|
|
||||||
dofile(minetest.get_modpath("moonrealm").."/nodes.lua")
|
dofile(minetest.get_modpath("moonrealm") .. "/nodes.lua")
|
||||||
dofile(minetest.get_modpath("moonrealm").."/functions.lua")
|
dofile(minetest.get_modpath("moonrealm") .. "/functions.lua")
|
||||||
|
|
||||||
|
|
||||||
-- Set mapgen parameters
|
-- Set mapgen parameters
|
||||||
|
|
||||||
minetest.register_on_mapgen_init(function(mgparams)
|
minetest.set_mapgen_params({mgname = "singlenode", water_level = -32000})
|
||||||
minetest.set_mapgen_params({mgname="singlenode", water_level=-32000})
|
|
||||||
end)
|
|
||||||
|
|
||||||
|
|
||||||
-- Player positions, spacesuit texture status
|
-- Player positions, spacesuit texture status
|
||||||
@ -217,7 +215,7 @@ minetest.register_globalstep(function(dtime)
|
|||||||
"moonrealm_negx.png",
|
"moonrealm_negx.png",
|
||||||
"moonrealm_posx.png",
|
"moonrealm_posx.png",
|
||||||
}
|
}
|
||||||
player:set_sky({r=0, g=0, b=0, a=0}, "skybox", skytextures)
|
player:set_sky({r = 0, g = 0, b = 0, a = 0}, "skybox", skytextures)
|
||||||
player:override_day_night_ratio(1)
|
player:override_day_night_ratio(1)
|
||||||
else -- on leaving realm
|
else -- on leaving realm
|
||||||
player:set_physics_override(1, 1, 1)
|
player:set_physics_override(1, 1, 1)
|
||||||
@ -259,7 +257,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
local z0 = minp.z
|
local z0 = minp.z
|
||||||
|
|
||||||
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
|
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
|
||||||
local area = VoxelArea:new{MinEdge=emin, MaxEdge=emax}
|
local area = VoxelArea:new{MinEdge = emin, MaxEdge = emax}
|
||||||
local data = vm:get_data()
|
local data = vm:get_data()
|
||||||
|
|
||||||
local c_air = minetest.get_content_id("air")
|
local c_air = minetest.get_content_id("air")
|
||||||
@ -301,8 +299,10 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
local ni3d = 1
|
local ni3d = 1
|
||||||
local ni2d = 1
|
local ni2d = 1
|
||||||
local stable = {}
|
local stable = {}
|
||||||
|
|
||||||
for z = z0, z1 do
|
for z = z0, z1 do
|
||||||
local viu = area:index(x0, y0 - 1, z)
|
local viu = area:index(x0, y0 - 1, z)
|
||||||
|
|
||||||
for x = x0, x1 do
|
for x = x0, x1 do
|
||||||
local si = x - x0 + 1
|
local si = x - x0 + 1
|
||||||
local nodid = data[viu]
|
local nodid = data[viu]
|
||||||
@ -313,32 +313,37 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
end
|
end
|
||||||
viu = viu + 1
|
viu = viu + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
for y = y0, y1 do
|
for y = y0, y1 do
|
||||||
local vi = area:index(x0, y, z) -- LVM index for first node in x row
|
local vi = area:index(x0, y, z) -- LVM index for first node in x row
|
||||||
local icecha = ICECHA * (1 + (GRADCEN - y) / ICEGRAD)
|
local icecha = ICECHA * (1 + (GRADCEN - y) / ICEGRAD)
|
||||||
|
|
||||||
for x = x0, x1 do
|
for x = x0, x1 do
|
||||||
local nodid = data[vi]
|
local nodid = data[vi]
|
||||||
local empty = (nodid == c_air or nodid == c_ignore)
|
local empty = (nodid == c_air or nodid == c_ignore)
|
||||||
local grad
|
local grad
|
||||||
local density
|
local density
|
||||||
local si = x - x0 + 1
|
local si = x - x0 + 1
|
||||||
local terblen = math.max(math.min(math.abs(nvals_terblen[ni2d]) * 4,
|
local terblen = math.max(math.min(
|
||||||
1.5), 0.5) - 0.5
|
math.abs(nvals_terblen[ni2d]) * 4, 1.5), 0.5) - 0.5
|
||||||
local gradcen = GRADCEN + nvals_gradcen[ni2d] * CENAMP
|
local gradcen = GRADCEN + nvals_gradcen[ni2d] * CENAMP
|
||||||
|
|
||||||
if y > gradcen then
|
if y > gradcen then
|
||||||
grad = -((y - gradcen) / HIGRAD) ^ HEXP
|
grad = -((y - gradcen) / HIGRAD) ^ HEXP
|
||||||
else
|
else
|
||||||
grad = ((gradcen - y) / LOGRAD) ^ LEXP
|
grad = ((gradcen - y) / LOGRAD) ^ LEXP
|
||||||
end
|
end
|
||||||
|
|
||||||
if nvals_fault[ni3d] >= 0 then
|
if nvals_fault[ni3d] >= 0 then
|
||||||
density = (nvals_terrain[ni3d] +
|
density = (nvals_terrain[ni3d] +
|
||||||
nvals_terralt[ni3d]) / 2 * (1 - terblen)
|
nvals_terralt[ni3d]) / 2 * (1 - terblen) +
|
||||||
+ nvals_smooth[ni3d] * terblen + grad
|
nvals_smooth[ni3d] * terblen + grad
|
||||||
else
|
else
|
||||||
density = (nvals_terrain[ni3d] -
|
density = (nvals_terrain[ni3d] -
|
||||||
nvals_terralt[ni3d]) / 2 * (1 - terblen)
|
nvals_terralt[ni3d]) / 2 * (1 - terblen) -
|
||||||
- nvals_smooth[ni3d] * terblen + grad
|
nvals_smooth[ni3d] * terblen + grad
|
||||||
end
|
end
|
||||||
|
|
||||||
if density > 0 and empty then -- if terrain and node empty
|
if density > 0 and empty then -- if terrain and node empty
|
||||||
local nofis = false
|
local nofis = false
|
||||||
if math.abs(nvals_fissure[ni3d]) > TFIS then
|
if math.abs(nvals_fissure[ni3d]) > TFIS then
|
||||||
@ -383,6 +388,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
end
|
end
|
||||||
stable[si] = false
|
stable[si] = false
|
||||||
end
|
end
|
||||||
|
|
||||||
ni3d = ni3d + 1
|
ni3d = ni3d + 1
|
||||||
ni2d = ni2d + 1
|
ni2d = ni2d + 1
|
||||||
vi = vi + 1
|
vi = vi + 1
|
||||||
@ -398,7 +404,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")
|
print ("[moonrealm] " .. chugent .. " ms")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
@ -419,7 +425,7 @@ function moonrealm_spawnplayer(player)
|
|||||||
local nobj_gradcen = nil
|
local nobj_gradcen = nil
|
||||||
|
|
||||||
for chunk = 1, 64 do
|
for chunk = 1, 64 do
|
||||||
print ("[moonrealm] searching for spawn "..chunk)
|
print ("[moonrealm] searching for spawn " .. chunk)
|
||||||
|
|
||||||
local x0 = 80 * math.random(-PSCA, PSCA) - 32
|
local x0 = 80 * math.random(-PSCA, PSCA) - 32
|
||||||
local z0 = 80 * math.random(-PSCA, PSCA) - 32
|
local z0 = 80 * math.random(-PSCA, PSCA) - 32
|
||||||
@ -453,29 +459,33 @@ function moonrealm_spawnplayer(player)
|
|||||||
local ni3d = 1
|
local ni3d = 1
|
||||||
local ni2d = 1
|
local ni2d = 1
|
||||||
local stable = {}
|
local stable = {}
|
||||||
|
|
||||||
for z = z0, z1 do
|
for z = z0, z1 do
|
||||||
for y = y0, y1 do
|
for y = y0, y1 do
|
||||||
for x = x0, x1 do
|
for x = x0, x1 do
|
||||||
local si = x - x0 + 1
|
local si = x - x0 + 1
|
||||||
local grad
|
local grad
|
||||||
local density
|
local density
|
||||||
local terblen = math.max(math.min(math.abs(nvals_terblen[ni2d]) * 4,
|
local terblen = math.max(math.min(
|
||||||
1.5), 0.5) - 0.5
|
math.abs(nvals_terblen[ni2d]) * 4, 1.5), 0.5) - 0.5
|
||||||
local gradcen = GRADCEN + nvals_gradcen[ni2d] * CENAMP
|
local gradcen = GRADCEN + nvals_gradcen[ni2d] * CENAMP
|
||||||
|
|
||||||
if y > gradcen then
|
if y > gradcen then
|
||||||
grad = -((y - gradcen) / HIGRAD) ^ HEXP
|
grad = -((y - gradcen) / HIGRAD) ^ HEXP
|
||||||
else
|
else
|
||||||
grad = ((gradcen - y) / LOGRAD) ^ LEXP
|
grad = ((gradcen - y) / LOGRAD) ^ LEXP
|
||||||
end
|
end
|
||||||
|
|
||||||
if nvals_fault[ni3d] >= 0 then
|
if nvals_fault[ni3d] >= 0 then
|
||||||
density = (nvals_terrain[ni3d] +
|
density = (nvals_terrain[ni3d] +
|
||||||
nvals_terralt[ni3d]) / 2 * (1 - terblen)
|
nvals_terralt[ni3d]) / 2 * (1 - terblen) +
|
||||||
+ nvals_smooth[ni3d] * terblen + grad
|
nvals_smooth[ni3d] * terblen + grad
|
||||||
else
|
else
|
||||||
density = (nvals_terrain[ni3d] -
|
density = (nvals_terrain[ni3d] -
|
||||||
nvals_terralt[ni3d]) / 2 * (1 - terblen)
|
nvals_terralt[ni3d]) / 2 * (1 - terblen) -
|
||||||
- nvals_smooth[ni3d] * terblen + grad
|
nvals_smooth[ni3d] * terblen + grad
|
||||||
end
|
end
|
||||||
|
|
||||||
if density >= STOT then
|
if density >= STOT then
|
||||||
stable[si] = true
|
stable[si] = true
|
||||||
elseif stable[si] and density < 0 and terblen == 1 then
|
elseif stable[si] and density < 0 and terblen == 1 then
|
||||||
@ -484,6 +494,7 @@ function moonrealm_spawnplayer(player)
|
|||||||
zsp = z
|
zsp = z
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
ni3d = ni3d + 1
|
ni3d = ni3d + 1
|
||||||
ni2d = ni2d + 1
|
ni2d = ni2d + 1
|
||||||
end
|
end
|
||||||
@ -502,7 +513,7 @@ function moonrealm_spawnplayer(player)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
print ("[moonrealm] spawn player ("..xsp.." "..ysp.." "..zsp..")")
|
print ("[moonrealm] spawn player (" .. xsp .. " " .. ysp .. " " .. zsp .. ")")
|
||||||
player:setpos({x = xsp, y = ysp, z = zsp})
|
player:setpos({x = xsp, y = ysp, z = zsp})
|
||||||
|
|
||||||
minetest.add_item({x = xsp, y = ysp + 1, z = zsp}, "moonrealm:spacesuit 4")
|
minetest.add_item({x = xsp, y = ysp + 1, z = zsp}, "moonrealm:spacesuit 4")
|
||||||
@ -547,6 +558,7 @@ function moonrealm_spawnplayer(player)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
vm:set_data(data)
|
vm:set_data(data)
|
||||||
vm:write_to_map()
|
vm:write_to_map()
|
||||||
vm:update_map()
|
vm:update_map()
|
||||||
@ -561,4 +573,3 @@ minetest.register_on_respawnplayer(function(player)
|
|||||||
moonrealm_spawnplayer(player)
|
moonrealm_spawnplayer(player)
|
||||||
return true
|
return true
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
License of source code
|
License of source code
|
||||||
----------------------
|
----------------------
|
||||||
Copyright (C) 2014-2015 paramat
|
Copyright (C) 2014-2016 paramat
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
@ -18,7 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
|
|
||||||
License of media (textures)
|
License of media (textures)
|
||||||
---------------------------
|
---------------------------
|
||||||
Copyright (C) 2014-2015 paramat
|
Copyright (C) 2014-2016 paramat
|
||||||
|
|
||||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||||
http://creativecommons.org/licenses/by-sa/3.0/
|
http://creativecommons.org/licenses/by-sa/3.0/
|
||||||
|
79
nodes.lua
79
nodes.lua
@ -2,7 +2,7 @@ minetest.register_node("moonrealm:stone", {
|
|||||||
description = "Moon Stone",
|
description = "Moon Stone",
|
||||||
tiles = {"moonrealm_stone.png"},
|
tiles = {"moonrealm_stone.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(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ minetest.register_node("moonrealm:ironore", {
|
|||||||
description = "Iron Ore",
|
description = "Iron Ore",
|
||||||
tiles = {"moonrealm_stone.png^default_mineral_iron.png"},
|
tiles = {"moonrealm_stone.png^default_mineral_iron.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky=2},
|
groups = {cracky = 2},
|
||||||
drop = "default:iron_lump",
|
drop = "default:iron_lump",
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
@ -19,7 +19,7 @@ minetest.register_node("moonrealm:copperore", {
|
|||||||
description = "Copper Ore",
|
description = "Copper Ore",
|
||||||
tiles = {"moonrealm_stone.png^default_mineral_copper.png"},
|
tiles = {"moonrealm_stone.png^default_mineral_copper.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky=2},
|
groups = {cracky = 2},
|
||||||
drop = "default:copper_lump",
|
drop = "default:copper_lump",
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
@ -28,7 +28,7 @@ minetest.register_node("moonrealm:goldore", {
|
|||||||
description = "Gold Ore",
|
description = "Gold Ore",
|
||||||
tiles = {"moonrealm_stone.png^default_mineral_gold.png"},
|
tiles = {"moonrealm_stone.png^default_mineral_gold.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky=2},
|
groups = {cracky = 2},
|
||||||
drop = "default:gold_lump",
|
drop = "default:gold_lump",
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
@ -37,7 +37,7 @@ minetest.register_node("moonrealm:diamondore", {
|
|||||||
description = "Diamond Ore",
|
description = "Diamond Ore",
|
||||||
tiles = {"moonrealm_stone.png^default_mineral_diamond.png"},
|
tiles = {"moonrealm_stone.png^default_mineral_diamond.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky=1},
|
groups = {cracky = 1},
|
||||||
drop = "default:diamond",
|
drop = "default:diamond",
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
@ -48,7 +48,7 @@ minetest.register_node("moonrealm:mese", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
light_source = 3,
|
light_source = 3,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky=1, level=2},
|
groups = {cracky = 1, level = 2},
|
||||||
drop = "default:mese",
|
drop = "default:mese",
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
@ -57,9 +57,9 @@ minetest.register_node("moonrealm:dust", {
|
|||||||
description = "Moon Dust",
|
description = "Moon Dust",
|
||||||
tiles = {"moonrealm_dust.png"},
|
tiles = {"moonrealm_dust.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {crumbly=3},
|
groups = {crumbly = 3},
|
||||||
sounds = default.node_sound_sand_defaults({
|
sounds = default.node_sound_sand_defaults({
|
||||||
footstep = {name="default_sand_footstep", gain=0.05},
|
footstep = {name = "default_sand_footstep", gain = 0.05},
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -67,10 +67,10 @@ minetest.register_node("moonrealm:dustprint1", {
|
|||||||
description = "Moon Dust Footprint1",
|
description = "Moon Dust Footprint1",
|
||||||
tiles = {"moonrealm_dustprint1.png", "moonrealm_dust.png"},
|
tiles = {"moonrealm_dustprint1.png", "moonrealm_dust.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {crumbly=3},
|
groups = {crumbly = 3},
|
||||||
drop = "moonrealm:dust",
|
drop = "moonrealm:dust",
|
||||||
sounds = default.node_sound_sand_defaults({
|
sounds = default.node_sound_sand_defaults({
|
||||||
footstep = {name="default_sand_footstep", gain=0.05},
|
footstep = {name = "default_sand_footstep", gain = 0.05},
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -78,10 +78,10 @@ minetest.register_node("moonrealm:dustprint2", {
|
|||||||
description = "Moon Dust Footprint2",
|
description = "Moon Dust Footprint2",
|
||||||
tiles = {"moonrealm_dustprint2.png", "moonrealm_dust.png"},
|
tiles = {"moonrealm_dustprint2.png", "moonrealm_dust.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {crumbly=3},
|
groups = {crumbly = 3},
|
||||||
drop = "moonrealm:dust",
|
drop = "moonrealm:dust",
|
||||||
sounds = default.node_sound_sand_defaults({
|
sounds = default.node_sound_sand_defaults({
|
||||||
footstep = {name="default_sand_footstep", gain=0.05},
|
footstep = {name = "default_sand_footstep", gain = 0.05},
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -95,6 +95,7 @@ minetest.register_node("moonrealm:vacuum", {
|
|||||||
pointable = false,
|
pointable = false,
|
||||||
diggable = false,
|
diggable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
|
floodable = true,
|
||||||
drowning = 1,
|
drowning = 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -109,13 +110,14 @@ minetest.register_node("moonrealm:air", {
|
|||||||
pointable = false,
|
pointable = false,
|
||||||
diggable = false,
|
diggable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
|
floodable = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("moonrealm:airgen", {
|
minetest.register_node("moonrealm:airgen", {
|
||||||
description = "Air Generator",
|
description = "Air Generator",
|
||||||
tiles = {"moonrealm_airgen.png"},
|
tiles = {"moonrealm_airgen.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(),
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local x = pos.x
|
local x = pos.x
|
||||||
@ -146,7 +148,7 @@ minetest.register_node("moonrealm:waterice", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
groups = {cracky=3},
|
groups = {cracky = 3},
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -158,13 +160,15 @@ minetest.register_node("moonrealm:hlflowing", {
|
|||||||
special_tiles = {
|
special_tiles = {
|
||||||
{
|
{
|
||||||
image="moonrealm_hlflowing_animated.png",
|
image="moonrealm_hlflowing_animated.png",
|
||||||
backface_culling=false,
|
backface_culling = false,
|
||||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2}
|
animation = {type = "vertical_frames",
|
||||||
|
aspect_w = 16, aspect_h = 16, length = 2}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
image="moonrealm_hlflowing_animated.png",
|
image = "moonrealm_hlflowing_animated.png",
|
||||||
backface_culling=true,
|
backface_culling = true,
|
||||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2}
|
animation = {type = "vertical_frames",
|
||||||
|
aspect_w = 16, aspect_h = 16, length = 2}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
alpha = 224,
|
alpha = 224,
|
||||||
@ -178,8 +182,8 @@ minetest.register_node("moonrealm:hlflowing", {
|
|||||||
liquid_alternative_flowing = "moonrealm:hlflowing",
|
liquid_alternative_flowing = "moonrealm:hlflowing",
|
||||||
liquid_alternative_source = "moonrealm:hlsource",
|
liquid_alternative_source = "moonrealm:hlsource",
|
||||||
liquid_viscosity = 1,
|
liquid_viscosity = 1,
|
||||||
post_effect_color = {a=224, r=115, g=55, b=24},
|
post_effect_color = {a = 224, r = 115, g = 55, b = 24},
|
||||||
groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1},
|
groups = {water = 3, liquid = 3, puts_out_fire = 1},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("moonrealm:hlsource", {
|
minetest.register_node("moonrealm:hlsource", {
|
||||||
@ -197,15 +201,15 @@ minetest.register_node("moonrealm:hlsource", {
|
|||||||
liquid_alternative_flowing = "moonrealm:hlflowing",
|
liquid_alternative_flowing = "moonrealm:hlflowing",
|
||||||
liquid_alternative_source = "moonrealm:hlsource",
|
liquid_alternative_source = "moonrealm:hlsource",
|
||||||
liquid_viscosity = 1,
|
liquid_viscosity = 1,
|
||||||
post_effect_color = {a=224, r=115, g=55, b=24},
|
post_effect_color = {a = 224, r = 115, g = 55, b = 24},
|
||||||
groups = {water=3, liquid=3, puts_out_fire=1},
|
groups = {water = 3, liquid = 3, puts_out_fire = 1},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("moonrealm:soil", {
|
minetest.register_node("moonrealm:soil", {
|
||||||
description = "Moonsoil",
|
description = "Moonsoil",
|
||||||
tiles = {"moonrealm_soil.png"},
|
tiles = {"moonrealm_soil.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {crumbly=3},
|
groups = {crumbly = 3, soil = 1},
|
||||||
drop = "moonrealm:dust",
|
drop = "moonrealm:dust",
|
||||||
sounds = default.node_sound_dirt_defaults(),
|
sounds = default.node_sound_dirt_defaults(),
|
||||||
})
|
})
|
||||||
@ -217,8 +221,8 @@ minetest.register_node("moonrealm:airlock", {
|
|||||||
light_source = 14,
|
light_source = 14,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
post_effect_color = {a=255, r=0, g=0, b=0},
|
post_effect_color = {a = 255, r = 181, g = 181, b = 181},
|
||||||
groups = {cracky=3},
|
groups = {cracky = 3},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -229,7 +233,7 @@ minetest.register_node("moonrealm:glass", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
groups = {cracky=3, oddly_breakable_by_hand=3},
|
groups = {cracky = 3},
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -243,7 +247,7 @@ minetest.register_node("moonrealm:sapling", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
groups = {snappy=2, dig_immediate=3, flammable=2},
|
groups = {snappy = 2, dig_immediate = 3, flammable = 2},
|
||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -254,7 +258,7 @@ minetest.register_node("moonrealm:appleleaf", {
|
|||||||
tiles = {"default_leaves.png"},
|
tiles = {"default_leaves.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
|
groups = {snappy = 3, flammable = 2, leaves = 1},
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 1,
|
max_items = 1,
|
||||||
items = {
|
items = {
|
||||||
@ -271,7 +275,7 @@ minetest.register_node("moonrealm:light", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
light_source = 14,
|
light_source = 14,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky=3, oddly_breakable_by_hand=3},
|
groups = {cracky = 3},
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -280,7 +284,7 @@ minetest.register_node("moonrealm:stonebrick", {
|
|||||||
tiles = {"moonrealm_stonebricktop.png", "moonrealm_stonebrickbot.png",
|
tiles = {"moonrealm_stonebricktop.png", "moonrealm_stonebrickbot.png",
|
||||||
"moonrealm_stonebrick.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(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -291,7 +295,6 @@ minetest.register_node("moonrealm:stoneslab", {
|
|||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
--sunlight_propagates = true,
|
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
@ -304,7 +307,7 @@ minetest.register_node("moonrealm:stoneslab", {
|
|||||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5}
|
{-0.5, -0.5, -0.5, 0.5, 0, 0.5}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {cracky=3},
|
groups = {cracky = 3},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -316,7 +319,7 @@ minetest.register_node("moonrealm:stonestair", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky=3},
|
groups = {cracky = 3},
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
@ -338,7 +341,7 @@ minetest.register_node("moonrealm:shell", {
|
|||||||
description = "Spawn Shell",
|
description = "Spawn Shell",
|
||||||
tiles = {"moonrealm_shell.png"},
|
tiles = {"moonrealm_shell.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky=3, oddly_breakable_by_hand=1},
|
groups = {cracky = 3},
|
||||||
drop = "",
|
drop = "",
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
@ -348,19 +351,18 @@ minetest.register_node("moonrealm:shell", {
|
|||||||
minetest.register_craftitem("moonrealm:spacesuit", {
|
minetest.register_craftitem("moonrealm:spacesuit", {
|
||||||
description = "Spacesuit",
|
description = "Spacesuit",
|
||||||
inventory_image = "moonrealm_spacesuit.png",
|
inventory_image = "moonrealm_spacesuit.png",
|
||||||
groups = {not_in_creative_inventory=1},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("moonrealm:helmet", {
|
minetest.register_craftitem("moonrealm:helmet", {
|
||||||
description = "Mesetint Helmet",
|
description = "Mesetint Helmet",
|
||||||
inventory_image = "moonrealm_helmet.png",
|
inventory_image = "moonrealm_helmet.png",
|
||||||
groups = {not_in_creative_inventory=1},
|
groups = {not_in_creative_inventory = 1},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("moonrealm:lifesupport", {
|
minetest.register_craftitem("moonrealm:lifesupport", {
|
||||||
description = "Life Support",
|
description = "Life Support",
|
||||||
inventory_image = "moonrealm_lifesupport.png",
|
inventory_image = "moonrealm_lifesupport.png",
|
||||||
groups = {not_in_creative_inventory=1},
|
groups = {not_in_creative_inventory = 1},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Crafting
|
-- Crafting
|
||||||
@ -487,4 +489,3 @@ minetest.register_craft({
|
|||||||
recipe = "default:mese_crystal",
|
recipe = "default:mese_crystal",
|
||||||
burntime = 50,
|
burntime = 50,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 173 B After Width: | Height: | Size: 161 B |
Binary file not shown.
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.1 KiB |
Loading…
x
Reference in New Issue
Block a user