mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-18 00:51:06 +01:00
fix closure style function declarations
its BANNED in CONTRIB.md
This commit is contained in:
parent
390aec5d7a
commit
99fce095ef
1 changed files with 4 additions and 5 deletions
|
@ -1,5 +1,4 @@
|
||||||
-- mcl_raids
|
-- mcl_raids
|
||||||
|
|
||||||
mcl_raids = {}
|
mcl_raids = {}
|
||||||
|
|
||||||
-- Define the amount of illagers to spawn each wave.
|
-- Define the amount of illagers to spawn each wave.
|
||||||
|
@ -39,7 +38,7 @@ local extra_wave = {
|
||||||
--["mobs_mc:ravager"] = 2,
|
--["mobs_mc:ravager"] = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
mcl_raids.spawn_raid = function(event)
|
function mcl_raids.spawn_raid(event)
|
||||||
local pos = event.pos
|
local pos = event.pos
|
||||||
local wave = event.stage
|
local wave = event.stage
|
||||||
local illager_count = 0
|
local illager_count = 0
|
||||||
|
@ -73,7 +72,7 @@ mcl_raids.spawn_raid = function(event)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
mcl_raids.find_villager = function(pos)
|
function mcl_raids.find_villager(pos)
|
||||||
local obj = minetest.get_objects_inside_radius(pos, 8)
|
local obj = minetest.get_objects_inside_radius(pos, 8)
|
||||||
for _, objects in ipairs(obj) do
|
for _, objects in ipairs(obj) do
|
||||||
local object = objects:get_luaentity()
|
local object = objects:get_luaentity()
|
||||||
|
@ -91,7 +90,7 @@ mcl_raids.find_villager = function(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
mcl_raids.find_bed = function(pos)
|
function mcl_raids.find_bed(pos)
|
||||||
local beds = minetest.find_nodes_in_area(vector.offset(pos, -8, -8, -8), vector.offset(pos, 8, 8, 8), "mcl_beds:bed_red_bottom")
|
local beds = minetest.find_nodes_in_area(vector.offset(pos, -8, -8, -8), vector.offset(pos, 8, 8, 8), "mcl_beds:bed_red_bottom")
|
||||||
if beds[1] then
|
if beds[1] then
|
||||||
minetest.log("action", "[mcl_raids] Bed Found.")
|
minetest.log("action", "[mcl_raids] Bed Found.")
|
||||||
|
@ -102,7 +101,7 @@ mcl_raids.find_bed = function(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
mcl_raids.find_village = function(pos)
|
function mcl_raids.find_village(pos)
|
||||||
local bed = mcl_raids.find_bed(pos)
|
local bed = mcl_raids.find_bed(pos)
|
||||||
local villager = mcl_raids.find_villager(pos)
|
local villager = mcl_raids.find_villager(pos)
|
||||||
local raid_started = false
|
local raid_started = false
|
||||||
|
|
Loading…
Reference in a new issue