Trying to solve an issue with files being locked
This commit is contained in:
@@ -14,11 +14,41 @@ minetest.register_node("cops:pig_spawner", {
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"cops:pig_spawner"},
|
||||
--neighbors = {"default:water_source", "default:water_flowing"},
|
||||
interval = 30, -- Run every 10 seconds
|
||||
chance = 5, -- One node has a chance of 1 in 50 to get selected
|
||||
interval = 30,
|
||||
chance = 5,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.add_entity(pos, "cops:cop_regular_female")
|
||||
local i = math.random(0, 2)
|
||||
if i == 0 then
|
||||
minetest.add_entity(pos, "cops:cop_regular_female")
|
||||
|
||||
|
||||
elseif i == 1 then
|
||||
minetest.add_entity(pos, "cops:cop_regular_male")
|
||||
|
||||
|
||||
elseif i == 2 then
|
||||
minetest.add_entity(pos, "cops:cop_armedthug")
|
||||
end
|
||||
end})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"main:bricks_stone"},
|
||||
interval = 40,
|
||||
chance = 50,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
newPos = {x = pos.x, y = pos.y + 2, z = pos.z}
|
||||
local i = math.random(0, 2)
|
||||
if i == 0 then
|
||||
minetest.add_entity(newPos, "cops:cop_regular_female")
|
||||
|
||||
|
||||
elseif i == 1 then
|
||||
minetest.add_entity(newPos, "cops:cop_regular_male")
|
||||
|
||||
|
||||
elseif i == 2 then
|
||||
minetest.add_entity(newPos, "cops:cop_armedthug")
|
||||
end
|
||||
end})
|
||||
|
||||
-- Cops
|
||||
|
||||
Reference in New Issue
Block a user