Bugfixes. Cleanup code

This commit is contained in:
paramat 2015-04-11 02:55:35 +01:00
parent 5a592aeef9
commit e1764cf635
3 changed files with 30 additions and 46 deletions

View File

@ -1,4 +1,4 @@
moonrealm 0.9.1 by paramat moonrealm 0.9.2 by paramat
For Minetest 0.4.12 or later For Minetest 0.4.12 or later
Depends default Depends default
Licenses: Code LGPL 2.1. Media CC BY-SA Licenses: Code LGPL 2.1. Media CC BY-SA
@ -6,12 +6,11 @@ Licenses: Code LGPL 2.1. Media CC BY-SA
Version changes: Version changes:
Call this 0.9.1, 0.8.2 should have been called 0.9.0 Hlsource crafting bugfix.
GRADCEN = 1 for terrain consistent with previous versions Remove moonrealm:sapling crafting.
Use default ice texture Moonrealm:appleleaf drops more saplings.
Mod is now for singlenode mapgen only More items given on spawn.
Move spawnplayer function to init.lua, avoids duplication of parameters Cleanup code.
Cleanup crafting code
Crafting Crafting
@ -43,14 +42,6 @@ W = wool white (fabric)
H = moonrealm helmet H = moonrealm helmet
L = moonrealm lifesupport L = moonrealm lifesupport
Moonrealm sapling.
-C-
-S-
C = default mese crystal
S = sapling
Moon stone brick x 4. Moon stone brick x 4.
MM MM
MM MM
@ -109,6 +100,6 @@ A depth of 2 soil nodes with moonrealm air above is needed for a moonrealm sapli
LLL LLL
LIL LIL
LLL LLL
L = moonrealm leaves L = moonrealm appleleaf
I = moonrealm waterice I = moonrealm waterice

View File

@ -482,23 +482,23 @@ function moonrealm_spawnplayer(player)
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") minetest.add_item({x = xsp, y = ysp + 1, z = zsp}, "moonrealm:sapling 4")
minetest.add_item({x=xsp, y=ysp+1, z=zsp}, "moonrealm:sapling 4") minetest.add_item({x = xsp, y = ysp + 1, z = zsp}, "moonrealm:airlock 4")
minetest.add_item({x=xsp, y=ysp+1, z=zsp}, "moonrealm:airlock 4") minetest.add_item({x = xsp, y = ysp + 1, z = zsp}, "moonrealm:airgen 4")
minetest.add_item({x=xsp, y=ysp+1, z=zsp}, "moonrealm:airgen 4") minetest.add_item({x = xsp, y = ysp + 1, z = zsp}, "moonrealm:hlsource 4")
minetest.add_item({x=xsp, y=ysp+1, z=zsp}, "moonrealm:hlsource 4") minetest.add_item({x = xsp, y = ysp + 1, z = zsp}, "default:apple 64")
minetest.add_item({x=xsp, y=ysp+1, z=zsp}, "default:apple 64") minetest.add_item({x = xsp, y = ysp + 1, z = zsp}, "default:pick_diamond 4")
minetest.add_item({x=xsp, y=ysp+1, z=zsp}, "default:pick_diamond") minetest.add_item({x = xsp, y = ysp + 1, z = zsp}, "default:axe_diamond 4")
minetest.add_item({x=xsp, y=ysp+1, z=zsp}, "default:axe_diamond") minetest.add_item({x = xsp, y = ysp + 1, z = zsp}, "default:shovel_diamond 4")
minetest.add_item({x=xsp, y=ysp+1, z=zsp}, "default:shovel_diamond")
local vm = minetest.get_voxel_manip() local vm = minetest.get_voxel_manip()
local pos1 = {x=xsp-3, y=ysp-3, z=zsp-3} local pos1 = {x = xsp - 3, y = ysp - 3, z = zsp - 3}
local pos2 = {x=xsp+3, y=ysp+6, z=zsp+3} local pos2 = {x = xsp + 3, y = ysp + 6, z = zsp + 3}
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 c_shell = minetest.get_content_id("moonrealm:shell") local c_shell = minetest.get_content_id("moonrealm:shell")
local c_light = minetest.get_content_id("moonrealm:light") local c_light = minetest.get_content_id("moonrealm:light")

View File

@ -121,14 +121,14 @@ minetest.register_node("moonrealm:airgen", {
local x = pos.x local x = pos.x
local y = pos.y local y = pos.y
local z = pos.z local z = pos.z
for i = -1,1 do for i = -1, 1 do
for j = -1,1 do for j = -1, 1 do
for k = -1,1 do for k = -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 nodename = minetest.get_node({x=x+i,y=y+j,z=z+k}).name local nodename = minetest.get_node({x = x + i, y = y + j, z = z + k}).name
if nodename == "moonrealm:vacuum" then if nodename == "moonrealm:vacuum" then
minetest.add_node({x=x+i,y=y+j,z=z+k},{name="moonrealm:air"}) minetest.add_node({x = x + i, y = y + j, z = z + k},{name="moonrealm:air"})
minetest.get_meta({x=x+i,y=y+j,z=z+k}):set_int("spread", 16) minetest.get_meta({x = x + i, y = y + j, z = z + k}):set_int("spread", 16)
print ("[moonrealm] Added moonrealm air node") print ("[moonrealm] Added moonrealm air node")
end end
end end
@ -258,7 +258,7 @@ minetest.register_node("moonrealm:appleleaf", {
drop = { drop = {
max_items = 1, max_items = 1,
items = { items = {
{items = {"moonrealm:sapling"},rarity = 20,}, {items = {"moonrealm:sapling"}, rarity = 16,},
{items = {"moonrealm:appleleaf"},} {items = {"moonrealm:appleleaf"},}
} }
}, },
@ -391,9 +391,9 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
output = "moonrealm:hlsource", output = "moonrealm:hlsource",
recipe = { recipe = {
{"moonrealm:leaves", "moonrealm:leaves", "moonrealm:leaves"}, {"moonrealm:appleleaf", "moonrealm:appleleaf", "moonrealm:appleleaf"},
{"moonrealm:leaves", "moonrealm:waterice", "moonrealm:leaves"}, {"moonrealm:appleleaf", "moonrealm:waterice", "moonrealm:appleleaf"},
{"moonrealm:leaves", "moonrealm:leaves", "moonrealm:leaves"}, {"moonrealm:appleleaf", "moonrealm:appleleaf", "moonrealm:appleleaf"},
}, },
}) })
@ -465,13 +465,6 @@ minetest.register_craft({
}, },
}) })
minetest.register_craft({
output = "moonrealm:sapling",
recipe = {
{"default:mese_crystal"},
{"default:sapling"},
}
})
-- Cooking -- Cooking