Small update mainmenu. Cleanup and fixes

This commit is contained in:
MoNTE48 2019-06-25 01:00:18 +02:00
parent 6b7694e11d
commit 56223076a1
28 changed files with 68 additions and 118 deletions

View File

@ -42,6 +42,12 @@ minetest.register_node("mesecons_button:button_stone_off", {
minetest.sound_play("mesecons_button_push", {pos=pos}) minetest.sound_play("mesecons_button_push", {pos=pos})
minetest.get_node_timer(pos):start(1) minetest.get_node_timer(pos):start(1)
end, end,
on_rightclick = function (pos, node)
minetest.swap_node(pos, {name = "mesecons_button:button_stone_on", param2=node.param2})
mesecon.receptor_on(pos, mesecon.rules.buttonlike_get(node))
minetest.sound_play("mesecons_button_push", {pos=pos})
minetest.get_node_timer(pos):start(1)
end,
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
mesecons = {receptor = { mesecons = {receptor = {
state = mesecon.state.off, state = mesecon.state.off,
@ -105,6 +111,12 @@ minetest.register_node("mesecons_button:button_wood_off", {
minetest.sound_play("mesecons_button_push", {pos=pos}) minetest.sound_play("mesecons_button_push", {pos=pos})
minetest.get_node_timer(pos):start(1) minetest.get_node_timer(pos):start(1)
end, end,
on_rightclick = function (pos, node)
minetest.swap_node(pos, {name = "mesecons_button:button_wood_on", param2=node.param2})
mesecon.receptor_on(pos, mesecon.rules.buttonlike_get(node))
minetest.sound_play("mesecons_button_push", {pos=pos})
minetest.get_node_timer(pos):start(1)
end,
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
mesecons = {receptor = { mesecons = {receptor = {
state = mesecon.state.off, state = mesecon.state.off,

View File

@ -36,9 +36,9 @@ end
for i = 1, 4 do for i = 1, 4 do
local groups = {} local groups = {}
if i == 1 then if i == 1 then
groups = {bendy = 2, snappy = 1, dig_immediate = 2} groups = {bendy = 2, snappy = 1, dig_immediate = 2, attached_node = 1}
else else
groups = {bendy = 2, snappy = 1, dig_immediate = 2, not_in_creative_inventory = 1} groups = {bendy = 2, snappy = 1, dig_immediate = 2, attached_node = 1, not_in_creative_inventory = 1}
end end
local delaytime local delaytime

View File

@ -32,7 +32,7 @@ minetest.register_node("mesecons_lightstone:lightstone_off", {
minetest.register_node("mesecons_lightstone:lightstone_on", { minetest.register_node("mesecons_lightstone:lightstone_on", {
tiles = {"jeija_lightstone_gray_on.png"}, tiles = {"jeija_lightstone_gray_on.png"},
is_ground_content = false, is_ground_content = false,
groups = {cracky=2,not_in_creative_inventory=1, mesecon = 2}, groups = {cracky=2, not_in_creative_inventory=1, mesecon = 2},
drop = "mesecons_lightstone:lightstone_off", drop = "mesecons_lightstone:lightstone_off",
light_source = minetest.LIGHT_MAX - 2, light_source = minetest.LIGHT_MAX - 2,
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),

View File

@ -3,6 +3,7 @@ minetest.register_node("mesecons_noteblock:noteblock", {
tiles = {"mesecons_noteblock.png"}, tiles = {"mesecons_noteblock.png"},
is_ground_content = false, is_ground_content = false,
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2}, groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2},
stack_max = 1,
on_punch = function (pos, node) -- change sound when punched on_punch = function (pos, node) -- change sound when punched
node.param2 = (node.param2+1)%12 node.param2 = (node.param2+1)%12
mesecon.noteblock_play(pos, node.param2) mesecon.noteblock_play(pos, node.param2)

View File

@ -65,7 +65,7 @@ local piston_remove_pusher = function (pos, node)
return return
end end
minetest.remove_node(pusherpos) minetest.remove_node(pusherpos)
minetest.sound_play("piston_retract", { minetest.sound_play("piston_retract", {
pos = pos, pos = pos,
max_hear_distance = 20, max_hear_distance = 20,
@ -174,6 +174,7 @@ minetest.register_node("mesecons_pistons:piston_normal_off", {
"mesecons_piston_pusher_front.png" "mesecons_piston_pusher_front.png"
}, },
groups = {cracky = 3}, groups = {cracky = 3},
stack_max = 1,
paramtype2 = "facedir", paramtype2 = "facedir",
after_place_node = piston_orientate, after_place_node = piston_orientate,
mesecons_piston = pistonspec_normal, mesecons_piston = pistonspec_normal,
@ -253,6 +254,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_off", {
"mesecons_piston_pusher_front_sticky.png" "mesecons_piston_pusher_front_sticky.png"
}, },
groups = {cracky = 3}, groups = {cracky = 3},
stack_max = 1,
paramtype2 = "facedir", paramtype2 = "facedir",
after_place_node = piston_orientate, after_place_node = piston_orientate,
mesecons_piston = pistonspec_sticky, mesecons_piston = pistonspec_sticky,

View File

@ -93,7 +93,7 @@ mesecon.register_pressure_plate(
{"default_wood.png"}, {"default_wood.png"},
{"default_wood.png"}, {"default_wood.png"},
{{"default:wood", "default:wood"}}, {{"default:wood", "default:wood"}},
{ choppy = 3, oddly_breakable_by_hand = 3 }, { choppy = 3, oddly_breakable_by_hand = 3, attached_node = 1 },
default.node_sound_wood_defaults()) default.node_sound_wood_defaults())
mesecon.register_pressure_plate( mesecon.register_pressure_plate(
@ -102,5 +102,5 @@ mesecon.register_pressure_plate(
{"default_stone.png"}, {"default_stone.png"},
{"default_stone.png"}, {"default_stone.png"},
{{"default:cobble", "default:cobble"}}, {{"default:cobble", "default:cobble"}},
{ cracky = 3, oddly_breakable_by_hand = 3 }, { cracky = 3, oddly_breakable_by_hand = 3, attached_node = 1 },
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())

View File

@ -14,7 +14,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_on", {
wall_side = { -2/16, -8/16, -8/16, -8/16, 8/16, 8/16 }, wall_side = { -2/16, -8/16, -8/16, -8/16, 8/16, 8/16 },
}, },
drop = "mesecons_solarpanel:solar_panel_off", drop = "mesecons_solarpanel:solar_panel_off",
groups = {dig_immediate=3, not_in_creative_inventory = 1}, groups = {dig_immediate = 3, attached_node = 1, not_in_creative_inventory = 1},
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
mesecons = {receptor = { mesecons = {receptor = {
state = mesecon.state.on, state = mesecon.state.on,
@ -38,7 +38,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_off", {
wall_top = { -8/16, 2/16, -8/16, 8/16, 8/16, 8/16 }, wall_top = { -8/16, 2/16, -8/16, 8/16, 8/16, 8/16 },
wall_side = { -2/16, -8/16, -8/16, -8/16, 8/16, 8/16 }, wall_side = { -2/16, -8/16, -8/16, -8/16, 8/16, 8/16 },
}, },
groups = {dig_immediate=3}, groups = {dig_immediate = 3, attached_node = 1},
description="Solar Panel", description="Solar Panel",
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
mesecons = {receptor = { mesecons = {receptor = {

View File

@ -58,7 +58,7 @@ local torch_selectionbox =
walkable = false, walkable = false,
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
selection_box = torch_selectionbox, selection_box = torch_selectionbox,
groups = {dig_immediate = 3, not_in_creative_inventory = 1}, groups = {dig_immediate = 3, attached_node = 1, not_in_creative_inventory = 1},
drop = "mesecons_torch:mesecon_torch_on", drop = "mesecons_torch:mesecon_torch_on",
sounds = default.node_sound_defaults(), sounds = default.node_sound_defaults(),
mesecons = {receptor = { mesecons = {receptor = {

View File

@ -39,7 +39,7 @@ mesecon.register_node("mesecons_walllever:wall_lever", {
}, },
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = {{ -2/16, -3/16, 8/16, 2/16, 3/16, 4/16 }, -- the base fixed = {{ -2/16, -3/16, 8/16, 2/16, 3/16, 4/16 }, -- the base
{ -1/16, -8/16, 7/16, 1/16, 0/16, 5/16 }} -- the lever itself. { -1/16, -8/16, 7/16, 1/16, 0/16, 5/16 }} -- the lever itself.
}, },
mesecons = {receptor = { mesecons = {receptor = {
@ -58,8 +58,8 @@ mesecon.register_node("mesecons_walllever:wall_lever", {
}, },
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = {{ -2/16, -3/16, 8/16, 2/16, 3/16, 4/16 }, -- the base fixed = {{ -2/16, -3/16, 8/16, 2/16, 3/16, 4/16 }, -- the base
{ -1/16, 0/16, 7/16, 1/16, 8/16, 5/16 }} -- the lever itself. { -1/16, 0/16, 7/16, 1/16, 8/16, 5/16 }} -- the lever itself.
}, },
on_rotate = false, on_rotate = false,
mesecons = {receptor = { mesecons = {receptor = {

View File

@ -24,7 +24,6 @@ minetest.register_alias("glass", "default:glass")
minetest.register_alias("wooden_fence", "default:fence_wood") minetest.register_alias("wooden_fence", "default:fence_wood")
minetest.register_alias("ladder", "default:ladder") minetest.register_alias("ladder", "default:ladder")
minetest.register_alias("wood", "default:wood") minetest.register_alias("wood", "default:wood")
minetest.register_alias("cloud", "default:cloud")
minetest.register_alias("water_flowing", "default:water_flowing") minetest.register_alias("water_flowing", "default:water_flowing")
minetest.register_alias("water_source", "default:water_source") minetest.register_alias("water_source", "default:water_source")
minetest.register_alias("lava_flowing", "default:lava_flowing") minetest.register_alias("lava_flowing", "default:lava_flowing")

View File

@ -228,14 +228,12 @@ minetest.register_craftitem("default:glowstone_dust", {
minetest.register_craftitem("default:fish_raw", { minetest.register_craftitem("default:fish_raw", {
description = "Raw Fish", description = "Raw Fish",
groups = {},
inventory_image = "default_fish.png", inventory_image = "default_fish.png",
on_use = minetest.item_eat(2), on_use = minetest.item_eat(2),
}) })
minetest.register_craftitem("default:fish", { minetest.register_craftitem("default:fish", {
description = "Cooked Fish", description = "Cooked Fish",
groups = {},
inventory_image = "default_fish_cooked.png", inventory_image = "default_fish_cooked.png",
on_use = minetest.item_eat(4), on_use = minetest.item_eat(4),
}) })

View File

@ -872,10 +872,11 @@ minetest.register_node("default:cactus", {
}) })
minetest.register_abm({ minetest.register_abm({
label = "Cactus damage",
nodenames = {"default:cactus"}, nodenames = {"default:cactus"},
interval = 1, interval = 1,
chance = 1, chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider) action = function(pos)
local players = minetest.get_objects_inside_radius(pos, 1) local players = minetest.get_objects_inside_radius(pos, 1)
for i, player in ipairs(players) do for i, player in ipairs(players) do
player:set_hp(player:get_hp() - 2) player:set_hp(player:get_hp() - 2)
@ -1393,7 +1394,7 @@ minetest.register_node("default:ladder_wood", {
--wall_bottom = = <default> --wall_bottom = = <default>
--wall_side = = <default> --wall_side = = <default>
}, },
groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2}, groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2, attached_node = 1},
legacy_wallmounted = true, legacy_wallmounted = true,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
}) })
@ -1538,18 +1539,6 @@ minetest.register_node("default:quartz_pillar", {
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })
--
-- Misc
--
minetest.register_node("default:cloud", {
description = "Cloud",
tiles = {"default_cloud.png"},
is_ground_content = false,
sounds = default.node_sound_defaults(),
groups = {not_in_creative_inventory = 1},
})
-- --
-- register trees for leafdecay -- register trees for leafdecay
-- --

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 B

View File

@ -489,7 +489,7 @@ function default.sapling_on_place(itemstack, placer, pointed_thing,
return itemstack return itemstack
end end
-- Check tree volume for protection -- Check tree volume for protection
if core.intersects_protection( if minetest.is_area_protected(
vector.add(pos, minp_relative), vector.add(pos, minp_relative),
vector.add(pos, maxp_relative), vector.add(pos, maxp_relative),
player_name, player_name,

View File

@ -43,8 +43,8 @@ minetest.register_node("fire:basic_flame", {
name = "fire_basic_flame_animated.png", name = "fire_basic_flame_animated.png",
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
aspect_w = 16, aspect_w = 32,
aspect_h = 16, aspect_h = 32,
length = 1 length = 1
}, },
}, },
@ -103,7 +103,7 @@ minetest.register_node("fire:permanent_flame", {
sunlight_propagates = true, sunlight_propagates = true,
floodable = true, floodable = true,
damage_per_second = 4, damage_per_second = 4,
groups = {igniter = 2, dig_immediate = 3}, groups = {igniter = 2, dig_immediate = 3, not_in_creative_inventory = 1},
drop = "", drop = "",
on_flood = flood_flame, on_flood = flood_flame,

View File

@ -122,7 +122,7 @@ minetest.register_node("itemframes:frame",{
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
sunlight_propagates = true, sunlight_propagates = true,
groups = {choppy = 2, dig_immediate = 2}, groups = {choppy = 2, dig_immediate = 2, attached_node = 1},
legacy_wallmounted = true, legacy_wallmounted = true,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
after_place_node = function(pos, placer, itemstack) after_place_node = function(pos, placer, itemstack)

View File

@ -94,10 +94,8 @@ mobs:spawn({
name = "mobs_animal:bear", name = "mobs_animal:bear",
nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass"},
min_light = 0, min_light = 0,
interval = 30, chance = 30000,
chance = 15000,
min_height = 0, min_height = 0,
max_height = 31000,
day_toggle = true, day_toggle = true,
}) })

View File

@ -104,10 +104,8 @@ mobs:spawn({
name = "mobs_animal:bunny", name = "mobs_animal:bunny",
nodes = {"default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass"}, nodes = {"default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass"},
min_light = 10, min_light = 10,
interval = 30, chance = 20000,
chance = 8000,
min_height = 0, min_height = 0,
max_height = 31000,
day_toggle = true, day_toggle = true,
}) })

View File

@ -77,10 +77,8 @@ mobs:spawn({
name = "mobs_animal:chicken", name = "mobs_animal:chicken",
nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
min_light = 5, min_light = 5,
interval = 30, chance = 20000,
chance = 8000,
min_height = 0, min_height = 0,
max_height = 31000,
day_toggle = true, day_toggle = true,
}) })

View File

@ -129,10 +129,8 @@ mobs:spawn({
name = "mobs_animal:cow", name = "mobs_animal:cow",
nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_dry_grass", "default:dirt_with_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_dry_grass", "default:dirt_with_grass"},
min_light = 5, min_light = 5,
interval = 30, chance = 20000,
chance = 10000,
min_height = 0, min_height = 0,
max_height = 31000,
day_toggle = true, day_toggle = true,
}) })

View File

@ -62,10 +62,8 @@ mobs:spawn({
name = "mobs_animal:wolf", name = "mobs_animal:wolf",
nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass"},
min_light = 0, min_light = 0,
interval = 30, chance = 20000,
chance = 15000,
min_height = 0, min_height = 0,
max_height = 31000,
day_toggle = true, day_toggle = true,
}) })

View File

@ -55,10 +55,8 @@ mobs:spawn({
name = "mobs_animal:kitten", name = "mobs_animal:kitten",
nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass"},
min_light = 10, min_light = 10,
interval = 30, chance = 20000,
chance = 10000,
min_height = 0, min_height = 0,
max_height = 31000,
day_toggle = true, day_toggle = true,
}) })

View File

@ -59,10 +59,8 @@ mobs:spawn({
name = "mobs_animal:pig", name = "mobs_animal:pig",
nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass"},
min_light = 5, min_light = 5,
interval = 30, chance = 20000,
chance = 15000,
min_height = 0, min_height = 0,
max_height = 31000,
day_toggle = true, day_toggle = true,
}) })

View File

@ -158,10 +158,8 @@ mobs:spawn({
name = "mobs_animal:sheep_white", name = "mobs_animal:sheep_white",
nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
min_light = 7, min_light = 7,
interval = 30, chance = 100000,
chance = 40000,
min_height = 0, min_height = 0,
max_height = 31000,
day_toggle = true, day_toggle = true,
}) })
@ -169,10 +167,8 @@ mobs:spawn({
name = "mobs_animal:sheep_grey", name = "mobs_animal:sheep_grey",
nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
min_light = 7, min_light = 7,
interval = 30, chance = 100000,
chance = 40000,
min_height = 0, min_height = 0,
max_height = 31000,
day_toggle = true, day_toggle = true,
}) })
@ -180,10 +176,8 @@ mobs:spawn({
name = "mobs_animal:sheep_dark_grey", name = "mobs_animal:sheep_dark_grey",
nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:snow", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass"},
min_light = 7, min_light = 7,
interval = 30, chance = 100000,
chance = 40000,
min_height = 0, min_height = 0,
max_height = 31000,
day_toggle = true, day_toggle = true,
}) })
@ -191,10 +185,8 @@ mobs:spawn({
name = "mobs_animal:sheep_black", name = "mobs_animal:sheep_black",
nodes = {"default:dirt", "default:sand", "default:redsand", "default:dirt_with_dry_grass", "default:dirt_with_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:dirt_with_dry_grass", "default:dirt_with_grass"},
min_light = 7, min_light = 7,
interval = 30, chance = 100000,
chance = 40000,
min_height = 0, min_height = 0,
max_height = 31000,
day_toggle = true, day_toggle = true,
}) })
@ -202,9 +194,7 @@ mobs:spawn({
name = "mobs_animal:sheep_brown", name = "mobs_animal:sheep_brown",
nodes = {"default:dirt", "default:sand", "default:redsand", "default:dirt_with_dry_grass", "default:dirt_with_grass"}, nodes = {"default:dirt", "default:sand", "default:redsand", "default:dirt_with_dry_grass", "default:dirt_with_grass"},
min_light = 7, min_light = 7,
interval = 30, chance = 100000,
chance = 40000,
min_height = 0, min_height = 0,
max_height = 31000,
day_toggle = true, day_toggle = true,
}) })

View File

@ -52,11 +52,9 @@ mobs:register_mob("mobs_monster:skeleton", {
mobs:spawn({ mobs:spawn({
name = "mobs_monster:skeleton", name = "mobs_monster:skeleton",
nodes = {"default:dirt", "default:sandstone", "default:sand", "default:redsand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass", "default:cobble", "default:mossycobble"}, nodes = {"default:dirt", "default:sandstone", "default:sand", "default:redsand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass", "default:cobble", "default:mossycobble"},
min_light = 0,
max_light = 10, max_light = 10,
chance = 7000, chance = 15000,
min_height = -50, min_height = -64,
max_height = 31000,
}) })
mobs:register_egg("mobs_monster:skeleton", "Skeleton egg", "mobs_chicken_egg.png^default_bone.png", 1) mobs:register_egg("mobs_monster:skeleton", "Skeleton egg", "mobs_chicken_egg.png^default_bone.png", 1)

View File

@ -62,12 +62,9 @@ mobs:register_mob("mobs_monster:spider", {
mobs:spawn({ mobs:spawn({
name = "mobs_monster:spider", name = "mobs_monster:spider",
nodes = {"default:dirt", "default:sandstone", "default:sand", "default:redsand", "default:redsand", "default:stone", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass", "default:cobble", "default:mossycobble"}, nodes = {"default:dirt", "default:sandstone", "default:sand", "default:redsand", "default:redsand", "default:stone", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass", "default:cobble", "default:mossycobble"},
min_light = 0,
max_light = 12, max_light = 12,
interval = 30, chance = 20000,
chance = 10000, min_height = -64,
min_height = -50,
max_height = 31000,
}) })
mobs:register_egg("mobs_monster:spider", "Spider egg", "mobs_chicken_egg.png^mobs_cobweb.png", 1) mobs:register_egg("mobs_monster:spider", "Spider egg", "mobs_chicken_egg.png^mobs_cobweb.png", 1)
@ -138,12 +135,8 @@ mobs:register_mob("mobs_monster:small_spider", {
mobs:spawn({ mobs:spawn({
name = "mobs_monster:small_spider", name = "mobs_monster:small_spider",
nodes = {"default:dirt", "default:sandstone", "default:sand", "default:redsand", "default:redsand", "default:stone", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass", "default:cobble", "default:mossycobble"}, nodes = {"default:dirt", "default:sandstone", "default:sand", "default:redsand", "default:redsand", "default:stone", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass", "default:cobble", "default:mossycobble"},
min_light = 0, chance = 20000,
max_light = 15, min_height = -64,
interval = 30,
chance = 10000,
min_height = -50,
max_height = 31000,
}) })
minetest.register_craft({ minetest.register_craft({

View File

@ -52,11 +52,9 @@ mobs:register_mob("mobs_monster:zombie", {
mobs:spawn({ mobs:spawn({
name = "mobs_monster:zombie", name = "mobs_monster:zombie",
nodes = {"default:dirt", "default:sandstone", "default:sand", "default:redsand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass", "default:cobble", "default:mossycobble"}, nodes = {"default:dirt", "default:sandstone", "default:sand", "default:redsand", "default:stone", "default:snowblock", "default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_dry_grass", "default:cobble", "default:mossycobble"},
min_light = 0,
max_light = 10, max_light = 10,
chance = 7000, chance = 15000,
min_height = -50, min_height = -64,
max_height = 31000,
}) })
mobs:register_egg("mobs_monster:zombie", "Zombie Head", "zombie_head.png", 0) mobs:register_egg("mobs_monster:zombie", "Zombie Head", "zombie_head.png", 0)

View File

@ -37,7 +37,6 @@ end
-- Load settings -- Load settings
local damage_enabled = minetest.settings:get_bool("enable_damage")
local mobs_spawn = minetest.settings:get_bool("mobs_spawn") ~= false local mobs_spawn = minetest.settings:get_bool("mobs_spawn") ~= false
local peaceful_only = minetest.settings:get_bool("only_peaceful_mobs") local peaceful_only = minetest.settings:get_bool("only_peaceful_mobs")
local disable_blood = minetest.settings:get_bool("mobs_disable_blood") ~= true local disable_blood = minetest.settings:get_bool("mobs_disable_blood") ~= true
@ -48,8 +47,14 @@ local spawn_protected = minetest.settings:get_bool("mobs_spawn_protected") ~= fa
local remove_far = minetest.settings:get_bool("remove_far_mobs") ~= false local remove_far = minetest.settings:get_bool("remove_far_mobs") ~= false
local difficulty = tonumber(minetest.settings:get("mob_difficulty")) or 1.0 local difficulty = tonumber(minetest.settings:get("mob_difficulty")) or 1.0
local show_health = minetest.settings:get_bool("mob_show_health") ~= true local show_health = minetest.settings:get_bool("mob_show_health") ~= true
local max_per_block = tonumber(minetest.settings:get("max_objects_per_block") or 99) local max_per_block = tonumber(minetest.settings:get("max_objects_per_block"))
local mob_chance_multiplier = tonumber(minetest.settings:get("mob_chance_multiplier") or 1) local mob_chance_multiplier = tonumber(minetest.settings:get("mob_chance_multiplier") or 1)
local lifetime = 1200 -- 20 min
local spawn_interval = 10
if not minetest.is_singleplayer() then
lifetime = 300 -- 5 min
spawn_interval = 60
end
-- Peaceful mode message so players will know there are no monsters -- Peaceful mode message so players will know there are no monsters
if peaceful_only then if peaceful_only then
@ -74,10 +79,6 @@ local node_ice = "default:ice"
local node_snowblock = "default:snowblock" local node_snowblock = "default:snowblock"
local node_snow = "default:snow" local node_snow = "default:snow"
mobs.fallback_node = minetest.registered_aliases["mapgen_dirt"] or "default:dirt" mobs.fallback_node = minetest.registered_aliases["mapgen_dirt"] or "default:dirt"
local lifetime = 1200 -- 20 min
if not minetest.is_singleplayer() then
lifetime = 300 -- 5 min
end
local mob_class = { local mob_class = {
stepheight = 1.1, -- was 0.6 stepheight = 1.1, -- was 0.6
@ -900,16 +901,15 @@ function mob_class:do_env_damage()
if self.light_damage ~= 0 then if self.light_damage ~= 0 then
local light = minetest.get_node_light(pos) or 0 local light = minetest.get_node_light(pos) or 0
if light >= self.light_damage_min if light >= self.light_damage_min
and light <= self.light_damage_max then and light <= self.light_damage_max then
self.health = self.health - self.light_damage self.health = self.health - self.light_damage
pos.y = pos.y + 0.75 -- for particle effect position pos.y = pos.y + 0.75 -- for particle effect position
effect(pos, 5, "heart.png") effect(pos, 5, "heart.png")
self.nametag = "Health: " .. self.health .. " / " .. self.hp_max if show_health then
self:update_tag() self.nametag = "Health: " .. self.health .. " / " .. self.hp_max
self:update_tag()
end
if self:check_for_death({type = "light"}) then return end if self:check_for_death({type = "light"}) then return end
end end
end end
@ -2707,22 +2707,6 @@ end
-- only play hit sound and show blood effects if damage is 1 or over -- only play hit sound and show blood effects if damage is 1 or over
if damage >= 1 then if damage >= 1 then
-- weapon sounds
--[[ if weapon_def.sounds then
local s = random(0, #weapon_def.sounds)
minetest.sound_play(weapon_def.sounds[s], {
object = self.object,
max_hear_distance = 8
})
else
minetest.sound_play("default_punch", {
object = self.object,
max_hear_distance = 5
})
end ]]
-- blood_particles -- blood_particles
if not disable_blood and self.blood_amount > 0 then if not disable_blood and self.blood_amount > 0 then
@ -3584,7 +3568,7 @@ function mobs:spawn(def)
def.neighbors or {"air"}, def.neighbors or {"air"},
def.min_light or 0, def.min_light or 0,
def.max_light or 15, def.max_light or 15,
def.interval or 30, def.interval or spawn_interval,
def.chance or 5000, def.chance or 5000,
def.active_object_count or 1, def.active_object_count or 1,
def.min_height or -31000, def.min_height or -31000,
@ -4166,7 +4150,7 @@ function mobs:feed_tame(self, clicker, feed_count, breed, tame)
end end
-- make sound when fed so many times -- make sound when fed so many times
--self:mob_sound(self.sounds.random) self:mob_sound(self.sounds.random)
end end
return true return true