Merge branch 'master' of https://github.com/kaadmy/pixture
This commit is contained in:
commit
9fdadc13e6
@ -661,8 +661,8 @@ minetest.register_ore(
|
|||||||
clust_scarcity = 10*10*10,
|
clust_scarcity = 10*10*10,
|
||||||
clust_num_ores = 6,
|
clust_num_ores = 6,
|
||||||
clust_size = 4,
|
clust_size = 4,
|
||||||
height_min = -31000,
|
y_min = -31000,
|
||||||
height_max = 32,
|
y_max = 32,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_ore(
|
minetest.register_ore(
|
||||||
@ -673,8 +673,8 @@ minetest.register_ore(
|
|||||||
clust_scarcity = 8*8*8,
|
clust_scarcity = 8*8*8,
|
||||||
clust_num_ores = 8,
|
clust_num_ores = 8,
|
||||||
clust_size = 6,
|
clust_size = 6,
|
||||||
height_min = -31000,
|
y_min = -31000,
|
||||||
height_max = -32,
|
y_max = -32,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_ore(
|
minetest.register_ore(
|
||||||
@ -685,8 +685,8 @@ minetest.register_ore(
|
|||||||
clust_scarcity = 9*9*9,
|
clust_scarcity = 9*9*9,
|
||||||
clust_num_ores = 20,
|
clust_num_ores = 20,
|
||||||
clust_size = 10,
|
clust_size = 10,
|
||||||
height_min = -31000,
|
y_min = -31000,
|
||||||
height_max = -64,
|
y_max = -64,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Iron
|
-- Iron
|
||||||
@ -699,8 +699,8 @@ minetest.register_ore(
|
|||||||
clust_scarcity = 8*8*8,
|
clust_scarcity = 8*8*8,
|
||||||
clust_num_ores = 6,
|
clust_num_ores = 6,
|
||||||
clust_size = 4,
|
clust_size = 4,
|
||||||
height_min = -31000,
|
y_min = -31000,
|
||||||
height_max = 0,
|
y_max = 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_ore(
|
minetest.register_ore(
|
||||||
@ -711,8 +711,8 @@ minetest.register_ore(
|
|||||||
clust_scarcity = 8*8*8,
|
clust_scarcity = 8*8*8,
|
||||||
clust_num_ores = 20,
|
clust_num_ores = 20,
|
||||||
clust_size = 10,
|
clust_size = 10,
|
||||||
height_min = -31000,
|
y_min = -31000,
|
||||||
height_max = -32,
|
y_max = -32,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Steel blocks
|
-- Steel blocks
|
||||||
@ -725,8 +725,8 @@ minetest.register_ore(
|
|||||||
clust_scarcity = 12*12*12,
|
clust_scarcity = 12*12*12,
|
||||||
clust_num_ores = 10,
|
clust_num_ores = 10,
|
||||||
clust_size = 10,
|
clust_size = 10,
|
||||||
height_min = -31000,
|
y_min = -31000,
|
||||||
height_max = -128,
|
y_max = -128,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Water
|
-- Water
|
||||||
@ -740,8 +740,8 @@ minetest.register_ore( -- Springs
|
|||||||
clust_scarcity = 18*18*18,
|
clust_scarcity = 18*18*18,
|
||||||
clust_num_ores = 1,
|
clust_num_ores = 1,
|
||||||
clust_size = 1,
|
clust_size = 1,
|
||||||
height_min = 20,
|
y_min = 20,
|
||||||
height_max = 31000,
|
y_max = 31000,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_ore( -- Pools
|
minetest.register_ore( -- Pools
|
||||||
@ -766,8 +766,8 @@ minetest.register_ore( -- Swamp
|
|||||||
clust_scarcity = 10*10*10,
|
clust_scarcity = 10*10*10,
|
||||||
clust_num_ores = 10,
|
clust_num_ores = 10,
|
||||||
clust_size = 4,
|
clust_size = 4,
|
||||||
height_min = -31000,
|
y_min = -31000,
|
||||||
height_max = 31000,
|
y_max = 31000,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_ore( -- Marsh
|
minetest.register_ore( -- Marsh
|
||||||
@ -779,8 +779,8 @@ minetest.register_ore( -- Marsh
|
|||||||
clust_scarcity = 6*6*6,
|
clust_scarcity = 6*6*6,
|
||||||
clust_num_ores = 10,
|
clust_num_ores = 10,
|
||||||
clust_size = 6,
|
clust_size = 6,
|
||||||
height_min = -31000,
|
y_min = -31000,
|
||||||
height_max = 31000,
|
y_max = 31000,
|
||||||
})
|
})
|
||||||
|
|
||||||
default.log("mapgen", "loaded")
|
default.log("mapgen", "loaded")
|
@ -285,6 +285,6 @@ minetest.register_ore(
|
|||||||
clust_scarcity = 12*12*12,
|
clust_scarcity = 12*12*12,
|
||||||
clust_num_ores = 10,
|
clust_num_ores = 10,
|
||||||
clust_size = 10,
|
clust_size = 10,
|
||||||
height_min = -256,
|
y_min = -256,
|
||||||
height_max = -32,
|
y_max = -32,
|
||||||
})
|
})
|
@ -15,26 +15,16 @@ minetest.register_globalstep(
|
|||||||
local pos = player:getpos()
|
local pos = player:getpos()
|
||||||
local inv = player:get_inventory()
|
local inv = player:get_inventory()
|
||||||
|
|
||||||
for _,object in ipairs(minetest.get_objects_inside_radius(pos, 0.5)) do
|
|
||||||
if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" and valid(object) then
|
|
||||||
if inv and inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then
|
|
||||||
inv:add_item("main", ItemStack(object:get_luaentity().itemstring))
|
|
||||||
if object:get_luaentity().itemstring ~= "" then
|
|
||||||
minetest.sound_play("item_drop_pickup", {pos = pos, gain = 0.1, max_hear_distance = 8})
|
|
||||||
end
|
|
||||||
object:get_luaentity().itemstring = ""
|
|
||||||
object:remove()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
for _,object in ipairs(minetest.get_objects_inside_radius(pos, 1.25)) do
|
for _,object in ipairs(minetest.get_objects_inside_radius(pos, 1.25)) do
|
||||||
if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" and valid(object) then
|
if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" and valid(object) then
|
||||||
if inv and inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then
|
if inv and inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then
|
||||||
local pos1 = pos
|
local pos1 = pos
|
||||||
pos1.y = pos1.y+0.2
|
pos1.y = pos1.y+0.2
|
||||||
local pos2 = object:getpos()
|
local pos2 = object:getpos()
|
||||||
local vec = vector.normalize({x=pos1.x-pos2.x, y=pos1.y-pos2.y, z=pos1.z-pos2.z})
|
local vec = {x=pos1.x-pos2.x, y=pos1.y-pos2.y, z=pos1.z-pos2.z}
|
||||||
|
local len = vector.length(vec)
|
||||||
|
if len > 0.5 then
|
||||||
|
vec = vector.divide(vec, len) -- it's a normalize but we have len yet (vector.normalize(vec))
|
||||||
vec.x = vec.x*3
|
vec.x = vec.x*3
|
||||||
vec.y = vec.y*3
|
vec.y = vec.y*3
|
||||||
vec.z = vec.z*3
|
vec.z = vec.z*3
|
||||||
@ -44,31 +34,27 @@ minetest.register_globalstep(
|
|||||||
{
|
{
|
||||||
physical = false
|
physical = false
|
||||||
})
|
})
|
||||||
|
else
|
||||||
minetest.after(
|
|
||||||
1,
|
|
||||||
function(args)
|
|
||||||
local lua = object:get_luaentity()
|
local lua = object:get_luaentity()
|
||||||
if object == nil or lua == nil or lua.itemstring == nil then
|
if object == nil or lua == nil or lua.itemstring == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then
|
if inv:room_for_item("main", ItemStack(lua.itemstring)) then
|
||||||
inv:add_item("main", ItemStack(object:get_luaentity().itemstring))
|
inv:add_item("main", ItemStack(lua.itemstring))
|
||||||
if object:get_luaentity().itemstring ~= "" then
|
if lua.itemstring ~= "" then
|
||||||
minetest.sound_play("item_drop_pickup", {pos = pos, gain = 0.3, max_hear_distance = 16})
|
minetest.sound_play("item_drop_pickup", {pos = pos, gain = 0.3, max_hear_distance = 16})
|
||||||
end
|
end
|
||||||
object:get_luaentity().itemstring = ""
|
lua.itemstring = ""
|
||||||
object:remove()
|
object:remove()
|
||||||
else
|
else
|
||||||
object:setvelocity({x = 0, y = 0, z = 0})
|
object:setvelocity({x = 0, y = 0, z = 0})
|
||||||
object:get_luaentity().physical_state = true
|
lua.physical_state = true
|
||||||
object:get_luaentity().object:set_properties(
|
lua.object:set_properties(
|
||||||
{
|
{
|
||||||
physical = true
|
physical = true
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end, {player, object})
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -212,8 +212,8 @@ minetest.register_ore(
|
|||||||
clust_scarcity = 11*11*11,
|
clust_scarcity = 11*11*11,
|
||||||
clust_num_ores = 3,
|
clust_num_ores = 3,
|
||||||
clust_size = 6,
|
clust_size = 6,
|
||||||
height_min = 0,
|
y_min = 0,
|
||||||
height_max = 31000,
|
y_max = 31000,
|
||||||
})
|
})
|
||||||
|
|
||||||
dofile(minetest.get_modpath("jewels").."/jewels.lua")
|
dofile(minetest.get_modpath("jewels").."/jewels.lua")
|
||||||
|
Loading…
Reference in New Issue
Block a user