add .luacheckrc and fix common issues
This commit is contained in:
parent
09e6576f13
commit
7bc00cb731
22
.luacheckrc
Normal file
22
.luacheckrc
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
globals = {
|
||||
"horror"
|
||||
}
|
||||
|
||||
read_globals = {
|
||||
-- Stdlib
|
||||
string = {fields = {"split"}},
|
||||
table = {fields = {"copy", "getn"}},
|
||||
|
||||
-- Minetest
|
||||
"vector", "ItemStack",
|
||||
"dump", "VoxelArea",
|
||||
|
||||
-- deps
|
||||
"minetest",
|
||||
"default",
|
||||
"tnt",
|
||||
"bucket",
|
||||
"stairs",
|
||||
"mobs"
|
||||
}
|
137
init.lua
137
init.lua
@ -39,10 +39,10 @@ local weird_stuff = false
|
||||
minetest.register_globalstep(function()
|
||||
if math.random(1,1000) == 1 and sounds then
|
||||
local sound = math.random(1,7)
|
||||
minetest.sound_play(sound,
|
||||
minetest.sound_play(sound,
|
||||
{gain = 0.4, max_hear_distance = 1, loop = false})
|
||||
end
|
||||
|
||||
|
||||
if weird_stuff and math.random(1, 10000) == 1 then
|
||||
if math.random(1,4) == 1 then
|
||||
minetest.request_shutdown("bye bye!",false)
|
||||
@ -77,8 +77,8 @@ minetest.register_globalstep(function()
|
||||
end)
|
||||
|
||||
--dark setting
|
||||
dark = true
|
||||
dark_dark = true
|
||||
local dark = true
|
||||
local dark_dark = true
|
||||
|
||||
--new style, set to false for the nodebox candle and candlestick
|
||||
local new_style = true
|
||||
@ -88,7 +88,7 @@ horror = {}
|
||||
|
||||
--Vignette overlay from Vignette mod by TriBlade9(license MIT)
|
||||
--permanent dawn
|
||||
if dark == true then
|
||||
if dark then
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
minetest.after(0,function()
|
||||
player:override_day_night_ratio(0.41)
|
||||
@ -123,7 +123,10 @@ minetest.register_on_joinplayer(function(player)
|
||||
minetest.after(50, function()
|
||||
if player ~= nil then
|
||||
local playerpos = player:getpos()
|
||||
tnt.boom({x=playerpos.x, y=playerpos.y+1, z=playerpos.z}, {damage_radius=5,radius=4,ignore_protection=false, disable_playerdamage=false})
|
||||
tnt.boom(
|
||||
{x=playerpos.x, y=playerpos.y+1, z=playerpos.z},
|
||||
{damage_radius=5,radius=4,ignore_protection=false, disable_playerdamage=false}
|
||||
)
|
||||
end
|
||||
end)
|
||||
end
|
||||
@ -168,7 +171,7 @@ minetest.register_node("horror:blood_flowing", {
|
||||
liquidtype = "flowing",
|
||||
liquid_alternative_flowing = "horror:blood_flowing",
|
||||
liquid_alternative_source = "horror:bloodsource",
|
||||
liquid_viscosity = WATER_VISC,
|
||||
liquid_viscosity = 1,
|
||||
freezemelt = "default:snow",
|
||||
post_effect_color = {a=70, r=200, g=70, b=70},
|
||||
groups = {liquid=3, puts_out_fire=1, not_in_creative_inventory=1, freezes=1, melt_around=1},
|
||||
@ -200,7 +203,7 @@ minetest.register_node("horror:bloodsource", {
|
||||
liquidtype = "source",
|
||||
liquid_alternative_flowing = "horror:blood_flowing",
|
||||
liquid_alternative_source = "horror:bloodsource",
|
||||
liquid_viscosity = WATER_VISC,
|
||||
liquid_viscosity = 1,
|
||||
freezemelt = "default:ice",
|
||||
post_effect_color = {a=70, r=200, g=70, b=70},
|
||||
groups = {liquid=3, puts_out_fire=1, freezes=1}
|
||||
@ -225,7 +228,7 @@ stairs.register_stair_and_slab("oldstone", "horror:stone",
|
||||
"Old Stone Slab",
|
||||
default.node_sound_wood_defaults())
|
||||
|
||||
|
||||
|
||||
--corners
|
||||
|
||||
function horror.register_corner(name, desc, text, breakeable_by_hand)
|
||||
@ -304,7 +307,7 @@ minetest.register_node("horror:candlestick", {
|
||||
{-0.125, 0.125, -0.0625, 0.125, 0.1875, 0.0625}, -- NodeBox16
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
else
|
||||
minetest.register_node("horror:candlestick", {
|
||||
description = "Candlestick",
|
||||
@ -325,7 +328,7 @@ minetest.register_node("horror:candlestick", {
|
||||
{-0.25, -0.5, -0.25, 0.25, 0.4375, 0.25},
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
@ -375,21 +378,36 @@ minetest.register_node("horror:candle", {
|
||||
{-0.25, -0.5, -0.25, 0.25, 0.3, 0.25},
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
end
|
||||
|
||||
--ABMs
|
||||
|
||||
local punch_entities = {}
|
||||
punch_entities["horror:ghost"] = true
|
||||
punch_entities["horror:centipede"] = true
|
||||
punch_entities["horror:spider"] = true
|
||||
punch_entities["horror:demon"] = true
|
||||
punch_entities["horror:pinky"] = true
|
||||
punch_entities["horror:skull"] = true
|
||||
punch_entities["horror:mancubus"] = true
|
||||
punch_entities["horror:manticore"] = true
|
||||
punch_entities["horror:shadow"] = true
|
||||
punch_entities["horror:cacodemon"] = true
|
||||
punch_entities["horror:mogall"] = true
|
||||
punch_entities["creatures:zombie"] = true
|
||||
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"horror:sunorb", "horror:gloworb"},
|
||||
interval = 5,
|
||||
chance = 1,
|
||||
action = function(pos)
|
||||
local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 5)
|
||||
for k, obj in pairs(objs) do
|
||||
local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 5)
|
||||
for _, obj in pairs(objs) do
|
||||
if obj:get_luaentity() ~= nil then
|
||||
local ent = obj:get_luaentity().name
|
||||
if ent == "horror:ghost" or ent == "horror:centipede" or ent == "horror:spider" or ent == "horror:demon" or ent == "horror:pinky" or ent == "horror:skull" or ent == "horror:mancubus" or ent == "horror:manticore" or ent == "horror:shadow" or ent == "horror:cacodemon" or ent == "horror:mogall" or ent == "creatures:zombie" then
|
||||
if punch_entities[ent] then
|
||||
obj:punch(obj, 0.5, {
|
||||
full_punch_interval=0.5,
|
||||
damage_groups={fleshy=4},
|
||||
@ -414,7 +432,7 @@ minetest.register_abm({
|
||||
nodenames = {"horror:fire"},
|
||||
interval = 1,
|
||||
chance = 2,
|
||||
action = function(pos, node)
|
||||
action = function(pos)
|
||||
minetest.add_particlespawner({
|
||||
amount = 30,
|
||||
time = 4,
|
||||
@ -448,7 +466,7 @@ minetest.register_abm({
|
||||
nodenames = {"horror:lantern"},
|
||||
interval = 1,
|
||||
chance = 2,
|
||||
action = function(pos, node)
|
||||
action = function(pos)
|
||||
minetest.add_particlespawner({
|
||||
amount = 10,
|
||||
time = 4,
|
||||
@ -472,7 +490,7 @@ minetest.register_abm({
|
||||
nodenames = {"horror:fountain"},
|
||||
interval = 1,
|
||||
chance = 2,
|
||||
action = function(pos, node)
|
||||
action = function(pos)
|
||||
minetest.add_particlespawner({
|
||||
amount = 59,
|
||||
time = 4,
|
||||
@ -497,7 +515,7 @@ minetest.register_abm({
|
||||
nodenames = {"horror:flames"},
|
||||
interval = 3,
|
||||
chance = 1,
|
||||
action = function(pos, node)
|
||||
action = function(pos)
|
||||
minetest.add_particlespawner({
|
||||
amount = 70,
|
||||
time = 4,
|
||||
@ -522,7 +540,7 @@ minetest.register_abm({
|
||||
nodenames = {"horror:head"},
|
||||
interval = 2,
|
||||
chance = 5,
|
||||
action = function(pos, node)
|
||||
action = function(pos)
|
||||
minetest.add_particlespawner({
|
||||
amount = 2,
|
||||
time = 4,
|
||||
@ -547,14 +565,14 @@ minetest.register_abm({
|
||||
nodenames = {"horror:clock"},
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node)
|
||||
minetest.sound_play("clock",
|
||||
action = function(pos)
|
||||
minetest.sound_play("clock",
|
||||
{gain = 3, max_hear_distance = 1, loop = false})
|
||||
local meta = minetest.get_meta(pos)
|
||||
local time1 = minetest.get_timeofday()*24000
|
||||
meta:set_string("infotext", "time:"..time1)
|
||||
if math.random(1,500) then
|
||||
minetest.sound_play("clock_strikes_twelve",
|
||||
minetest.sound_play("clock_strikes_twelve",
|
||||
{gain = 1, max_hear_distance = 1, loop = false})
|
||||
end
|
||||
end
|
||||
@ -565,7 +583,7 @@ minetest.register_abm({
|
||||
-- interval = 143.0,
|
||||
-- chance = 1,
|
||||
-- action = function(...)
|
||||
-- minetest.sound_play("Undersea_Garden",
|
||||
-- minetest.sound_play("Undersea_Garden",
|
||||
-- {gain = 2, max_hear_distance = 1, loop = false})
|
||||
-- end
|
||||
-- })
|
||||
@ -574,7 +592,7 @@ minetest.register_abm({
|
||||
nodenames = {"horror:roach_spawner"},
|
||||
interval = 2,
|
||||
chance = 2,
|
||||
action = function(pos, node)
|
||||
action = function(pos)
|
||||
minetest.add_particlespawner({
|
||||
amount = 10,
|
||||
time = 4,
|
||||
@ -598,28 +616,29 @@ minetest.register_abm({
|
||||
nodenames = {"horror:cactus"},
|
||||
interval = 10,
|
||||
chance = 150,
|
||||
action = function(pos, node)
|
||||
action = function(pos)
|
||||
local num = math.random(1,4)
|
||||
if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "air" or minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "horror:cactus" then
|
||||
minetest.env:set_node({x=pos.x, y=pos.y-1, z=pos.z}, {name="horror:cactus"})
|
||||
minetest.env:remove_node(pos)
|
||||
if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "air" or
|
||||
minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "horror:cactus" then
|
||||
minetest.env:set_node({x=pos.x, y=pos.y-1, z=pos.z}, {name="horror:cactus"})
|
||||
minetest.env:remove_node(pos)
|
||||
end
|
||||
if num == 1 then
|
||||
if minetest.get_node({x=pos.x-2, y=pos.y, z=pos.z}).name == "air" then
|
||||
minetest.env:set_node({x=pos.x-2, y=pos.y, z=pos.z}, {name="horror:cactus"})
|
||||
end
|
||||
if minetest.get_node({x=pos.x-2, y=pos.y, z=pos.z}).name == "air" then
|
||||
minetest.env:set_node({x=pos.x-2, y=pos.y, z=pos.z}, {name="horror:cactus"})
|
||||
end
|
||||
elseif num == 2 then
|
||||
if minetest.get_node({x=pos.x+2, y=pos.y, z=pos.z}).name == "air" then
|
||||
minetest.env:set_node({x=pos.x+2, y=pos.y, z=pos.z}, {name="horror:cactus"})
|
||||
end
|
||||
if minetest.get_node({x=pos.x+2, y=pos.y, z=pos.z}).name == "air" then
|
||||
minetest.env:set_node({x=pos.x+2, y=pos.y, z=pos.z}, {name="horror:cactus"})
|
||||
end
|
||||
elseif num == 3 then
|
||||
if minetest.get_node({x=pos.x, y=pos.y, z=pos.z-2}).name == "air" then
|
||||
minetest.env:set_node({x=pos.x, y=pos.y, z=pos.z-2}, {name="horror:cactus"})
|
||||
end
|
||||
if minetest.get_node({x=pos.x, y=pos.y, z=pos.z-2}).name == "air" then
|
||||
minetest.env:set_node({x=pos.x, y=pos.y, z=pos.z-2}, {name="horror:cactus"})
|
||||
end
|
||||
elseif num == 4 then
|
||||
if minetest.get_node({x=pos.x, y=pos.y, z=pos.z+2}).name == "air" then
|
||||
minetest.env:set_node({x=pos.x, y=pos.y, z=pos.z+2}, {name="horror:cactus"})
|
||||
end
|
||||
if minetest.get_node({x=pos.x, y=pos.y, z=pos.z+2}).name == "air" then
|
||||
minetest.env:set_node({x=pos.x, y=pos.y, z=pos.z+2}, {name="horror:cactus"})
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
@ -688,7 +707,7 @@ minetest.register_node("horror:sunorb", {
|
||||
tiles = {"horror_orb.png"},
|
||||
inventory_image = "horror_orb.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
sunlight_propagates = true,
|
||||
light_source = 2000,
|
||||
alpha = 100,
|
||||
walkable = false,
|
||||
@ -698,7 +717,7 @@ minetest.register_node("horror:sunorb", {
|
||||
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
|
||||
},
|
||||
groups = {cracky=3,dig_immediate=3},
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
after_place_node = function(pos, placer)
|
||||
if placer:is_player() then
|
||||
minetest.set_node(pos, {name="horror:sunorb", param2=1})
|
||||
end
|
||||
@ -714,7 +733,7 @@ minetest.register_node("horror:pentagram", {
|
||||
use_texture_alpha = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
sunlight_propagates = true,
|
||||
light_source = 50,
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
@ -757,7 +776,7 @@ minetest.register_node("horror:portal", {
|
||||
use_texture_alpha = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
sunlight_propagates = true,
|
||||
light_source = 50,
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
@ -765,7 +784,7 @@ minetest.register_node("horror:portal", {
|
||||
type = "wallmounted",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}
|
||||
},
|
||||
on_construct = function(pos, node, _)
|
||||
on_construct = function(pos)
|
||||
minetest.after(1, function()
|
||||
minetest.env:add_entity(pos, "horror:pinky")
|
||||
minetest.remove_node(pos)
|
||||
@ -782,7 +801,7 @@ minetest.register_node("horror:blood_splatter", {
|
||||
use_texture_alpha = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
selection_box = {
|
||||
@ -797,7 +816,7 @@ minetest.register_node("horror:glowsteel_block", {
|
||||
tiles = {{
|
||||
name="horror_glowsteel.png",
|
||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1.00},
|
||||
}},
|
||||
}},
|
||||
inventory_image = "horror_glowsteelinv.png",
|
||||
groups = {cracky = 2},
|
||||
sunlight_propagates = true,
|
||||
@ -808,7 +827,7 @@ minetest.register_node("horror:glowsteel_block", {
|
||||
minetest.register_node("horror:smashed_glass", {
|
||||
description = "Smashed Glass",
|
||||
tiles = {"default_glass.png^horror_glass_cracks.png",
|
||||
},
|
||||
},
|
||||
drawtype = "glasslike",
|
||||
inventory_image = "default_glass.png^horror_glass_cracks.png",
|
||||
groups = {cracky = 2, oddly_breakable_by_hand=1, dig_immediate=3},
|
||||
@ -944,7 +963,7 @@ minetest.register_node("horror:lavastone", {
|
||||
animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.00},
|
||||
}},
|
||||
inventory_image = "horror_fire_inv.png",
|
||||
wield_image = "horror_fire_inv.png",
|
||||
wield_image = "horror_fire_inv.png",
|
||||
groups = {cracky=1}
|
||||
})
|
||||
|
||||
@ -955,7 +974,7 @@ minetest.register_node("horror:animflesh", {
|
||||
animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.00},
|
||||
}},
|
||||
inventory_image = "horror_flesh.png",
|
||||
wield_image = "horror_flesh.png",
|
||||
wield_image = "horror_flesh.png",
|
||||
groups = {fleshy=1, dig_immediate=3, oddly_breakable_by_hand=1}
|
||||
})
|
||||
|
||||
@ -1280,7 +1299,7 @@ minetest.register_node("horror:candle", {
|
||||
{-0.25, -0.5, -0.25, 0.25, 0.3, 0.25},
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_node("horror:clock", {
|
||||
@ -1440,7 +1459,7 @@ minetest.register_node("horror:tree", {
|
||||
tiles = {"horror_tree.png"},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
buildable_to = true,
|
||||
buildable_to = true,
|
||||
sunlight_propagates = true,
|
||||
inventory_image = "horror_tree.png",
|
||||
visual_scale = 2,
|
||||
@ -1460,7 +1479,7 @@ minetest.register_node("horror:cactus", {
|
||||
tiles = {"horror_cactus.png"},
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
buildable_to = true,
|
||||
buildable_to = true,
|
||||
sunlight_propagates = true,
|
||||
inventory_image = "horror_cactus.png",
|
||||
visual_scale = 2,
|
||||
@ -1488,8 +1507,8 @@ minetest.register_node("horror:radio", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {oddly_breakable_by_hand=1},
|
||||
on_rightclick = function(pos)
|
||||
minetest.sound_play("Undersea_Garden",
|
||||
on_rightclick = function()
|
||||
minetest.sound_play("Undersea_Garden",
|
||||
{gain = 0.5, max_hear_distance = 1, loop = false})
|
||||
end,
|
||||
node_box = {
|
||||
@ -1538,7 +1557,7 @@ minetest.register_node("horror:roach", {
|
||||
tiles = {"horror_roach.png"},
|
||||
inventory_image = "horror_roach.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
selection_box = {
|
||||
@ -1556,7 +1575,7 @@ minetest.register_node("horror:head", {
|
||||
tiles = {"horror_head.png"},
|
||||
inventory_image = "horror_head.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
sunlight_propagates = true,
|
||||
walkable = true,
|
||||
is_ground_content = false,
|
||||
selection_box = {
|
||||
@ -1574,7 +1593,7 @@ minetest.register_node("horror:flames", {
|
||||
tiles = {"horror_flame.png"},
|
||||
inventory_image = "horror_flame.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
sunlight_propagates = true,
|
||||
light_source = 50,
|
||||
walkable = false,
|
||||
is_ground_content = false,
|
||||
|
80
mobs.lua
80
mobs.lua
@ -14,7 +14,7 @@ mobs:register_arrow("horror:fireball", {
|
||||
damage_groups = {fleshy = 3},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
@ -22,7 +22,7 @@ mobs:register_arrow("horror:fireball", {
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
hit_node = function(self)
|
||||
self.object:remove()
|
||||
end,
|
||||
})
|
||||
@ -41,7 +41,7 @@ mobs:register_arrow("horror:fireball_2", {
|
||||
damage_groups = {fleshy = 2},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
@ -49,7 +49,7 @@ mobs:register_arrow("horror:fireball_2", {
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
hit_node = function(self)
|
||||
self.object:remove()
|
||||
end,
|
||||
})
|
||||
@ -71,7 +71,7 @@ mobs:register_arrow("horror:fireball_3", {
|
||||
damage_groups = {fleshy = 2},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
@ -79,7 +79,7 @@ mobs:register_arrow("horror:fireball_3", {
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
hit_node = function(_, pos)
|
||||
mobs:explosion(pos, 1, 1, 1)
|
||||
end,
|
||||
})
|
||||
@ -98,7 +98,7 @@ mobs:register_arrow("horror:rocket", {
|
||||
damage_groups = {fleshy = 3},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
@ -106,7 +106,7 @@ mobs:register_arrow("horror:rocket", {
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
hit_node = function(_, pos)
|
||||
mobs:explosion(pos, 2, 1, 1)
|
||||
end,
|
||||
})
|
||||
@ -126,7 +126,7 @@ mobs:register_arrow("horror:fireball_3", {
|
||||
damage_groups = {fleshy = 2},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
@ -134,7 +134,7 @@ mobs:register_arrow("horror:fireball_3", {
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
hit_node = function(self)
|
||||
self.object:remove()
|
||||
end,
|
||||
})
|
||||
@ -153,7 +153,7 @@ mobs:register_arrow("horror:rocket", {
|
||||
damage_groups = {fleshy = 3},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
@ -161,7 +161,7 @@ mobs:register_arrow("horror:rocket", {
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
hit_node = function(self)
|
||||
self.object:remove()
|
||||
end,
|
||||
})
|
||||
@ -181,7 +181,7 @@ mobs:register_arrow("horror:fireball_4", {
|
||||
damage_groups = {fleshy = 3},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
@ -189,7 +189,7 @@ mobs:register_arrow("horror:fireball_4", {
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
hit_node = function(self)
|
||||
self.object:remove()
|
||||
end,
|
||||
})
|
||||
@ -249,7 +249,7 @@ mobs:register_mob("horror:hellbaron", {
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:hellbaron", {"default:lava_source", "default:stone"}, 20, 0, 15000, 2, 31000)
|
||||
|
||||
|
||||
mobs:register_egg("horror:hellbaron", "Hell Baron", "default_dirt.png", 1)
|
||||
|
||||
mobs:register_mob("horror:centipede_body", {
|
||||
@ -331,7 +331,7 @@ mobs:register_mob("horror:centipede_head", {
|
||||
|
||||
-- get head position and define a few temp variables
|
||||
local pos = self.object:getpos()
|
||||
local obj, obj2, ent
|
||||
local obj, obj2, obj3, obj4, obj5, obj6, ent
|
||||
|
||||
-- add body and make it follow head
|
||||
obj = minetest.add_entity({x=pos.x+1, y=pos.y, z=pos.z}, "horror:centipede_body")
|
||||
@ -471,7 +471,7 @@ mobs:register_mob("horror:ghost", {
|
||||
on_rightclick = function(self, clicker)
|
||||
local item = clicker:get_wielded_item():get_name()
|
||||
if item == "horror:ring" then
|
||||
pos = self.object:getpos()
|
||||
local pos = self.object:getpos()
|
||||
local obj = minetest.env:add_entity(pos, "horror:ghost_friendly")
|
||||
local ghost = obj:get_luaentity()
|
||||
ghost.tamed = true
|
||||
@ -551,7 +551,10 @@ mobs:register_mob("horror:ghost_friendly", {
|
||||
},
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:ghost", {"default:snowblock","default:sand", "default:dirt_with_snow"}, 20, 0, 15000, 2, 31000)
|
||||
mobs:register_spawn("horror:ghost",
|
||||
{"default:snowblock","default:sand", "default:dirt_with_snow"},
|
||||
20, 0, 15000, 2, 31000
|
||||
)
|
||||
|
||||
mobs:register_egg("horror:ghost", "Ghost", "default_snow.png", 1)
|
||||
|
||||
@ -715,7 +718,7 @@ mobs:register_mob("horror:dragon", {
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:dragon", {"default:pine_needles",}, 20, 0, 35000, 200, 31000)
|
||||
|
||||
|
||||
mobs:register_egg("horror:dragon", "Zombie Dragon", "horror_orb.png", 1)
|
||||
|
||||
|
||||
@ -747,7 +750,7 @@ mobs:register_mob("horror:skull", {
|
||||
fly = true,
|
||||
do_custom = function(self)
|
||||
local apos = self.object:getpos()
|
||||
local part = minetest.add_particlespawner(
|
||||
minetest.add_particlespawner(
|
||||
12, --amount
|
||||
0.3, --time
|
||||
{x=apos.x-0.3, y=apos.y+0.6, z=apos.z-0.3}, --minpos
|
||||
@ -785,7 +788,7 @@ mobs:register_mob("horror:skull", {
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:skull", {"fire:basic_flame","default:leaves"}, 20, 0, 15000, 2, 31000)
|
||||
|
||||
|
||||
mobs:register_egg("horror:skull", "Lost Soul", "horror_gfire_inv.png", 1)
|
||||
|
||||
mobs:register_mob("horror:cacodemon", {
|
||||
@ -836,7 +839,7 @@ mobs:register_mob("horror:cacodemon", {
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:cacodemon", {"fire:basic_flame","default:lava_flowing"}, 20, 0, 15000, 2, 31000)
|
||||
|
||||
|
||||
mobs:register_egg("horror:cacodemon", "Cacodemon", "wool_red.png", 1)
|
||||
|
||||
mobs:register_mob("horror:mogall", {
|
||||
@ -887,7 +890,7 @@ mobs:register_mob("horror:mogall", {
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:mogall", {"default:jungleleaves",}, 20, 0, 15000, 2, 31000)
|
||||
|
||||
|
||||
mobs:register_egg("horror:mogall", "Mogall", "horror_stone.png", 1)
|
||||
|
||||
mobs:register_mob("horror:shadow", {
|
||||
@ -925,7 +928,7 @@ mobs:register_mob("horror:shadow", {
|
||||
view_range = 30,
|
||||
do_custom = function(self)
|
||||
local apos = self.object:getpos()
|
||||
local part = minetest.add_particlespawner(
|
||||
minetest.add_particlespawner(
|
||||
1, --amount
|
||||
0.3, --time
|
||||
{x=apos.x-0.3, y=apos.y+0.3, z=apos.z-0.3}, --minpos
|
||||
@ -957,7 +960,7 @@ mobs:register_mob("horror:shadow", {
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:shadow", {"default:snow", "default:pine_needles"}, 20, 0, 15000, 2, 31000)
|
||||
|
||||
|
||||
mobs:register_egg("horror:shadow", "Shadow elemental", "default_obsidian.png", 1)
|
||||
|
||||
|
||||
@ -987,7 +990,7 @@ mobs:register_mob("horror:mothman", {
|
||||
fly = true,
|
||||
do_custom = function(self)
|
||||
local apos = self.object:getpos()
|
||||
local part = minetest.add_particlespawner(
|
||||
minetest.add_particlespawner(
|
||||
1, --amount
|
||||
0.3, --time
|
||||
{x=apos.x-0.3, y=apos.y-0.3, z=apos.z-0.3}, --minpos
|
||||
@ -1025,7 +1028,7 @@ mobs:register_mob("horror:mothman", {
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:mothman", {"horror:lantern", "default:aspen_leaves"}, 20, 0, 15000, 2, 31000)
|
||||
|
||||
|
||||
mobs:register_egg("horror:mothman", "Mothman", "horror_orb.png", 1)
|
||||
|
||||
|
||||
@ -1074,7 +1077,7 @@ mobs:register_mob("horror:manticore", {
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:manticore", {"default:dirt_with_grass","default:mossycobble"}, 20, 0, 15000, 2, 31000)
|
||||
|
||||
|
||||
mobs:register_egg("horror:manticore", "Manticore", "default_dirt.png", 1)
|
||||
|
||||
|
||||
@ -1131,7 +1134,7 @@ mobs:register_mob("horror:imp", {
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:imp", {"default:dirt","horror:mud","default:gravel"}, 20, 0, 15000, 2, 31000)
|
||||
|
||||
|
||||
mobs:register_egg("horror:imp", "Imp", "default_dirt.png", 1)
|
||||
|
||||
mobs:register_mob("horror:werewolf", {
|
||||
@ -1184,8 +1187,11 @@ mobs:register_mob("horror:werewolf", {
|
||||
},
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:werewolf", {"default:dirt_with_grass","horror:mud","default:gravel"}, 20, 0, 35000, 2, 31000)
|
||||
|
||||
mobs:register_spawn("horror:werewolf",
|
||||
{"default:dirt_with_grass","horror:mud","default:gravel"},
|
||||
20, 0, 35000, 2, 31000
|
||||
)
|
||||
|
||||
mobs:register_egg("horror:werewolf", "Werewolf", "default_gravel.png", 1)
|
||||
|
||||
mobs:register_mob("horror:mancubus", {
|
||||
@ -1239,7 +1245,7 @@ mobs:register_mob("horror:mancubus", {
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:mancubus", {"default:stone","default:sand"}, 20, 0, 15000, 2, 31000)
|
||||
|
||||
|
||||
mobs:register_egg("horror:mancubus", "Mancubus", "default_sand.png", 1)
|
||||
|
||||
mobs:register_mob("horror:birdie", {
|
||||
@ -1287,7 +1293,7 @@ mobs:register_mob("horror:birdie", {
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:birdie", {"default:dirt_with_grass","default:dirt_with_dry_grass"}, 20, 0, 15000, 2, 31000)
|
||||
|
||||
|
||||
mobs:register_egg("horror:birdie", "Birdie", "default_dirt.png", 1)
|
||||
|
||||
mobs:register_mob("horror:pinky", {
|
||||
@ -1335,7 +1341,7 @@ mobs:register_mob("horror:pinky", {
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:pinky", {"default:sandstone_brick","nether:stone"}, 20, 0, 15000, 2, 31000)
|
||||
|
||||
|
||||
mobs:register_egg("horror:pinky", "Pinky", "horror_flesh.png", 1)
|
||||
|
||||
mobs:register_mob("horror:demon", {
|
||||
@ -1383,7 +1389,7 @@ mobs:register_mob("horror:demon", {
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:demon", {"default:stone","default:lava_flowing"}, 20, 0, 15000, 2, 31000)
|
||||
|
||||
|
||||
mobs:register_egg("horror:demon", "Demon", "default_dirt.png", 1)
|
||||
|
||||
mobs:register_mob("horror:armour", {
|
||||
@ -1427,7 +1433,7 @@ mobs:register_mob("horror:armour", {
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:armour", {"default:mossycobble","default:sandstone_brick"}, 20, 0, 15000, 2, 31000)
|
||||
|
||||
|
||||
mobs:register_egg("horror:armour", "Axe Armour", "default_stone.png", 1)
|
||||
|
||||
mobs:register_mob("horror:sam", {
|
||||
@ -1473,5 +1479,5 @@ mobs:register_mob("horror:sam", {
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:sam", {"default:mossycobble","default:sandstone_brick"}, 20, 0, 15000, 2, 31000)
|
||||
|
||||
|
||||
mobs:register_egg("horror:sam", "Sam Head", "default_brick.png", 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user