From 67ed715bd85a23a594157893955870f4677bd499 Mon Sep 17 00:00:00 2001 From: D00Med Date: Mon, 20 Jun 2016 07:05:05 +1000 Subject: [PATCH] Improvement to the centipede >Improved the centipede >minor improvements to other parts of the mod --- depends.txt | 1 + init.lua | 300 +++++++++++++++++++++++++++++++++++++- mobs.lua | 85 +++++++---- textures/horror_vines.png | Bin 347 -> 499 bytes 4 files changed, 354 insertions(+), 32 deletions(-) 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 b7babccd843590cce6769a90ac29f5e33f4c6c83..a530f7b0d6d348b8d866ec967589d9669be2435c 100644 GIT binary patch delta 473 zcmV;~0Ve+20`miqB!9X|L_t(o!?jmSvV$NHLhkRGa-Ya+k_jy$* zqvfZ_3f~k0Gw_sM0?c${PY*B_G4e|3?0(Vg$l(i^S4zjMPaVPpg@N-*>8Tx~L8q)2 zOE>eSn>oh(tdr)x1rU@S$Tvp;VDA;KgeeKI;fu*rzVFh_Jb$m0mZfCxpI?qu&gc2& zp;I82o)K$aDXr>)T#{zJi(rOrl%?Du4poS2nDweI^w9Kl<~B==aj1gK>De(vi22a; zhY8Xy_d{zL&Qng|GyoWg=;U@VI{?O(^dG@IHV{z#SihjUrl6>KYR4_PVSyz#iJ^x$ zL1O4_1~8C4XMcbj=Ucj&L*YROU0*BvJl|aSN-#x?Q#&$QN~bnp@}cSfPBf*SLuwwH zo?Rce9nkE4*)#)BZYL0EmmvZ98Vj|pZzA-uacy+jsr@^;t-}C5r}FtY?3OV-V|O2L zF$k&M?iVhNP<@|c>W*n37--Ush$1v>y{UrrwKC`n(NX|R(Cg#28Apmggb45$Rv3ts z8?y*as=Ce^pqEEOLT^@bvj=CtdBNSrJBd*;493N%7V^eGLR_Mo|X{ z2q{#_@6}Fv^dhj^vET9p`aP7*UGEf4hqTe};q1m)g}9wkff(P=4jy8!J5vxeeXoI==!BU{buBq+FOM0<|3HTVSjh!E$94x<~hTp`l|ag4|No8u;0KVP_DmfHh9>t?%9YwWOD(8&D8MovRK;`u_6X>)@D}8l5^D*<6r}_`u)F1B% SdTFBo0000