Actualiser init.lua
This commit is contained in:
parent
4011b977ba
commit
4952c676fc
17
init.lua
17
init.lua
@ -189,8 +189,8 @@ mcl_formspec.get_itemslot_bg_v4(8, 10, 1, 1) ..
|
||||
--verifie si la date est plus vieille que 3 jours
|
||||
--recuperer la date actuelle
|
||||
local current_date = os.date("%Y-%m-%d %H:%M:%S") -- il faut faire la avec la variable date
|
||||
minetest.chat_send_player(player_name, "Date actuelle : " .. current_date)
|
||||
minetest.chat_send_player(player_name, "Date du coffre : " .. date)
|
||||
--minetest.chat_send_player(player_name, "Date actuelle : " .. current_date)
|
||||
--minetest.chat_send_player(player_name, "Date du coffre : " .. date)
|
||||
-- Définition des dates
|
||||
local date1_str = date
|
||||
local date2_str = current_date
|
||||
@ -208,7 +208,7 @@ local difference_days = difference_seconds / (60 * 60 * 24)
|
||||
print(string.format("Il y a %.1f jours entre %s et %s.", difference_days, date1_str, date2_str))
|
||||
|
||||
|
||||
minetest.chat_send_player(player_name, "Difference en jours : " .. difference_days)
|
||||
--minetest.chat_send_player(player_name, "Difference en jours : " .. difference_days)
|
||||
|
||||
|
||||
local diff = 0
|
||||
@ -336,7 +336,7 @@ mcl_formspec.get_itemslot_bg_v4(8, 10, 1, 1) ..
|
||||
"label[0,0;" .. S("You are not the owner of this chest!") .. "]"..
|
||||
"button_exit[3,1;3,1;exit;" .. S("Close") .. "]"
|
||||
meta:set_string("formspec", chest_formspec)
|
||||
minetest.chat_send_player(player_name, "Vous n'êtes pas le propriétaire de ce coffre! le coffre date du " .. date)
|
||||
minetest.chat_send_player(player_name, "You are not the owner of this chest! the chest dates from " .. date)
|
||||
end
|
||||
else
|
||||
meta:set_string("formspec",
|
||||
@ -582,7 +582,7 @@ minetest.register_on_dieplayer(function(player)
|
||||
|
||||
|
||||
-- Envoyer un message au joueur indiquant ses coordonnées après la mort
|
||||
minetest.chat_send_player(player:get_player_name(), "Vous êtes mort, aux coordonnées : " .. minetest.pos_to_string(pos))
|
||||
minetest.chat_send_player(player:get_player_name(), "You are dead, at the coordinates : " .. minetest.pos_to_string(pos))
|
||||
|
||||
|
||||
|
||||
@ -641,7 +641,7 @@ end
|
||||
|
||||
-- Placer un coffre de récupération à la position du joueur décédé
|
||||
minetest.set_node(pos, {name = "chest_recovery:chest"})
|
||||
minetest.chat_send_player(player:get_player_name(), "votre coffre de récupération est à la position : " .. minetest.pos_to_string(pos))
|
||||
minetest.chat_send_player(player:get_player_name(), "your recovery box is in position: " .. minetest.pos_to_string(pos))
|
||||
|
||||
|
||||
-- Obtenir les métadonnées et l'inventaire du coffre de récupération
|
||||
@ -747,3 +747,8 @@ end)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user