code cleaning
parent
abc41c9016
commit
916fecb451
|
@ -7,9 +7,9 @@ minetest.register_chatcommand("xpset", {
|
||||||
params = "<name>",
|
params = "<name>",
|
||||||
description = "Set the statistics/experience for yourself",
|
description = "Set the statistics/experience for yourself",
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
print(name,param)
|
-- print(name,param)
|
||||||
local xp= string.split(param, " ")
|
local xp= string.split(param, " ")
|
||||||
print(dump2(xp))
|
-- print(dump2(xp))
|
||||||
player=minetest.get_player_by_name(name)
|
player=minetest.get_player_by_name(name)
|
||||||
if xpfw.player_get_attribute(player,xp[1]) ~= nil then
|
if xpfw.player_get_attribute(player,xp[1]) ~= nil then
|
||||||
xpfw.player_set_attribute(player,xp[1],xp[2])
|
xpfw.player_set_attribute(player,xp[1],xp[2])
|
||||||
|
|
|
@ -49,4 +49,4 @@ xpfw.register_attribute("mean_build_speed",{min=0,max=20,
|
||||||
hud=1
|
hud=1
|
||||||
})
|
})
|
||||||
|
|
||||||
print(dump2(xpfw.attributes))
|
--print(dump2(xpfw.attributes))
|
||||||
|
|
2
init.lua
2
init.lua
|
@ -6,7 +6,7 @@ xpfw.mod_storage=minetest.get_mod_storage()
|
||||||
xpfw.store_table={}--xpfw.mod_storage:to_table()
|
xpfw.store_table={}--xpfw.mod_storage:to_table()
|
||||||
xpfw.attributes={}
|
xpfw.attributes={}
|
||||||
|
|
||||||
print(dump2(xpfw.mod_store))
|
--print(dump2(xpfw.mod_store))
|
||||||
minetest.log("action", "[MOD]"..minetest.get_current_modname().." -- start loading from "..minetest.get_modpath(minetest.get_current_modname()))
|
minetest.log("action", "[MOD]"..minetest.get_current_modname().." -- start loading from "..minetest.get_modpath(minetest.get_current_modname()))
|
||||||
-- Load files
|
-- Load files
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue