From 7c3b0fcfc38a1bf90e23bffc0f646c0940b072c5 Mon Sep 17 00:00:00 2001 From: kay27 Date: Sun, 20 Feb 2022 03:31:36 +0400 Subject: [PATCH] Append irl time to map hash id --- mods/ITEMS/mcl_maps/init.lua | 2 +- mods/ITEMS/mcl_maps/locale/mcl_maps.fr.tr | 5 ++++- mods/ITEMS/mcl_maps/mod.conf | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/mcl_maps/init.lua b/mods/ITEMS/mcl_maps/init.lua index 314d91688..413e7382a 100644 --- a/mods/ITEMS/mcl_maps/init.lua +++ b/mods/ITEMS/mcl_maps/init.lua @@ -33,7 +33,7 @@ function mcl_maps.create_map(pos) local itemstack = ItemStack("mcl_maps:filled_map") local meta = itemstack:get_meta() - local id = string.format("%.0f", minetest.hash_node_position(minp)) + local id = string.format("%.0f-%.0f", minetest.hash_node_position(minp), mcl_time.get_seconds_irl()) meta:set_string("mcl_maps:id", id) meta:set_string("mcl_maps:minp", minetest.pos_to_string(minp)) meta:set_string("mcl_maps:maxp", minetest.pos_to_string(maxp)) diff --git a/mods/ITEMS/mcl_maps/locale/mcl_maps.fr.tr b/mods/ITEMS/mcl_maps/locale/mcl_maps.fr.tr index 9ef7cd5c5..1808e839d 100644 --- a/mods/ITEMS/mcl_maps/locale/mcl_maps.fr.tr +++ b/mods/ITEMS/mcl_maps/locale/mcl_maps.fr.tr @@ -1,5 +1,8 @@ # textdomain: mcl_maps Empty Map=Carte Vierge Empty maps are not useful as maps, but they can be stacked and turned to maps which can be used.=Les cartes vierges ne sont pas utiles en tant que cartes, mais elles peuvent être empilées et transformées en cartes utilisables. -Rightclick to start using the map (which can't be stacked anymore).=Clic droit pour commencer à utiliser la carte (qui ne peut plus être empilée). +Rightclick to create a filled map (which can't be stacked anymore).=Clic droit pour créer une carte remplie (qui ne peut plus être empilée). Map=Carte +Shows a map image.=Affiche une carte. +When created, the map saves the nearby area as an image that can be viewed any time by holding the map.=Lors de sa création, la carte sauvegarde le terrain proche sous forme d'image qui peut être consultée n'importe quand en tenant la carte dans la main. +Hold the map in your hand. This will display a map on your screen.=Tenez la carte dans votre main. Cela affichera la carte à l'écran. diff --git a/mods/ITEMS/mcl_maps/mod.conf b/mods/ITEMS/mcl_maps/mod.conf index 7275471b2..efe1708dd 100644 --- a/mods/ITEMS/mcl_maps/mod.conf +++ b/mods/ITEMS/mcl_maps/mod.conf @@ -1,2 +1,2 @@ name = mcl_maps -depends = mcl_core, mcl_flowers, tt, mcl_colors, mcl_skins, mcl_util +depends = mcl_core, mcl_flowers, tt, mcl_colors, mcl_skins, mcl_util, mcl_time