I hate reverting something xD

This commit is contained in:
AFCMS 2021-03-16 17:39:06 +01:00
parent 5d17a6b699
commit 8f30e223e2
16 changed files with 20 additions and 20 deletions

View file

@ -22,7 +22,7 @@ function mesecon.queue:add_action(pos, func, params, time, overwritecheck, prior
local toremove = nil
-- Otherwise, add the action to the queue
if overwritecheck then -- check if old action has to be overwritten / removed:
for i, ac in ipairs(mesecon.queue.actions) do
for i, ac in pairs(mesecon.queue.actions) do
if(vector.equals(pos, ac.pos)
and mesecon.cmpAny(overwritecheck, ac.owcheck)) then
toremove = i

View file

@ -75,10 +75,10 @@ mesecon.queue:add_function("receptor_on", function (pos, rules)
rules = rules or mesecon.rules.default
-- Call turnon on all linking positions
for _, rule in ipairs(mesecon.flattenrules(rules)) do
for _, rule in pairs(mesecon.flattenrules(rules)) do
local np = vector.add(pos, rule)
local rulenames = mesecon.rules_link_rule_all(pos, rule)
for _, rulename in ipairs(rulenames) do
for _, rulename in pairs(rulenames) do
mesecon.turnon(np, rulename)
end
end

View file

@ -1378,7 +1378,7 @@ minetest.register_abm({
if not do_preserve then
-- Drop stuff other than the node itself
local itemstacks = minetest.get_node_drops(n0.name)
for _, itemname in ipairs(itemstacks) do
for _, itemname in pairs(itemstacks) do
local p_drop = {
x = p0.x - 0.5 + math.random(),
y = p0.y - 0.5 + math.random(),

View file

@ -191,7 +191,7 @@ minetest.register_entity("mcl_enchanting:book", {
local old_player_near = self._player_near
local player_near = false
local player
for _, obj in ipairs(minetest.get_objects_inside_radius(vector.subtract(self.object:get_pos(), mcl_enchanting.book_offset), 2.5)) do
for _, obj in pairs(minetest.get_objects_inside_radius(vector.subtract(self.object:get_pos(), mcl_enchanting.book_offset), 2.5)) do
if obj:is_player() then
player_near = true
player = obj
@ -308,7 +308,7 @@ minetest.register_abm({
nodenames = "mcl_enchanting:table",
action = function(pos)
local playernames = {}
for _, obj in ipairs(minetest.get_objects_inside_radius(pos, 15)) do
for _, obj in pairs(minetest.get_objects_inside_radius(pos, 15)) do
if obj:is_player() then
table.insert(playernames, obj:get_player_name())
end

View file

@ -419,7 +419,7 @@ mcl_end.grow_chorus_plant_step = function(pos, node)
end
end
for _, f in ipairs(new_flowers) do
for _, f in pairs(new_flowers) do
if age >= MAX_FLOWER_AGE then
local nn = minetest.get_node(f).name
if nn ~= "mcl_end:chorus_flower" and nn ~= "mcl_end:chorus_flower_dead" then

View file

@ -349,7 +349,7 @@ minetest.register_abm({
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
for _,object in ipairs(minetest.get_objects_inside_radius(pos, 2)) do
for _,object in pairs(minetest.get_objects_inside_radius(pos, 2)) do
if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" then
if inv and inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then
-- Item must get sucked in when the item just TOUCHES the block above the hopper

View file

@ -17,7 +17,7 @@ local function get_mob_textures(mob)
end
local function find_doll(pos)
for _,obj in ipairs(minetest.get_objects_inside_radius(pos, 0.5)) do
for _,obj in pairs(minetest.get_objects_inside_radius(pos, 0.5)) do
if not obj:is_player() then
if obj ~= nil and obj:get_luaentity().name == "mcl_mobspawners:doll" then
return obj

View file

@ -224,7 +224,7 @@ function mcl_portals.end_teleport(obj, pos)
end
function mcl_portals.end_portal_teleport(pos, node)
for _,obj in ipairs(minetest.get_objects_inside_radius(pos, 1)) do
for _,obj in pairs(minetest.get_objects_inside_radius(pos, 1)) do
local lua_entity = obj:get_luaentity() --maikerumine added for objects to travel
if obj:is_player() or lua_entity then
local objpos = obj:get_pos()

View file

@ -798,7 +798,7 @@ minetest.register_abm({
end
end
distance = vector.subtract(pos, distance)
for _, obj in ipairs(minetest.get_objects_inside_radius(pos, 15)) do
for _, obj in pairs(minetest.get_objects_inside_radius(pos, 15)) do
if obj:is_player() then
minetest.add_particlespawner({
amount = node_particles_allowed_level + 1,
@ -818,7 +818,7 @@ minetest.register_abm({
})
end
end
for _, obj in ipairs(minetest.get_objects_inside_radius(pos, 1)) do --maikerumine added for objects to travel
for _, obj in pairs(minetest.get_objects_inside_radius(pos, 1)) do --maikerumine added for objects to travel
local lua_entity = obj:get_luaentity() --maikerumine added for objects to travel
if (obj:is_player() or lua_entity) and prevent_portal_chatter(obj) then
teleport(obj, pos)

View file

@ -539,7 +539,7 @@ end)
minetest.register_on_shutdown(function()
-- save player effects on server shutdown
for _,player in ipairs(minetest.get_connected_players()) do
for _,player in pairs(minetest.get_connected_players()) do
mcl_potions._save_player_effects(player)
end

View file

@ -393,7 +393,7 @@ local function RecheckCartHack(params)
local pos = params[1]
local cart_id = params[2]
-- Find cart
for _, obj in ipairs(minetest.get_objects_inside_radius(pos, 1)) do
for _, obj in pairs(minetest.get_objects_inside_radius(pos, 1)) do
if obj ~= nil and obj:get_luaentity().name == cart_id then
-- Cart found! We can now safely call the callback func.
-- (calling it earlier has the danger of failing)

View file

@ -142,7 +142,7 @@ minetest.register_globalstep(function(dtime)
timer = timer + dtime
if main_timer > mcl_hunger.HUD_TICK or timer > 0.5 then
if main_timer > mcl_hunger.HUD_TICK then main_timer = 0 end
for _,player in ipairs(minetest.get_connected_players()) do
for _,player in pairs(minetest.get_connected_players()) do
local name = player:get_player_name()
local h = tonumber(mcl_hunger.get_hunger(player))

View file

@ -148,7 +148,7 @@ local player_attached = mcl_player.player_attached
-- Check each player and apply animations
minetest.register_globalstep(function(dtime)
for _, player in ipairs(minetest.get_connected_players()) do
for _, player in pairs(minetest.get_connected_players()) do
local name = player:get_player_name()
local model_name = player_model[name]
local model = model_name and models[model_name]

View file

@ -52,7 +52,7 @@ minetest.register_globalstep(function(dtime)
time = 0
-- check players
for _,player in ipairs(minetest.get_connected_players()) do
for _,player in pairs(minetest.get_connected_players()) do
-- who am I?
local name = player:get_player_name()

View file

@ -41,7 +41,7 @@ minetest.register_globalstep(function(dtime)
-- Update jump status immediately since we need this info in real time.
-- WARNING: This section is HACKY as hell since it is all just based on heuristics.
for _,player in ipairs(get_connected_players()) do
for _,player in pairs(get_connected_players()) do
local controls = player:get_player_control()
name = player:get_player_name()
@ -173,7 +173,7 @@ minetest.register_globalstep(function(dtime)
time = 0
-- check players
for _,player in ipairs(get_connected_players()) do
for _,player in pairs(get_connected_players()) do
-- who am I?
local name = player:get_player_name()

View file

@ -78,7 +78,7 @@ minetest.register_on_joinplayer(function(player)
end)
minetest.register_globalstep(function()
for _,player in ipairs(minetest.get_connected_players()) do
for _,player in pairs(minetest.get_connected_players()) do
wieldview:update_wielded_item(player)
end
end)