diff --git a/depends.txt b/depends.txt index 7c506cf..baee35c 100644 --- a/depends.txt +++ b/depends.txt @@ -1,2 +1,3 @@ default +stairs mobs? \ No newline at end of file diff --git a/init.lua b/init.lua index d548b48..e014410 100644 --- a/init.lua +++ b/init.lua @@ -3,6 +3,15 @@ if minetest.get_modpath("mobs") then dofile(minetest.get_modpath("horror").."/mobs.lua") end +--stair +stairs.register_stair_and_slab("oldstone", "horror:stone", + {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, + {"horror_stone.png"}, + "Old Stone Stair", + "Old Stone Slab", + default.node_sound_wood_defaults()) + + --nodes minetest.register_node("horror:gargoyle2", { @@ -79,6 +88,41 @@ minetest.register_node("horror:candlestick", { } }) +minetest.register_node("horror:oldstone_corner", { + description = "Old Stone corner", + tiles = { + "horror_stone.png", + "horror_stone.png", + "horror_stone.png", + "horror_stone.png", + "horror_stone.png", + "horror_stone.png" + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.0625, -0.5, 0.4375, 0.0625, 0.4375, 0.5}, -- NodeBox1 + {-0.0625, 0.4375, -0.5, 0.0625, 0.5, 0.5}, -- NodeBox4 + {-0.0625, 0.0625, 0.3125, 0.0625, 0.3125, 0.4375}, -- NodeBox5 + {-0.0625, 0.3125, 0.125, 0.0625, 0.4375, 0.3125}, -- NodeBox6 + {-0.0625, 0.375, -0.4375, 0.0625, 0.4375, -0.0625}, -- NodeBox7 + {-0.0625, -0.4375, 0.375, 0.0625, -0.125, 0.4375}, -- NodeBox8 + {-0.0625, 0.25, 0.25, 0.0625, 0.3125, 0.3125}, -- NodeBox9 + {-0.0625, 0.25, -0.125, 0.0625, 0.3125, 0.1875}, -- NodeBox10 + {-0.0625, -0.1875, 0.25, 0.0625, 0.1875, 0.3125}, -- NodeBox11 + {-0.0625, 0.125, -0.0625, 0.0625, 0.25, 0.125}, -- NodeBox12 + {-0.0625, -0.0625, 0.125, 0.0625, 0.125, 0.25}, -- NodeBox13 + {-0.0625, 0.0625, 0.0625, 0.0625, 0.125, 0.125}, -- NodeBox14 + {-0.0625, -0.3125, 0.3125, 0.0625, -0.125, 0.375}, -- NodeBox15 + {-0.0625, 0.3125, -0.3125, 0.0625, 0.375, -0.0625}, -- NodeBox16 + } + }, + groups = {cracky=3}, +}) + minetest.register_node("horror:stone_corner", { description = "Stone corner", tiles = { @@ -594,7 +638,7 @@ minetest.register_node("horror:tombstone", { }) minetest.register_node("horror:mud", { - description = "mud", + description = "solid mud", tiles = { "horror_mud.png" }, @@ -603,6 +647,45 @@ minetest.register_node("horror:mud", { groups = {crumbly=1, falling_node=1} }) +minetest.register_node("horror:bush", { + description = "bush", + drawtype = "allfaces", + tiles = { + "default_leaves_simple.png^default_leaves.png" + }, + paramtype2 = "facedir", + paramtype = "light", + groups = {snappy=1} +}) + + +minetest.register_node("horror:stone", { + description = "Old Stone", + tiles = { + "horror_stone.png" + }, + paramtype2 = "facedir", + paramtype = "light", + groups = {cracky=1} +}) + +minetest.register_node("horror:mud_liquid", { + description = "mud", + liquid_viscosity = 8, + liquidtype = "source", + liquid_alternative_flowing = "horror:mud_liquid", + liquid_alternative_source = "horror:mud_liquid", + liquid_renewable = false, + liquid_range = 0, + walkable = false, + tiles = { + "horror_mud.png" + }, + paramtype2 = "facedir", + paramtype = "light", + groups = {crumbly=1, liquid=1, falling_node=1} +}) + minetest.register_node("horror:spikes", { description = "spikes", tiles = { @@ -688,6 +771,7 @@ end) minetest.register_node("horror:vines", { description = "vines", + climbable = true, tiles = { "blank.png", "blank.png", @@ -1279,4 +1363,216 @@ minetest.register_node("horror:speaker", { } }) ---All nodeboxes were generated using NodeBoxEditor v0.8.1 Windows \ No newline at end of file +--All nodeboxes were generated using NodeBoxEditor v0.8.1 Windows + +--crafting +minetest.register_craft({ + output = 'horror:lantern', + recipe = { + {'default:glass'}, + {'default:torch'}, + {'default:glass'}, + } +}) + +minetest.register_craft({ + output = 'horror:candlestick', + recipe = { + {'', 'default:torch', ''}, + {'default:torch', 'group:stick', 'default:torch'}, + {'', 'group:stick', ''}, + } +}) + +minetest.register_craft({ + output = 'horror:candle', + recipe = { + {'', '', ''}, + {'', 'default:torch', ''}, + {'', 'default:copper_ingot', ''}, + } +}) + +minetest.register_craft({ + output = 'horror:cleaver', + recipe = { + {'group:stick', 'default:steel_ingot', ''}, + {'group:stick', 'default:steel_ingot', ''}, + {'group:stick', '', ''}, + } +}) + +minetest.register_craft({ + output = 'horror:knife', + recipe = { + {'', 'group:stick', ''}, + {'', 'default:steel_ingot', ''}, + {'', 'default:steel_ingot', ''}, + } +}) + +minetest.register_craft({ + output = 'horror:eye_jar', + recipe = { + {'', '', ''}, + {'', 'default:glass', ''}, + {'', 'default:glass', ''}, + } +}) + +minetest.register_craft({ + output = 'horror:roach_spawner', + recipe = { + {'group:wood', 'group:wood', ''}, + {'group:wood', '', ''}, + {'group:wood', 'group:wood', ''}, + } +}) + +minetest.register_craft({ + output = 'horror:radio', + recipe = { + {'group:stick', '', ''}, + {'default:steel_ingot', 'default:steel_ingot', ''}, + {'default:steel_ingot', 'default:steel_ingot', ''}, + } +}) + +minetest.register_craft({ + output = 'horror:clock', + recipe = { + {'', '', ''}, + {'', 'group:stick', ''}, + {'', 'default:wood', ''}, + } +}) + +minetest.register_craft({ + output = 'horror:tombstone', + recipe = { + {'', '', ''}, + {'', 'default:stone', ''}, + {'', 'default:stone', ''}, + } +}) + +minetest.register_craft({ + output = 'horror:cross', + recipe = { + {'', 'default:stone', ''}, + {'default:stone', 'default:stone', 'default:stone'}, + {'', 'default:stone', ''}, + } +}) + +minetest.register_craft({ + output = 'horror:obsidian_corner 4', + recipe = { + {'', '', ''}, + {'default:obsidian', 'default:obsidian', ''}, + {'default:obsidian', '', ''}, + } +}) + +minetest.register_craft({ + output = 'horror:wood_corner 4', + recipe = { + {'', '', ''}, + {'default:wood', 'default:wood', ''}, + {'default:wood', '', ''}, + } +}) + +minetest.register_craft({ + output = 'horror:stone_corner 4', + recipe = { + {'', '', ''}, + {'default:stone', 'default:stone', ''}, + {'default:stone', '', ''}, + } +}) + +minetest.register_craft({ + output = 'horror:oldstone_corner 4', + recipe = { + {'', '', ''}, + {'horror:stone', 'horror:stone', ''}, + {'horror:stone', '', ''}, + } +}) + +minetest.register_craft({ + type = 'cooking', + output = 'default:coal_lump', + recipe = 'default:tree', +}) + +minetest.register_craft({ + type = 'cooking', + output = 'horror:stone', + recipe = 'default:stone', +}) + +minetest.register_craft({ + output = 'horror:shelf', + recipe = { + {'', '', ''}, + {'default:wood', 'default:wood', ''}, + {'group:stick', '', ''}, + } +}) + +minetest.register_craft({ + output = 'horror:gargoyle2', + recipe = { + {'', '', ''}, + {'', 'default:stone', ''}, + {'default:stone', 'default:stone', 'default:stone'}, + } +}) + +minetest.register_craft({ + output = 'horror:stand', + recipe = { + {'default:stone', 'default:stone', 'default:stone'}, + {'', 'default:stone', ''}, + {'default:stone', 'default:stone', 'default:stone'}, + } +}) + +minetest.register_craft({ + output = 'horror:gargoyle_fountain', + recipe = { + {'', '', ''}, + {'default:stone', 'bucket:bucket_water', ''}, + {'default:stone', '', ''}, + } +}) + + +minetest.register_craft({ + output = 'horror:lavastone 10', + recipe = { + {'', '', ''}, + {'', 'bucket:bucket_lava', ''}, + {'', 'default:stone', ''}, + } +}) + +minetest.register_craft({ + output = 'horror:chain 6', + recipe = { + {'', 'default:steel_ingot', ''}, + {'', 'default:steel_ingot', ''}, + {'', 'default:steel_ingot', ''}, + } +}) + +minetest.register_craft({ + output = 'horror:vines 2', + recipe = { + {'', '', ''}, + {'default:leaves', 'default:leaves', ''}, + {'', '', ''}, + } +}) diff --git a/mobs.lua b/mobs.lua index 123bf03..36e3ddd 100644 --- a/mobs.lua +++ b/mobs.lua @@ -1,4 +1,6 @@ + + mobs:register_mob("horror:centipede_body", { type = "npc", attacks_monsters = true, @@ -17,14 +19,9 @@ mobs:register_mob("horror:centipede_body", { blood_texture = "mobs_blood.png", visual_size = {x=2, y=2}, makes_footstep_sound = false, - walk_velocity = 1.3, - run_velocity = 1.3, - jump = false, - do_custom = function(self) - minetest.after(4, function() - self.object:remove() - end) - end, + walk_velocity = 1.5, + run_velocity = 3.5, + jump = true, water_damage = 0, lava_damage = 2, light_damage = 0, @@ -43,7 +40,8 @@ mobs:register_mob("horror:centipede_body", { }, }) -mobs:register_mob("horror:centipede", { +--Improvements thanks to TenPlus1 and Byakuren +mobs:register_mob("horror:centipede_head", { type = "monster", passive = false, reach = 1, @@ -70,14 +68,42 @@ mobs:register_mob("horror:centipede", { random = "mobs_spider", attack = "mobs_spider", }, - do_custom = function(self, dtime) - local pos = self.object:getpos() - minetest.env:add_entity(pos, "horror:centipede_body") + do_custom = function(self) - minetest.after(0.25, function() - minetest.env:add_entity(pos, "horror:centipede_body") - end) - end, + if not self.centipede then + self.centipede = true -- flip switch so this part is done only once + + -- get head position and define a few temp variables + local pos = self.object:getpos() + local obj, obj2, 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") + ent = obj:get_luaentity() + ent.following = self.object + + -- add body and make it follow previous body segment + obj2 = minetest.add_entity({x=pos.x+2, y=pos.y, z=pos.z}, "horror:centipede_body") + ent = obj2:get_luaentity() + ent.following = obj + -- add body and make it follow previous body segment + obj3 = minetest.add_entity({x=pos.x+3, y=pos.y, z=pos.z}, "horror:centipede_body") + ent = obj3:get_luaentity() + ent.following = obj2 + -- add body and make it follow previous body segment + obj4 = minetest.add_entity({x=pos.x+4, y=pos.y, z=pos.z}, "horror:centipede_body") + ent = obj4:get_luaentity() + ent.following = obj3 + -- add body and make it follow previous body segment + obj5 = minetest.add_entity({x=pos.x+5, y=pos.y, z=pos.z}, "horror:centipede_body") + ent = obj5:get_luaentity() + ent.following = obj4 + -- add body and make it follow previous body segment + obj6 = minetest.add_entity({x=pos.x+6, y=pos.y, z=pos.z}, "horror:centipede_body") + ent = obj6:get_luaentity() + ent.following = obj5 + end + end, water_damage = 0, lava_damage = 2, light_damage = 0, @@ -96,9 +122,9 @@ mobs:register_mob("horror:centipede", { }, }) -mobs:register_spawn("horror:centipede", {"horror:mud","default:dirt_with_dry_grass"}, 20, 10, 15000, 2, 31000) +mobs:register_spawn("horror:centipede_head", {"horror:mud","default:dirt_with_dry_grass"}, 20, 0, 15000, 2, 31000) -mobs:register_egg("horror:centipede", "Centipede", "default_dirt.png", 1) +mobs:register_egg("horror:centipede_head", "Centipede", "default_dirt.png", 1) mobs:register_mob("horror:spider", { @@ -149,7 +175,7 @@ mobs:register_mob("horror:spider", { }, }) -mobs:register_spawn("horror:spider", {"default:leaves","default:stone"}, 20, 10, 15000, 2, 31000) +mobs:register_spawn("horror:spider", {"default:leaves","default:stone"}, 20, 0, 15000, 2, 31000) mobs:register_egg("horror:spider", "6-legged Spider", "default_obsidian.png", 1) @@ -206,11 +232,10 @@ mobs:register_mob("horror:dragon", { }, }) -mobs:spawn_specific("horror:dragon", {"air"}, {"default:stone"}, 20, 10, 300, 15000, 2, -100, 11000) +mobs:spawn_specific("horror:dragon", {"air"}, {"default:stone"}, 20, 0, 300, 15000, 2, -100, 11000) mobs:register_egg("horror:dragon", "Zombie Dragon", "horror_orb.png", 1) ---Thanks to Tenplus1 mobs:register_arrow("horror:fireball", { visual = "sprite", visual_size = {x = 0.5, y = 0.5}, @@ -276,8 +301,8 @@ mobs:register_mob("horror:skull", { {x=0, y=0, z=0}, --maxvel {x=0,y=1,z=0}, --minacc {x=0.5,y=1,z=0.5}, --maxacc - 0.2, --minexptime - 0.4, --maxexptime + 1, --minexptime + 2, --maxexptime 3, --minsize 5, --maxsize false, --collisiondetection @@ -304,7 +329,7 @@ mobs:register_mob("horror:skull", { }, }) -mobs:spawn_specific("horror:skull", {"air"}, {"default:stone"}, 20, 10, 300, 15000, 2, -100, 11000) +mobs:spawn_specific("horror:skull", {"air"}, {"default:stone"}, 20, 0, 300, 15000, 2, -100, 11000) mobs:register_egg("horror:skull", "Flying Skull", "horror_gfire_inv.png", 1) @@ -335,7 +360,7 @@ mobs:register_mob("horror:mothman", { do_custom = function(self) local apos = self.object:getpos() local part = minetest.add_particlespawner( - 12, --amount + 1, --amount 0.3, --time {x=apos.x-0.3, y=apos.y-0.3, z=apos.z-0.3}, --minpos {x=apos.x+0.3, y=apos.y-0.3, z=apos.z+0.3}, --maxpos @@ -371,7 +396,7 @@ mobs:register_mob("horror:mothman", { }, }) -mobs:spawn_specific("horror:mothman", {"air"}, {"horror:lantern"}, 20, 10, 300, 15000, 2, -100, 11000) +mobs:spawn_specific("horror:mothman", {"air"}, {"horror:lantern"}, 20, 0, 300, 15000, 2, -100, 11000) mobs:register_egg("horror:mothman", "Mothman", "horror_orb.png", 1) @@ -419,7 +444,7 @@ mobs:register_mob("horror:manticore", { }, }) -mobs:spawn_specific("horror:manticore", {"default:dirt"}, {"default:stone"}, 20, 10, 300, 15000, 2, -100, 11000) +mobs:spawn_specific("horror:manticore", {"default:dirt_with_grass"}, {"default:stone"}, 20, 0, 300, 15000, 2, -100, 11000) mobs:register_egg("horror:manticore", "Manticore", "default_dirt.png", 1) @@ -466,7 +491,7 @@ mobs:register_mob("horror:demon", { }, }) -mobs:spawn_specific("horror:demon", {"default:dirt_with_grass"}, {"default:lava_source"}, 20, 10, 300, 15000, 2, -100, 11000) +mobs:spawn_specific("horror:demon", {"default:dirt_with_grass"}, {"default:lava_source"}, 20, 0, 300, 15000, 2, -100, 11000) mobs:register_egg("horror:demon", "Demon", "default_dirt.png", 1) @@ -510,7 +535,7 @@ mobs:register_mob("horror:armour", { }, }) -mobs:spawn_specific("horror:armor", {"default:cobblestone"}, {"default:stone_brick"}, 20, 10, 300, 15000, 2, -100, 11000) +mobs:spawn_specific("horror:armor", {"default:cobblestone"}, {"default:stone_brick"}, 20, 0, 300, 15000, 2, -100, 11000) mobs:register_egg("horror:armour", "Axe Armour", "default_stone.png", 1) @@ -555,6 +580,6 @@ mobs:register_mob("horror:sam", { }, }) -mobs:spawn_specific("horror:sam", {"default:cobblestone"}, {"default:stone_brick"}, 20, 10, 300, 15000, 2, -100, 11000) +mobs:spawn_specific("horror:sam", {"default:cobblestone"}, {"default:stone_brick"}, 20, 0, 300, 15000, 2, -100, 11000) mobs:register_egg("horror:sam", "Sam Head", "default_brick.png", 1) diff --git a/textures/horror_vines.png b/textures/horror_vines.png index b7babcc..a530f7b 100644 Binary files a/textures/horror_vines.png and b/textures/horror_vines.png differ