forked from VoxeLibre/VoxeLibre
remove (for now) unused params
temporary removed params need an engine change https://github.com/minetest/minetest/pull/11022
This commit is contained in:
parent
783146f32e
commit
669a9ff0a4
|
@ -63,13 +63,13 @@ function mcl_title.remove(playername, type)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_title.times(playername, fadein, stay, fadeout)
|
function mcl_title.times(playername, stay)
|
||||||
local player = minetest.get_player_by_name(playername)
|
local player = minetest.get_player_by_name(playername)
|
||||||
if player then
|
if player then
|
||||||
local meta = player:get_meta()
|
local meta = player:get_meta()
|
||||||
meta:set_int("mcl_title:fadeIn", gametick_to_secondes(fadein))
|
--meta:set_int("mcl_title:fadeIn", gametick_to_secondes(fadein))
|
||||||
meta:set_int("mcl_title:stay", gametick_to_secondes(stay))
|
meta:set_int("mcl_title:stay", gametick_to_secondes(stay))
|
||||||
meta:set_int("mcl_title:fadeOut", gametick_to_secondes(fadeout))
|
--meta:set_int("mcl_title:fadeOut", gametick_to_secondes(fadeout))
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
return false, "Player doesn't exist"
|
return false, "Player doesn't exist"
|
||||||
|
@ -78,9 +78,9 @@ end
|
||||||
|
|
||||||
minetest.register_on_newplayer(function(player)
|
minetest.register_on_newplayer(function(player)
|
||||||
local meta = player:get_meta()
|
local meta = player:get_meta()
|
||||||
meta:set_int("mcl_title:fadeIn", gametick_to_secondes(mcl_title.defaults.fadein))
|
--meta:set_int("mcl_title:fadeIn", gametick_to_secondes(mcl_title.defaults.fadein))
|
||||||
meta:set_int("mcl_title:stay", gametick_to_secondes(mcl_title.defaults.stay))
|
meta:set_int("mcl_title:stay", gametick_to_secondes(mcl_title.defaults.stay))
|
||||||
meta:set_int("mcl_title:fadeOut", gametick_to_secondes(mcl_title.defaults.fadeout))
|
--meta:set_int("mcl_title:fadeOut", gametick_to_secondes(mcl_title.defaults.fadeout))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
function mcl_title.clear(playername)
|
function mcl_title.clear(playername)
|
||||||
|
@ -94,9 +94,9 @@ function mcl_title.reset(playername)
|
||||||
local player = minetest.get_player_by_name(playername)
|
local player = minetest.get_player_by_name(playername)
|
||||||
if player then
|
if player then
|
||||||
local meta = player:get_meta()
|
local meta = player:get_meta()
|
||||||
meta:set_int("mcl_title:fadeIn", gametick_to_secondes(mcl_title.defaults.fadein))
|
--meta:set_int("mcl_title:fadeIn", gametick_to_secondes(mcl_title.defaults.fadein))
|
||||||
meta:set_int("mcl_title:stay", gametick_to_secondes(mcl_title.defaults.stay))
|
meta:set_int("mcl_title:stay", gametick_to_secondes(mcl_title.defaults.stay))
|
||||||
meta:set_int("mcl_title:fadeOut", gametick_to_secondes(mcl_title.defaults.fadeout))
|
--meta:set_int("mcl_title:fadeOut", gametick_to_secondes(mcl_title.defaults.fadeout))
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
return false, "Player not found!"
|
return false, "Player not found!"
|
||||||
|
@ -120,9 +120,9 @@ mcl_commands.register_command("title", {
|
||||||
return mcl_title.set(target, "actionbar", json)
|
return mcl_title.set(target, "actionbar", json)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
cmd:sub(":name:username times :fadeIn:int :stay:int :fadeOut:int", {
|
cmd:sub(":name:username times :stay:int", {
|
||||||
func = function(name, target, fadeIn, stay, fadeOut) --WIP
|
func = function(name, target, stay)
|
||||||
return mcl_title.times(target, fadeIn, stay, fadeOut)
|
return mcl_title.times(target, stay)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
cmd:sub(":name:username clear", {
|
cmd:sub(":name:username clear", {
|
||||||
|
|
Loading…
Reference in New Issue