Update Fork #1

Merged
chmodsayshello merged 696 commits from MineClone5/MineClone5:master into master 2022-03-23 14:40:26 +01:00
2 changed files with 4 additions and 31 deletions
Showing only changes of commit 7e7c0c3a37 - Show all commits

View File

@ -23,9 +23,7 @@ function settlements.create_site_plan(minp, maxp, pr)
-- find center of chunk
local center = vector.add(minp, mcl_mapgen.HALF_CS_NODES)
-- find center_surface of chunk
local center_surface , surface_material = settlements.find_surface(center)
local chunks = {}
chunks[mcl_mapgen.get_chunk_number(center)] = true
local center_surface, surface_material = settlements.find_surface(center)
-- go build settlement around center
if not center_surface then return false end
@ -60,15 +58,8 @@ function settlements.create_site_plan(minp, maxp, pr)
local ptx, ptz = x + r * math.cos( angle ), z + r * math.sin( angle )
ptx = settlements.round(ptx, 0)
ptz = settlements.round(ptz, 0)
local pos1 = { x=ptx, y=center_surface.y+50, z=ptz}
local chunk_number = mcl_mapgen.get_chunk_number(pos1)
local pos_surface, surface_material
if chunks[chunk_number] then
pos_surface, surface_material = settlements.find_surface(pos1)
else
chunks[chunk_number] = true
pos_surface, surface_material = settlements.find_surface(pos1)
end
local pos1 = { x=ptx, y=center_surface.y, z=ptz}
local pos_surface, surface_material = settlements.find_surface(pos1)
if not pos_surface then break end
local randomized_schematic_table = shuffle(settlements.schematic_table, pr)

View File

@ -8,7 +8,7 @@ dofile(settlements.modpath.."/utils.lua")
dofile(settlements.modpath.."/foundation.lua")
dofile(settlements.modpath.."/buildings.lua")
dofile(settlements.modpath.."/paths.lua")
--dofile(settlements.modpath.."/convert_lua_mts.lua")
--
-- load settlements on server
--
@ -33,24 +33,6 @@ minetest.register_node("mcl_villages:stonebrickcarved", {
})
--[[ Enable for testing, but use MineClone2's own spawn code if/when merging.
--
-- register inhabitants
--
if minetest.get_modpath("mobs_mc") then
mobs:register_spawn("mobs_mc:villager", --name
{"mcl_core:stonebrickcarved"}, --nodes
15, --max_light
0, --min_light
20, --chance
7, --active_object_count
31000, --max_height
nil) --day_toggle
end
--]]
--
-- on map generation, try to build a settlement
--