mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 00:19:32 +01:00
[mcl_experience] fix warnings
This commit is contained in:
parent
8baea02f24
commit
8536e2c033
1 changed files with 7 additions and 4 deletions
|
@ -1,5 +1,11 @@
|
|||
local S = minetest.get_translator("mcl_experience")
|
||||
|
||||
mcl_experience = {}
|
||||
|
||||
local vector = vector
|
||||
local math = math
|
||||
local string = string
|
||||
|
||||
local pool = {}
|
||||
local registered_nodes
|
||||
local max_xp = 2^31-1
|
||||
|
@ -262,7 +268,6 @@ function mcl_experience.add_experience(player, experience)
|
|||
if #final_candidates > 0 then
|
||||
local can = final_candidates[math.random(#final_candidates)]
|
||||
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 multiplier = 2 * 65535 / uses
|
||||
local repair = experience * multiplier
|
||||
|
@ -329,14 +334,12 @@ minetest.register_on_dieplayer(function(player)
|
|||
mcl_experience.throw_experience(player:get_pos(), xp_amount)
|
||||
end)
|
||||
|
||||
|
||||
local name
|
||||
local collector, pos, pos2
|
||||
local direction, distance, player_velocity, goal
|
||||
local currentvel, acceleration, multiplier, velocity
|
||||
local node, vel, def
|
||||
local is_moving, is_slippery, slippery, slip_factor
|
||||
local size, data
|
||||
local size
|
||||
local function xp_step(self, dtime)
|
||||
--if item set to be collected then only execute go to player
|
||||
if self.collected == true then
|
||||
|
|
Loading…
Reference in a new issue