60 Commits

Author SHA1 Message Date
Mikita Wiśniewski
33f883ecb7 mcl_maps: Code clean-up, localize more functions 2025-03-05 15:12:02 +01:00
Mikita Wiśniewski
046358ffea Set default maximum map zoom level to 3
Before this commit, it was inconsistent: 2 in `settingtypes.txt` and 4
in `mods/ITEMS/mcl_maps/init.lua`.
3 seems like a good enough compromise, as level 4 already opens
considerable possibilities for nearly effortless DoS attacks.
2025-03-05 15:12:02 +01:00
Mikita Wiśniewski
6ecb8f328a Darken handheld maps based on node light level
Co-authored-by: Ælla Chiana Moskopp <erle@dieweltistgarnichtso.net>
2025-03-05 15:12:02 +01:00
Mikita Wiśniewski
80511f4a12 mcl_maps: Formatting and styling clean-up 2025-03-05 15:12:02 +01:00
Mikita Wiśniewski
3d6647e29d Limit handheld map globalstep update rates
Co-authored-by: Ælla Chiana Moskopp <erle@dieweltistgarnichtso.net>
2025-03-05 15:12:02 +01:00
Ælla Chiana Moskopp
f6eaa49fd4 Display large player dot on maps for nearby player
Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com>
2025-03-05 15:12:02 +01:00
Ælla Chiana Moskopp
73d4a48f9f Add diagonal player marker to maps
Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com>
2025-03-05 15:12:02 +01:00
Mikita Wiśniewski
ef0d38e530 Fix "hud_elem_type" deprecation warning spam (5.9+) (#4965)
`mcl_vars.hud_type_field` is introduced to determine the right HUD element type field to use. All mods adding HUDs, together with their `mod.conf` files, are changed accordingly to silence the warnings.

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4965
Reviewed-by: teknomunk <teknomunk@protonmail.com>
Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-committed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
2025-03-04 20:50:10 +01:00
Mikita Wiśniewski
05ed54040a mcl_maps: Don't default to overworld on conversion
`mcl_worlds.pos_to_dimension` is ran on `minp` to get the dimension
value. This fixes old Nether/End maps rendering the overworld on
conversion (caused by e.g. zooming out on a cartography table).
2025-03-03 13:36:35 +01:00
teknomunk
0642345a7d Get legacy maps to zoom correctly 2025-03-03 13:36:35 +01:00
teknomunk
4a8784668e Make legacy maps without a dimension default to overworld 2025-03-03 13:36:35 +01:00
teknomunk
2753d7f061 Fix legacy map textures 2025-03-03 13:36:35 +01:00
kno10
405f6760f5 use get_node_name for zooming 2025-02-28 13:45:04 +01:00
kno10
280e820fe3 map improvements 2025-02-28 13:45:04 +01:00
kno10
88ca202647 Zoomable maps, but limited to 1 level for now. 2025-02-28 13:45:04 +01:00
kno10
972185907f Better map colors (+ tools) (#4697)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4697
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2024-12-07 16:42:51 +01:00
teknomunk
b582afeb1f Update documentation for Minetest rename to Luanti (#4706)
This updates the VoxeLibre documentation by replacing "Minetest" with "Luanti" and updating links.

Done:
* Update "Minetest" in documentation and comments to "Luanti"
* Update links to forums, ContentDB and Luanti project web page

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4706
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: teknomunk <teknomunk@protonmail.com>
Co-committed-by: teknomunk <teknomunk@protonmail.com>
2024-11-28 20:55:48 +01:00
ancientmarinerdev
b72dbf17a6 Crash for dropper failing as potentially cannot get pos. 2023-03-25 01:55:52 +00:00
FossFanatic
c0f52ad344 Fix maps to display coloured foliage and water 2023-03-04 13:47:51 +00:00
Michieal
b66e2a117f fix json reading error. 2023-02-14 01:50:05 +00:00
Johannes Fritz
8793ed211e Fix ender chest crash + remove map hand reference 2023-02-01 09:56:12 -06:00
Michieal
c4981d894c Removed the local cached copy of the built in TGA encoder. 2022-11-05 01:26:15 +01:00
Michieal
93913ed780 Fix accidental conversion of tabs to spaces. 2022-11-05 01:26:15 +01:00
Michieal
6d1b1b3c74 Added a return code to load_maps
Added a return code to load_maps to check for if dynamic_add_media registers a fail.
Used by mcl_itemframes when reloading a map placed into an itemframe.
2022-11-05 01:26:14 +01:00
Johannes Fritz
413c6292ff Add simple skins skins support 2022-09-06 12:51:43 -05:00
Johannes Fritz
8e6b6393c2 Add advanced skin customization 2022-09-06 12:16:46 -05:00
Johannes Fritz
ba55e4286f Remove image stack wieldview: code review improvment 2022-08-23 10:08:22 -05:00
Johannes Fritz
587f9be4d7 Remove image stack wieldview 2022-08-23 10:08:22 -05:00
Elias Fleckenstein
a86fc935aa mcl_maps: add callback to load_map function (#2261)
Fixes maps in itemframes not loading after restart (#2255)
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2261
Co-authored-by: Elias Fleckenstein <eliasfleckenstein@web.de>
Co-committed-by: Elias Fleckenstein <eliasfleckenstein@web.de>
2022-05-30 01:32:20 +00:00
Nils Dagsson Moskopp
27842aa2f5 Fix handheld maps not displaying in Minetest 5.5.0
The function dynamic_add_media() was changed in incompatible ways in
several minor versions of Minetest, breaking the display of handheld
maps in Minetest 5.5.0. This patch makes handheld maps display there.

The function was blocking with one argument in Minetest 5.3. It was also
blocking in Minetest 5.4, but took an additional argument for a function
to execute once the media had been received. Calling dynamic_add_media()
with a single argument had been deprecated; a function that did nothing
was provided in mcl_maps to satisfy the changed argument requirements.

In Minetest 5.5, dynamic_add_media() was changed to non-blocking. This
introduced a race condition in mcl_maps, where a client often tried to
display a map before it had received the map texture from the server.

Opening an issue on the Minetest issue tracker led to it being closed in
about 20 minutes: <https://github.com/minetest/minetest/issues/11997>
2022-02-24 22:43:45 +00:00
AFCMS
cd33d406b2 fix many codestyle issues (functions, strings, modpaths) 2021-05-29 16:12:33 +02:00
AFCMS
9edcc60ba2 [mcl_maps] fix warnings 2021-05-22 23:21:32 +02:00
Elias Fleckenstein
5bb1657bd8 Add moving marker for the player 2021-05-03 10:46:59 +02:00
Elias Fleckenstein
f063d14caf Add craft predict for map copying 2021-05-02 19:30:27 +02:00
Elias Fleckenstein
0d287001f7 Fix tt snippet to update wield filled maps as well 2021-05-02 19:18:30 +02:00
Elias Fleckenstein
63d4e57a8d Correct typo (ninetest -> minetest) 2021-05-02 17:19:11 +02:00
Elias Fleckenstein
ecea8f1662 Prevent placing of wielded maps 2021-05-02 17:14:57 +02:00
Elias Fleckenstein
ef08977112 Copy stack before accessing it in add_item 2021-05-02 17:11:33 +02:00
Elias Fleckenstein
1f87874870 Make it look like the player is holding the map in their hand 2021-05-02 17:03:39 +02:00
Elias Fleckenstein
9a3ae17564 Make maps show their image when in itemframes 2021-05-02 16:04:48 +02:00
Elias Fleckenstein
bd74dbe321 Revert "Use PNG instead of TGA"
This reverts commit ca9cd8cbe0fff0ab40121d6067fb075559b12860.
The TGA was faster and produced smaller files.
2021-05-02 13:03:18 +02:00
Elias Fleckenstein
ca9cd8cbe0 Use PNG instead of TGA 2021-05-02 12:55:04 +02:00
Elias Fleckenstein
d9a670dcb8 Show empty map in creative inv, but don't show filled map there 2021-05-02 12:24:22 +02:00
Elias Fleckenstein
f22b3fd457 Implement copying maps 2021-05-02 12:23:29 +02:00
Elias Fleckenstein
1079ab74d4 Stack filled maps that have the same metadata 2021-05-02 11:42:16 +02:00
Elias Fleckenstein
2228b30658 Add API to create filled map 2021-05-01 17:36:51 +02:00
Elias Fleckenstein
c6e80b5882 Add Real Maps 2021-05-01 16:52:16 +02:00
AFCMS
3635b848d5 add API for mcl_wip 2021-03-07 00:42:34 +01:00
Wuzzy
c106a62979 Use minetest.is_creative_enabled 2020-07-10 16:45:40 +02:00
Wuzzy
f0ba364120 Fix crash in mcl_maps 2020-03-12 06:45:23 +01:00