Add some detail to control complexes.
57
mapgen.lua
|
@ -344,11 +344,11 @@ function loud_walking.generate(p_minp, p_maxp, seed)
|
|||
end
|
||||
in_cave = false
|
||||
elseif biome == "control" and dy % 5 == 0 then
|
||||
data[ivm] = node("loud_walking:alien_floor")
|
||||
data[ivm] = node("loud_walking:control_floor")
|
||||
elseif biome == "control" and (math.abs(dx - half) < 3 or math.abs(dz - half) < 3) then
|
||||
data[ivm] = node("air")
|
||||
elseif biome == "control" and ((math.abs(dx - half) % 20 == 3 and (math.abs(dz - half) - 12) % 20 > 3) or (math.abs(dz - half) % 20 == 3 and (math.abs(dx - half) - 12) % 20 > 3)) then
|
||||
data[ivm] = node("loud_walking:alien_floor")
|
||||
data[ivm] = node("loud_walking:control_wall")
|
||||
elseif biome == "control" then
|
||||
--
|
||||
elseif (((dx == 35 or dx == 45) and dz >= 35 and dz <= 45) or ((dz == 35 or dz == 45) and dx >= 35 and dx <= 45)) and dx ~= 40 and dz ~= 40 and dy == csize.y - 2 then
|
||||
|
@ -475,6 +475,59 @@ function loud_walking.generate(p_minp, p_maxp, seed)
|
|||
end
|
||||
end
|
||||
|
||||
if pod and biome == "control" then
|
||||
for dy = 0, 15 do
|
||||
for dz = 0, 1 do
|
||||
for dx = 0, 1 do
|
||||
local x1 = minp.x + dx * 26 + 17
|
||||
local z1 = minp.z + dz * 26 + 17
|
||||
local y1 = minp.y + dy * 5
|
||||
|
||||
local sr = math.random(6)
|
||||
for z = 0, 20 do
|
||||
local ivm = a:index(x1, y1, z1 + z)
|
||||
for x = 0, 20 do
|
||||
if sr == 1 then
|
||||
if dy > 0 then
|
||||
if data[ivm] == node("loud_walking:control_floor_alert_down") then
|
||||
data[ivm] = node("loud_walking:control_floor_alert_both")
|
||||
else
|
||||
data[ivm] = node("loud_walking:control_floor_alert_up")
|
||||
end
|
||||
end
|
||||
if dy < 15 then
|
||||
data[ivm + a.ystride * 5] = node("loud_walking:control_floor_alert_down")
|
||||
end
|
||||
elseif sr == 2 then
|
||||
if x > 1 and x < 19 and z > 1 and z < 19 and (z - 2) % 4 ~= 0 and (x - 2) % 4 ~= 0 then
|
||||
for y = 1, 4 do
|
||||
data[ivm + y * a.ystride] = node("loud_walking:air_ladder")
|
||||
end
|
||||
end
|
||||
elseif sr == 3 then
|
||||
if dy > 0 and data[ivm] ~= node("loud_walking:control_floor_alert_down") and x > 0 and z > 0 and x < 20 and z < 20 then
|
||||
data[ivm] = node("loud_walking:control_floor_growth")
|
||||
local sr2 = math.random(20)
|
||||
if sr2 == 1 then
|
||||
data[ivm + a.ystride] = node("loud_walking:control_plant_1")
|
||||
elseif sr2 == 2 then
|
||||
data[ivm + a.ystride] = node("loud_walking:control_plant_2")
|
||||
end
|
||||
end
|
||||
elseif sr == 4 then
|
||||
if dy < 15 and (x > 0 and x < 20 and z > 0 and z < 20) and (((x == 1 or x == 19) and math.abs(z - 10) > 3) or ((z == 1 or z == 19) and math.abs(x - 10) > 3)) then
|
||||
data[ivm + 3 * a.ystride] = node("loud_walking:controls")
|
||||
end
|
||||
end
|
||||
|
||||
ivm = ivm + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
vm:set_data(data)
|
||||
minetest.generate_ores(vm, minp, maxp)
|
||||
minetest.generate_decorations(vm, minp, maxp)
|
||||
|
|
65
nodes.lua
|
@ -40,10 +40,30 @@ local node = loud_walking.clone_node("loud_walking:sky_scrith")
|
|||
node.tiles = {"loud_walking_glass_detail.png"}
|
||||
minetest.register_node("loud_walking:transparent_scrith", node)
|
||||
|
||||
minetest.register_node("loud_walking:alien_floor", {
|
||||
minetest.register_node("loud_walking:control_floor", {
|
||||
description = "Floor",
|
||||
paramtype = "light",
|
||||
tiles = {"loud_walking_alien_floor.png"},
|
||||
tiles = {"loud_walking_control_floor.png"},
|
||||
use_texture_alpha = true,
|
||||
is_ground_content = false,
|
||||
groups = {},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
local node = loud_walking.clone_node("loud_walking:control_floor")
|
||||
node.tiles = { "loud_walking_control_floor.png", "loud_walking_control_floor_alert.png", "loud_walking_control_floor.png"}
|
||||
minetest.register_node("loud_walking:control_floor_alert_down", node)
|
||||
local node = loud_walking.clone_node("loud_walking:control_floor")
|
||||
node.tiles = {"loud_walking_control_floor_alert.png", "loud_walking_control_floor.png", "loud_walking_control_floor.png"}
|
||||
minetest.register_node("loud_walking:control_floor_alert_up", node)
|
||||
node.tiles = {"loud_walking_control_floor_alert.png", "loud_walking_control_floor_alert.png", "loud_walking_control_floor.png"}
|
||||
minetest.register_node("loud_walking:control_floor_alert_both", node)
|
||||
node.tiles = {"loud_walking_strange_growth.png", "loud_walking_control_floor.png", "loud_walking_control_floor.png"}
|
||||
minetest.register_node("loud_walking:control_floor_growth", node)
|
||||
|
||||
minetest.register_node("loud_walking:control_wall", {
|
||||
description = "Wall",
|
||||
paramtype = "light",
|
||||
tiles = {"loud_walking_control_wall.png"},
|
||||
use_texture_alpha = true,
|
||||
is_ground_content = false,
|
||||
groups = {},
|
||||
|
@ -67,10 +87,10 @@ minetest.register_node("loud_walking:controls", {
|
|||
if sr < 3 then
|
||||
puncher:set_hp(puncher:get_hp() - sr)
|
||||
elseif sr < 6 then
|
||||
local pos = puncher:getpos()
|
||||
pos.x = pos.x + (math.random(-50, 50) * 160)
|
||||
pos.y = pos.y + (math.random(-50, 50) * 160)
|
||||
pos.z = pos.z + (math.random(-50, 50) * 160)
|
||||
local pos = {}
|
||||
pos.x = math.random(-190, 190) * 160 - 32 + 40
|
||||
pos.y = math.random(-190, 190) * 160 - 32 + 77
|
||||
pos.z = math.random(-190, 190) * 160 - 32 + 40
|
||||
if pos.x > -31000 and pos.x < 31000 and pos.y > -31000 and pos.y < 31000 and pos.z > -31000 and pos.z < 31000 then
|
||||
puncher:setpos(pos)
|
||||
end
|
||||
|
@ -201,3 +221,36 @@ minetest.register_node("loud_walking:air_ladder", {
|
|||
},
|
||||
})
|
||||
|
||||
minetest.register_node("loud_walking:control_plant_1", {
|
||||
description = "Strange Plant",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"loud_walking_strange_plant_1.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {0, 0, 0, 0, 0, 0},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("loud_walking:control_plant_2", {
|
||||
description = "Strange Plant",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"loud_walking_strange_plant_2.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {0, 0, 0, 0, 0, 0},
|
||||
},
|
||||
})
|
||||
|
|
Before Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 719 B |
After Width: | Height: | Size: 937 B |