This commit is contained in:
D00Med 2017-03-25 08:25:58 +10:00
parent 0a9c529b80
commit 440dd37f4e
4 changed files with 22 additions and 12 deletions

View File

@ -438,7 +438,7 @@ minetest.register_node("mapgen:pineapple_plant_growing", {
description = "Pineapple Plant",
drawtype = "plantlike",
paramtype = "light",
visual_scale = 1.5,
visual_scale = 2,
walkable = false,
tiles = {
"mapgen_pineapple_plant_growing.png",
@ -464,7 +464,7 @@ minetest.register_node("mapgen:pineapple_plant", {
description = "Pineapple Plant",
drawtype = "plantlike",
paramtype = "light",
visual_scale = 1.5,
visual_scale = 2,
walkable = false,
tiles = {
"mapgen_pineapple_plant.png",
@ -551,7 +551,7 @@ minetest.register_node("mapgen:tallgrass", {
buildable_to = true,
sunlight_propagates = true,
inventory_image = "mapgen_longgrass.png",
visual_scale = 1.4,
visual_scale = 2,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
@ -571,7 +571,7 @@ minetest.register_node("mapgen:giantgrass", {
buildable_to = true,
sunlight_propagates = true,
inventory_image = "mapgen_giantgrass.png",
visual_scale = 2,
visual_scale = 4,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
@ -592,7 +592,7 @@ minetest.register_node("mapgen:bananaplant", {
buildable_to = true,
sunlight_propagates = true,
inventory_image = "mapgen_banana_plant.png",
visual_scale = 1.4,
visual_scale = 2,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
@ -647,7 +647,7 @@ minetest.register_node("mapgen:bamboo_small_top", {
paramtype = "light",
is_ground_content = false,
sunlight_propagates = true,
visual_scale = 1.4,
visual_scale = 2,
inventory_image = "mapgen_bamboo_small_top.png",
groups = {snappy=1, flammable=1, oddly_breakable_by_hand=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
@ -1143,7 +1143,7 @@ minetest.register_node("mapgen:cattail", {
buildable_to = true,
sunlight_propagates = true,
inventory_image = "mapgen_cattail.png",
visual_scale = 1.4,
visual_scale = 2,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
@ -1379,7 +1379,7 @@ minetest.register_node("mapgen:dead_grass_5", {
minetest.register_node("mapgen:big_coral", {
description = "Big Red Coral",
drawtype = "plantlike",
visual_scale = 1.3,
visual_scale = 2,
tiles = {"mapgen_big_coral.png"},
paramtype = "light",
is_ground_content = false,
@ -1740,7 +1740,7 @@ minetest.register_node("mapgen:stalagmite0", {
minetest.register_node("mapgen:stalagmite1", {
description = "Stalagmite",
drawtype = "plantlike",
visual_scale = 1.5,
visual_scale = 2,
tiles = {"mapgen_stalagmite3.png^[transformFY"},
inventory_image = "mapgen_stalagmite3.png^[transformFY",
is_ground_content = false,

View File

@ -8,6 +8,13 @@ mobs.npc_drops = {
"default:shovel_steel", "farming:bread", "bucket:bucket_water"
}
minetest.register_entity("mobs_npc:dummy", {
visual = "sprite",
textures = {"xpanes_trans.png"},
physical = false,
collisionbox = {0, 0, 0, 0.1, 0.1, 0.1},
})
mobs:register_mob("mobs_npc:npc", {
type = "npc",
passive = false,
@ -24,6 +31,7 @@ mobs:register_mob("mobs_npc:npc", {
drawtype = "front",
textures = {
{"mobs_villager.png"},
{"mobs_villager2.png"},
},
child_texture = {
{"mobs_npc_baby.png"}, -- derpy baby by AmirDerAssassine
@ -66,7 +74,7 @@ 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 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 node_below = minetest.get_node({x=pos.x, y=pos.y-2.2, z=pos.z}).name
local node_below = minetest.get_node({x=pos.x, y=pos.y-1.5, z=pos.z}).name
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
self.home = pos
@ -89,8 +97,10 @@ mobs:register_mob("mobs_npc:npc", {
local game_time = minetest.get_timeofday()*24000
if game_time >= 6000 and game_time <= 18000 then
if game_time <= 6000 and game_time >= 18000 and self.pos ~= nil and self.home_object == nil then
self.home_object = minetest.add_entity(self.home, "mobs_npc:dummy")
local home_object = self.home_object
self.following = home_object.object
else
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB