diff --git a/doctorzombie/init.lua b/doctorzombie/init.lua index bd88e59..fc19897 100644 --- a/doctorzombie/init.lua +++ b/doctorzombie/init.lua @@ -1,3 +1,5 @@ +local climb_node = { "default:ladder_wood" ,"default:ladder_steel"} + local zombienods = { "default:dirt", "default:dirt_with_rainforest", @@ -17,6 +19,7 @@ local zombienods = { "nodex:road", "nodex:road2", "nodex:road3", +"nodex:whiteblock", } ---- SKULL SWORD ------------------------------------------------------------------------------------------------------ @@ -81,6 +84,26 @@ mobs:register_mob("doctorzombie:doctorzombie", { die_start = 280, die_end = 300, }, + + do_custom = function(self, dtime) + + + local pos = self.object:get_pos() -- consegue sua propia posição + local vel = {x=0, y=0.2, z=0} -- deveria ser velocidade hehe + local face = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}) -- bloco que estar em sua frente + + for i,v in ipairs (climb_node) do + if face.name == v then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity(vel) -- velocidade, não eficiente :/ + + + end + + end + end + }) diff --git a/nodex/init.lua b/nodex/init.lua index 5427e34..5316677 100644 --- a/nodex/init.lua +++ b/nodex/init.lua @@ -44,18 +44,47 @@ minetest.register_craft({ ------ CRaFT ]] ----- white block : +---- HOSPITAL BLOCK : minetest.register_node("nodex:whiteblock", { description = "White Block", tiles = {"white_block.png"}, paramtype2 = "facedir", groups = {cracky = 3}, - drop = "nodex:road", + drop = "nodex:whiteblock", sounds = default.node_sound_stone_defaults() }) +minetest.register_node("nodex:greenblock", { + description = "Green Block", + tiles = {"green_node.png"}, + paramtype2 = "facedir", + groups = {cracky = 3}, + drop = "nodex:green_node", + sounds = default.node_sound_stone_defaults() + +}) + +minetest.register_node("nodex:redblock", { + description = "Red Block", + tiles = {"red_node.png"}, + paramtype2 = "facedir", + groups = {cracky = 3}, + drop = "nodex:redblock", + sounds = default.node_sound_stone_defaults() + +}) + +minetest.register_node("nodex:grayblock", { + description = "Gray Block", + tiles = {"gray_node.png"}, + paramtype2 = "facedir", + groups = {cracky = 3}, + drop = "nodex:grayblock", + sounds = default.node_sound_stone_defaults() + +}) ---- COAL STAIR : diff --git a/nodex/textures/gray_node.png b/nodex/textures/gray_node.png new file mode 100644 index 0000000..0bfbfc9 Binary files /dev/null and b/nodex/textures/gray_node.png differ diff --git a/nodex/textures/green_node.png b/nodex/textures/green_node.png new file mode 100644 index 0000000..75fdb49 Binary files /dev/null and b/nodex/textures/green_node.png differ diff --git a/nodex/textures/red_node.png b/nodex/textures/red_node.png new file mode 100644 index 0000000..8b6ca03 Binary files /dev/null and b/nodex/textures/red_node.png differ diff --git a/runner/init.lua b/runner/init.lua index ad5c2f3..0b9e12e 100644 --- a/runner/init.lua +++ b/runner/init.lua @@ -1,3 +1,5 @@ +local climb_node = { "default:ladder_wood" ,"default:ladder_steel"} + local zombienods = { "default:dirt", "default:dirt_with_rainforest", @@ -80,6 +82,26 @@ mobs:register_mob("runner:runner", { die_start = 280, die_end = 300, }, + + do_custom = function(self, dtime) + + + local pos = self.object:get_pos() -- consegue sua propia posição + local vel = {x=0, y=0.2, z=0} -- deveria ser velocidade hehe + local face = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}) -- bloco que estar em sua frente + + for i,v in ipairs (climb_node) do + if face.name == v then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity(vel) -- velocidade, não eficiente :/ + + + end + + end + end + }) diff --git a/structures/init.lua b/structures/init.lua index fe170c2..7a0e792 100644 --- a/structures/init.lua +++ b/structures/init.lua @@ -8,13 +8,70 @@ minetest.register_decoration({ "default:dirt_with_coniferous_litter", "default:dirt_with_grass", "default:dirt_with_snow" + }, + sidelen = 80, -- 16 + fill_ratio = 0.00008, + flags = "place_center_x,place_center_z,force_placement,all_floors", + y_max = 25, + y_min = 20, + schematic = minetest.get_modpath("structures").."/schematics/home1.mts", + rotation = "random", +}) + +-- CABIM : + +minetest.register_decoration({ + deco_type = "schematic", + place_on = { + "default:dirt_with_coniferous", + "default:dirt_with_coniferous_litter", + --- "default:dirt_with_grass", + --- "default:dirt_with_snow" }, sidelen = 80, -- 16 fill_ratio = 0.00008, flags = "place_center_x,place_center_z,force_placement,all_floors", y_max = 10, y_min = 0, - schematic = minetest.get_modpath("structures").."/schematics/home1.mts", + schematic = minetest.get_modpath("structures").."/schematics/cabin.mts", + rotation = "random", +}) + +-- HOTEL : +minetest.register_decoration({ + deco_type = "schematic", + place_on = { + -- "default:dirt_with_coniferous", + -- "default:dirt_with_coniferous_litter", + "default:dirt_with_grass", + "default:dirt_with_snow" + }, + sidelen = 80, -- 16 + fill_ratio = 0.00008, + flags = "place_center_x,place_center_z,force_placement,all_floors", + y_max = 15, + y_min = 10, + schematic = minetest.get_modpath("structures").."/schematics/hotel.mts", + rotation = "random", +}) + + +-- HOSPITAL : + +minetest.register_decoration({ + deco_type = "schematic", + place_on = { + -- "default:dirt_with_coniferous", + -- "default:dirt_with_coniferous_litter", + "default:dirt_with_grass", + "default:dirt_with_snow" + }, + sidelen = 80, -- 16 + fill_ratio = 0.00008, + flags = "place_center_x,place_center_z,force_placement,all_floors", + y_max = 7, + y_min = 0, + schematic = minetest.get_modpath("structures").."/schematics/hospital.mts", rotation = "random", }) @@ -28,9 +85,3 @@ minetest.register_decoration({ - - - - - - diff --git a/structures/mod.conf b/structures/mod.conf index 6c9dc68..51dc37f 100644 --- a/structures/mod.conf +++ b/structures/mod.conf @@ -1,2 +1,2 @@ name = structures -depends = default , deco +depends = default , deco ,simple_loots diff --git a/structures/schematics/cabin.mts b/structures/schematics/cabin.mts new file mode 100644 index 0000000..3a3fecf Binary files /dev/null and b/structures/schematics/cabin.mts differ diff --git a/structures/schematics/home1.mts b/structures/schematics/home1.mts index dba99bd..f559ed1 100644 Binary files a/structures/schematics/home1.mts and b/structures/schematics/home1.mts differ diff --git a/structures/schematics/hospital.mts b/structures/schematics/hospital.mts new file mode 100644 index 0000000..5f80afb Binary files /dev/null and b/structures/schematics/hospital.mts differ diff --git a/structures/schematics/hotel.mts b/structures/schematics/hotel.mts new file mode 100644 index 0000000..6134048 Binary files /dev/null and b/structures/schematics/hotel.mts differ diff --git a/survivorzombie/init.lua b/survivorzombie/init.lua index 1075235..8422315 100644 --- a/survivorzombie/init.lua +++ b/survivorzombie/init.lua @@ -1,3 +1,7 @@ +local climb_node = { "default:ladder_wood" ,"default:ladder_steel"} + + + local zombienods = { "default:dirt", "default:dirt_with_rainforest", @@ -82,6 +86,26 @@ mobs:register_mob("survivorzombie:survivorzombie", { die_start = 280, die_end = 300, }, + + do_custom = function(self, dtime) + + + local pos = self.object:get_pos() -- consegue sua propia posição + local vel = {x=0, y=0.2, z=0} -- deveria ser velocidade hehe + local face = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}) -- bloco que estar em sua frente + + for i,v in ipairs (climb_node) do + if face.name == v then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity(vel) -- velocidade, não eficiente :/ + + + end + + end + end + }) diff --git a/walkingzombie/init.lua b/walkingzombie/init.lua index 8de12f8..159a860 100644 --- a/walkingzombie/init.lua +++ b/walkingzombie/init.lua @@ -1,3 +1,5 @@ +local climb_node = { "default:ladder_wood" ,"default:ladder_steel"} + local zombienods = { "default:dirt", "default:dirt_with_rainforest", @@ -80,6 +82,26 @@ mobs:register_mob("walkingzombie:walkingzombie", { die_start = 280, die_end = 300, }, + + do_custom = function(self, dtime) + + + local pos = self.object:get_pos() -- consegue sua propia posição + local vel = {x=0, y=0.2, z=0} -- deveria ser velocidade hehe + local face = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}) -- bloco que estar em sua frente + + for i,v in ipairs (climb_node) do + if face.name == v then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity(vel) -- velocidade, não eficiente :/ + + + end + + end + end + })