swamp grass, npc deed fix
This commit is contained in:
parent
30fb48f50d
commit
9486913736
@ -2084,6 +2084,18 @@ minetest.register_decoration({
|
|||||||
height = 1,
|
height = 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
--giant grass
|
||||||
|
|
||||||
|
minetest.register_decoration({
|
||||||
|
deco_type = "simple",
|
||||||
|
place_on = "mapgen:dirt_with_swampgrass",
|
||||||
|
sidelen = 16,
|
||||||
|
fill_ratio = 0.1,
|
||||||
|
biomes = {"swamp",},
|
||||||
|
decoration = "mapgen:giantgrass",
|
||||||
|
height = 1,
|
||||||
|
})
|
||||||
|
|
||||||
--pineapple
|
--pineapple
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
@ -2313,6 +2325,18 @@ minetest.register_decoration({
|
|||||||
y_max = 31000,
|
y_max = 31000,
|
||||||
decoration = "default:junglegrass",
|
decoration = "default:junglegrass",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
--Aloe Vera
|
||||||
|
|
||||||
|
minetest.register_decoration({
|
||||||
|
deco_type = "simple",
|
||||||
|
place_on = "default:desert_sand",
|
||||||
|
sidelen = 16,
|
||||||
|
fill_ratio = 0.02,
|
||||||
|
biomes = {"swamp",},
|
||||||
|
decoration = "mapgen:aloe_vera",
|
||||||
|
height = 1,
|
||||||
|
})
|
||||||
|
|
||||||
-- Dry shrub
|
-- Dry shrub
|
||||||
|
|
||||||
@ -2406,7 +2430,7 @@ minetest.register_on_generated(function(minp, maxp)
|
|||||||
for n = 1, #dirt do
|
for n = 1, #dirt do
|
||||||
local pos = {x = dirt[n].x, y = dirt[n].y, z = dirt[n].z }
|
local pos = {x = dirt[n].x, y = dirt[n].y, z = dirt[n].z }
|
||||||
local name = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name
|
local name = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name
|
||||||
if name == "mapgen:lavender_flower" or name == "mapgen:swamp_grass_1" or name == "mapgen:swamp_grass_2" or name == "mapgen:swamp_grass_3" or name == "mapgen:swamp_grass_4" or name == "mapgen:swamp_grass_5" then
|
if name == "mapgen:lavender_flower" or name == "mapgen:swamp_grass_1" or name == "mapgen:giantgrass" or name == "mapgen:swamp_grass_2" or name == "mapgen:swamp_grass_3" or name == "mapgen:swamp_grass_4" or name == "mapgen:swamp_grass_5" then
|
||||||
minetest.env:remove_node({x=pos.x, y=pos.y+1, z=pos.z})
|
minetest.env:remove_node({x=pos.x, y=pos.y+1, z=pos.z})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.9 KiB |
@ -66,11 +66,24 @@ mobs:register_mob("mobs_npc:npc", {
|
|||||||
local light_sources = minetest.find_node_near(pos, 5, {"default:torch", "default:torch_wall", "default:torch_floor", "default:torch_ceiling", "mese_lamp"})
|
local light_sources = minetest.find_node_near(pos, 5, {"default:torch", "default:torch_wall", "default:torch_floor", "default:torch_ceiling", "mese_lamp"})
|
||||||
local doors = minetest.find_node_near(pos, 5, {"doors:door_wood_a", "doors:door_glass_a", "doors:door_obsidian_glass_a"})
|
local doors = minetest.find_node_near(pos, 5, {"doors:door_wood_a", "doors:door_glass_a", "doors:door_obsidian_glass_a"})
|
||||||
local is_owned = minetest.find_node_near(pos, 5, {"villages:colony_deed", "villages:hobo_deed",})
|
local is_owned = minetest.find_node_near(pos, 5, {"villages:colony_deed", "villages:hobo_deed",})
|
||||||
local node_below = minetest.get_node({x=pos.x, y=pos.y-2.2, z=pos.z})
|
local node_below = minetest.get_node({x=pos.x, y=pos.y-2.2, z=pos.z}).name
|
||||||
local good_floor = minetest.get_item_group("node_below", "crumbly")
|
local good_floor = minetest.get_item_group(node_below, "crumbly")
|
||||||
if beds ~= nil and light_sources ~= nil and doors ~= nil and is_owned == nil and self.home == nil and good_floor == 0 then
|
if beds ~= nil and light_sources ~= nil and doors ~= nil and is_owned == nil and self.home == nil and good_floor == 0 then
|
||||||
self.home = pos
|
self.home = pos
|
||||||
minetest.set_node({x=pos.x, y=pos.y-1.5, z=pos.z}, {name="villages:colony_deed", param2=1})
|
local free_space = minetest.find_node_near(light_sources, 1, {"air"})
|
||||||
|
local pos1 = free_space
|
||||||
|
if minetest.get_node({x=pos1.x-1, y=pos1.y, z=pos1.z}).name ~= "air" then
|
||||||
|
minetest.set_node({x=pos1.x, y=pos1.y, z=pos1.z}, {name="villages:colony_deed", param2=3})
|
||||||
|
minetest.chat_send_all("param3")
|
||||||
|
elseif minetest.get_node({x=pos1.x+1, y=pos1.y, z=pos1.z}).name ~= "air" then
|
||||||
|
minetest.set_node({x=pos1.x, y=pos1.y, z=pos1.z}, {name="villages:colony_deed", param2=2})
|
||||||
|
minetest.chat_send_all("param2")
|
||||||
|
elseif minetest.get_node({x=pos1.x, y=pos1.y, z=pos1.z-1}).name ~= "air" then
|
||||||
|
minetest.set_node({x=pos1.x, y=pos1.y, z=pos1.z}, {name="villages:colony_deed", param2=5})
|
||||||
|
minetest.chat_send_all("param5")
|
||||||
|
elseif minetest.get_node({x=pos1.x, y=pos1.y, z=pos1.z+1}).name ~= "air" then
|
||||||
|
minetest.set_node({x=pos1.x, y=pos1.y, z=pos1.z}, {name="villages:colony_deed", param2=4})
|
||||||
|
end
|
||||||
minetest.chat_send_all("NPC home set!")
|
minetest.chat_send_all("NPC home set!")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user