amogus spawner fixed
This commit is contained in:
@@ -41,28 +41,28 @@ minetest.register_node("amogus_blocks:grey_bricks", {
|
||||
drop = 'amogus_blocks:grey_bricks',
|
||||
})
|
||||
minetest.register_node("amogus_blocks:blue_bricks", {
|
||||
description = "Bricks",
|
||||
description = "blue Bricks",
|
||||
tiles = {"Bricks_blue.png"}, groups = {stone=3},
|
||||
|
||||
drop = 'amogus_blocks:blue_bricks',
|
||||
})
|
||||
minetest.register_node("amogus_blocks:yellow_bricks", {
|
||||
description = "Bricks",
|
||||
description = "yellow Bricks",
|
||||
tiles = {"Bricks_yellow.png"}, groups = {stone=3},
|
||||
|
||||
drop = 'amogus_blocks:yellow_bricks',
|
||||
})
|
||||
minetest.register_node("amogus_blocks:green_bricks", {
|
||||
description = "Bricks",
|
||||
description = "green Bricks",
|
||||
tiles = {"Bricks_green.png"}, groups = {stone=3},
|
||||
|
||||
drop = 'amogus_blocks:green_bricks',
|
||||
})
|
||||
minetest.register_node("amogus_blocks:purple_bricks", {
|
||||
description = "Bricks",
|
||||
tiles = {"Bricks_purple.png"}, groups = {stone=3},
|
||||
minetest.register_node("amogus_blocks:black_bricks", {
|
||||
description = "black Bricks",
|
||||
tiles = {"Bricks_black.png"}, groups = {stone=3},
|
||||
|
||||
drop = 'amogus_blocks:purple_bricks',
|
||||
drop = 'amogus_blocks:black_bricks',
|
||||
})
|
||||
minetest.register_node("amogus_blocks:planks", {
|
||||
description = "Planks",
|
||||
@@ -328,6 +328,7 @@ local loot = {
|
||||
minetest.register_node("amogus_blocks:lucky_block", {
|
||||
description = "Lucky Block",
|
||||
tiles = {"luckyblock.png"},
|
||||
|
||||
groups = {cracky = 3},
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
local item = loot[math.random(#loot)]
|
||||
@@ -356,7 +357,12 @@ minetest.register_node("amogus_blocks:lucky_block", {
|
||||
|
||||
minetest.register_node("amogus_blocks:amogus_spawner", {
|
||||
description = "Amogus Spawner",
|
||||
tiles = {"amogus_spawner.png"},
|
||||
tiles = {"spawner.png"},
|
||||
|
||||
drawtype = "glasslike",
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
sunlight_propagates = true,
|
||||
-- after place event
|
||||
--on_ = function(pos)
|
||||
|
||||
@@ -371,6 +377,23 @@ minetest.register_node("amogus_blocks:amogus_spawner", {
|
||||
local spawned = meta:get_int("spawned")
|
||||
if spawned < 30 then
|
||||
minetest.add_entity({x = pos.x, y = pos.y + 1, z = pos.z}, "amogus_entities:amogus")
|
||||
minetest.add_particlespawner({
|
||||
amount = 1000,
|
||||
time = 0.3,
|
||||
minpos = pos,
|
||||
maxpos = pos,
|
||||
minvel = {x = -1, y = 5, z = -1},
|
||||
maxvel = {x = 1, y = 5, z = 1},
|
||||
minacc = {x = 0, y = -10, z = 0},
|
||||
maxacc = {x = 0, y = -10, z = 0},
|
||||
minexptime = 0.1,
|
||||
maxexptime = 0.5,
|
||||
minsize = 1,
|
||||
maxsize = 2,
|
||||
collisiondetection = true,
|
||||
vertical = false,
|
||||
texture = "amog_flower.png",
|
||||
})
|
||||
spawned = spawned + 1
|
||||
meta:set_int("spawned", spawned)
|
||||
minetest.get_node_timer(pos):start(meta:get_int("interval"))
|
||||
|
||||
BIN
mods/amogus_blocks/textures/spawner.png
Normal file
BIN
mods/amogus_blocks/textures/spawner.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 170 B |
Reference in New Issue
Block a user