remove (for now) unused params

temporary removed params need an engine change
https://github.com/minetest/minetest/pull/11022
This commit is contained in:
AFCMS 2021-03-09 19:04:37 +01:00
parent 783146f32e
commit 669a9ff0a4
1 changed files with 10 additions and 10 deletions

View File

@ -63,13 +63,13 @@ function mcl_title.remove(playername, type)
return true
end
function mcl_title.times(playername, fadein, stay, fadeout)
function mcl_title.times(playername, stay)
local player = minetest.get_player_by_name(playername)
if player then
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:fadeOut", gametick_to_secondes(fadeout))
--meta:set_int("mcl_title:fadeOut", gametick_to_secondes(fadeout))
return true
else
return false, "Player doesn't exist"
@ -78,9 +78,9 @@ end
minetest.register_on_newplayer(function(player)
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:fadeOut", gametick_to_secondes(mcl_title.defaults.fadeout))
--meta:set_int("mcl_title:fadeOut", gametick_to_secondes(mcl_title.defaults.fadeout))
end)
function mcl_title.clear(playername)
@ -94,9 +94,9 @@ function mcl_title.reset(playername)
local player = minetest.get_player_by_name(playername)
if player then
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:fadeOut", gametick_to_secondes(mcl_title.defaults.fadeout))
--meta:set_int("mcl_title:fadeOut", gametick_to_secondes(mcl_title.defaults.fadeout))
return true
else
return false, "Player not found!"
@ -120,9 +120,9 @@ mcl_commands.register_command("title", {
return mcl_title.set(target, "actionbar", json)
end,
})
cmd:sub(":name:username times :fadeIn:int :stay:int :fadeOut:int", {
func = function(name, target, fadeIn, stay, fadeOut) --WIP
return mcl_title.times(target, fadeIn, stay, fadeOut)
cmd:sub(":name:username times :stay:int", {
func = function(name, target, stay)
return mcl_title.times(target, stay)
end,
})
cmd:sub(":name:username clear", {