forked from VoxeLibre/VoxeLibre
[mcl_experience] fix warnings
This commit is contained in:
parent
8baea02f24
commit
8536e2c033
|
@ -1,5 +1,11 @@
|
||||||
local S = minetest.get_translator("mcl_experience")
|
local S = minetest.get_translator("mcl_experience")
|
||||||
|
|
||||||
mcl_experience = {}
|
mcl_experience = {}
|
||||||
|
|
||||||
|
local vector = vector
|
||||||
|
local math = math
|
||||||
|
local string = string
|
||||||
|
|
||||||
local pool = {}
|
local pool = {}
|
||||||
local registered_nodes
|
local registered_nodes
|
||||||
local max_xp = 2^31-1
|
local max_xp = 2^31-1
|
||||||
|
@ -262,7 +268,6 @@ function mcl_experience.add_experience(player, experience)
|
||||||
if #final_candidates > 0 then
|
if #final_candidates > 0 then
|
||||||
local can = final_candidates[math.random(#final_candidates)]
|
local can = final_candidates[math.random(#final_candidates)]
|
||||||
local stack, list, index, wear = can.stack, can.list, can.index, can.wear
|
local stack, list, index, wear = can.stack, can.list, can.index, can.wear
|
||||||
local unbreaking_level = mcl_enchanting.get_enchantment(stack, "unbreaking")
|
|
||||||
local uses = mcl_util.calculate_durability(stack)
|
local uses = mcl_util.calculate_durability(stack)
|
||||||
local multiplier = 2 * 65535 / uses
|
local multiplier = 2 * 65535 / uses
|
||||||
local repair = experience * multiplier
|
local repair = experience * multiplier
|
||||||
|
@ -329,14 +334,12 @@ minetest.register_on_dieplayer(function(player)
|
||||||
mcl_experience.throw_experience(player:get_pos(), xp_amount)
|
mcl_experience.throw_experience(player:get_pos(), xp_amount)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
local name
|
|
||||||
local collector, pos, pos2
|
local collector, pos, pos2
|
||||||
local direction, distance, player_velocity, goal
|
local direction, distance, player_velocity, goal
|
||||||
local currentvel, acceleration, multiplier, velocity
|
local currentvel, acceleration, multiplier, velocity
|
||||||
local node, vel, def
|
local node, vel, def
|
||||||
local is_moving, is_slippery, slippery, slip_factor
|
local is_moving, is_slippery, slippery, slip_factor
|
||||||
local size, data
|
local size
|
||||||
local function xp_step(self, dtime)
|
local function xp_step(self, dtime)
|
||||||
--if item set to be collected then only execute go to player
|
--if item set to be collected then only execute go to player
|
||||||
if self.collected == true then
|
if self.collected == true then
|
||||||
|
|
Loading…
Reference in New Issue