From a5dc4b16114bf335e936c1ab806689bea7fe1425 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Tue, 19 May 2015 12:02:05 +0200 Subject: [PATCH] Added compassgps mod - Added compassgps mod (solves #53) - Added /MFF flags on modified lines of worldedge/init.lua, and used `y+1` instead of `y` for `setpos()` --- mods/compassgps/README.md | 158 ++ mods/compassgps/README.txt | 157 ++ mods/compassgps/cgpsmap.lua | 350 +++++ mods/compassgps/depends.txt | 2 + mods/compassgps/init.lua | 1298 +++++++++++++++++ mods/compassgps/locale/de.txt | 63 + mods/compassgps/locale/template.txt | 63 + mods/compassgps/textures/cgpsmap-blank.png | Bin 0 -> 359 bytes mods/compassgps/textures/cgpsmap-marked.png | Bin 0 -> 399 bytes mods/compassgps/textures/compass_0.png | Bin 0 -> 485 bytes mods/compassgps/textures/compass_1.png | Bin 0 -> 492 bytes mods/compassgps/textures/compass_10.png | Bin 0 -> 499 bytes mods/compassgps/textures/compass_11.png | Bin 0 -> 499 bytes mods/compassgps/textures/compass_2.png | Bin 0 -> 490 bytes mods/compassgps/textures/compass_3.png | Bin 0 -> 487 bytes mods/compassgps/textures/compass_4.png | Bin 0 -> 499 bytes mods/compassgps/textures/compass_5.png | Bin 0 -> 492 bytes mods/compassgps/textures/compass_6.png | Bin 0 -> 484 bytes mods/compassgps/textures/compass_7.png | Bin 0 -> 492 bytes mods/compassgps/textures/compass_8.png | Bin 0 -> 495 bytes mods/compassgps/textures/compass_9.png | Bin 0 -> 487 bytes mods/compassgps/textures/compass_b0.png | Bin 0 -> 584 bytes mods/compassgps/textures/compass_b1.png | Bin 0 -> 587 bytes mods/compassgps/textures/compass_b10.png | Bin 0 -> 539 bytes mods/compassgps/textures/compass_b11.png | Bin 0 -> 526 bytes mods/compassgps/textures/compass_b2.png | Bin 0 -> 571 bytes mods/compassgps/textures/compass_b3.png | Bin 0 -> 575 bytes mods/compassgps/textures/compass_b4.png | Bin 0 -> 541 bytes mods/compassgps/textures/compass_b5.png | Bin 0 -> 525 bytes mods/compassgps/textures/compass_b6.png | Bin 0 -> 537 bytes mods/compassgps/textures/compass_b7.png | Bin 0 -> 527 bytes mods/compassgps/textures/compass_b8.png | Bin 0 -> 522 bytes mods/compassgps/textures/compass_b9.png | Bin 0 -> 552 bytes mods/compassgps/textures/compass_c0.png | Bin 0 -> 2523 bytes mods/compassgps/textures/compass_c1.png | Bin 0 -> 2551 bytes mods/compassgps/textures/compass_c10.png | Bin 0 -> 2573 bytes mods/compassgps/textures/compass_c11.png | Bin 0 -> 2575 bytes mods/compassgps/textures/compass_c2.png | Bin 0 -> 2551 bytes mods/compassgps/textures/compass_c3.png | Bin 0 -> 2536 bytes mods/compassgps/textures/compass_c4.png | Bin 0 -> 2574 bytes mods/compassgps/textures/compass_c5.png | Bin 0 -> 2565 bytes mods/compassgps/textures/compass_c6.png | Bin 0 -> 2543 bytes mods/compassgps/textures/compass_c7.png | Bin 0 -> 2567 bytes mods/compassgps/textures/compass_c8.png | Bin 0 -> 2565 bytes mods/compassgps/textures/compass_c9.png | Bin 0 -> 2530 bytes mods/compassgps/textures/compassgps_blank.png | Bin 0 -> 103 bytes mods/worldedge/init.lua | 4 +- 47 files changed, 2093 insertions(+), 2 deletions(-) create mode 100644 mods/compassgps/README.md create mode 100644 mods/compassgps/README.txt create mode 100644 mods/compassgps/cgpsmap.lua create mode 100644 mods/compassgps/depends.txt create mode 100644 mods/compassgps/init.lua create mode 100644 mods/compassgps/locale/de.txt create mode 100644 mods/compassgps/locale/template.txt create mode 100644 mods/compassgps/textures/cgpsmap-blank.png create mode 100644 mods/compassgps/textures/cgpsmap-marked.png create mode 100644 mods/compassgps/textures/compass_0.png create mode 100644 mods/compassgps/textures/compass_1.png create mode 100644 mods/compassgps/textures/compass_10.png create mode 100644 mods/compassgps/textures/compass_11.png create mode 100644 mods/compassgps/textures/compass_2.png create mode 100644 mods/compassgps/textures/compass_3.png create mode 100644 mods/compassgps/textures/compass_4.png create mode 100644 mods/compassgps/textures/compass_5.png create mode 100644 mods/compassgps/textures/compass_6.png create mode 100644 mods/compassgps/textures/compass_7.png create mode 100644 mods/compassgps/textures/compass_8.png create mode 100644 mods/compassgps/textures/compass_9.png create mode 100644 mods/compassgps/textures/compass_b0.png create mode 100644 mods/compassgps/textures/compass_b1.png create mode 100644 mods/compassgps/textures/compass_b10.png create mode 100644 mods/compassgps/textures/compass_b11.png create mode 100644 mods/compassgps/textures/compass_b2.png create mode 100644 mods/compassgps/textures/compass_b3.png create mode 100644 mods/compassgps/textures/compass_b4.png create mode 100644 mods/compassgps/textures/compass_b5.png create mode 100644 mods/compassgps/textures/compass_b6.png create mode 100644 mods/compassgps/textures/compass_b7.png create mode 100644 mods/compassgps/textures/compass_b8.png create mode 100644 mods/compassgps/textures/compass_b9.png create mode 100644 mods/compassgps/textures/compass_c0.png create mode 100644 mods/compassgps/textures/compass_c1.png create mode 100644 mods/compassgps/textures/compass_c10.png create mode 100644 mods/compassgps/textures/compass_c11.png create mode 100644 mods/compassgps/textures/compass_c2.png create mode 100644 mods/compassgps/textures/compass_c3.png create mode 100644 mods/compassgps/textures/compass_c4.png create mode 100644 mods/compassgps/textures/compass_c5.png create mode 100644 mods/compassgps/textures/compass_c6.png create mode 100644 mods/compassgps/textures/compass_c7.png create mode 100644 mods/compassgps/textures/compass_c8.png create mode 100644 mods/compassgps/textures/compass_c9.png create mode 100755 mods/compassgps/textures/compassgps_blank.png diff --git a/mods/compassgps/README.md b/mods/compassgps/README.md new file mode 100644 index 00000000..7b2bc3ad --- /dev/null +++ b/mods/compassgps/README.md @@ -0,0 +1,158 @@ +This mod creates a customizable compass with user settable bookmarks and shared and admin bookmarks in multiplayer. + +**Compass GPS version 2.6** + +Echo created a compass mod back in 2012: [https://forum.minetest.net/viewtopic.php?id=3785](https://forum.minetest.net/viewtopic.php?id=3785)

+PilzAdams made a modification of it, which I can not find the source to, I don't know how much of PilzAdams changes made it into the later versions of Echo's mod.

+Then in 2013 TeTpaAka made a fork of the compass mod that he called compass+ [https://forum.minetest.net/viewtopic.php?id=8117](https://forum.minetest.net/viewtopic.php?id=8117)

+This fork added the ability to "bookmark" specific places, and a gui so you could choose what point the compass should point to. + +This is my fork of TeTpaAka's fork of Echo's mod. :) + +The compass mod as it was is REALLY cool I love the way Echo managed to make the compass in your inventory actually change it's image to point in the direction of it's target + +![alt text](http://i59.tinypic.com/a15ls0.png "image") + +And TeTpaAka's gui, file io, and coding for multiplayer games was simply amazing. But as I was learning from their awesome code, I saw some changes I'd like to make using these new ideas, as well as some things I learned while looking at other mods. So, with complete and total respect for the original awesome mods, and hopefully in the same spirit as theirs, I present my own fork of the fork. CompassGPS + +The crafting recipe for a compass is unchanged:

+``` + , steel , +steel, mese fragment, steel + , steel , +``` +![alt text](http://i59.tinypic.com/14ad2qw.png "image") + +Compass GPS introduces several other changes though. First of all, this mod adds a heads up display that indicates your current position, and the name of the bookmark the compass is pointing at, that bookmarks pos, as well as the distance to that bookmark. + +![alt text](http://i60.tinypic.com/facwea.png "image") + +The hud updates constantly as long as the compass is in one of your active inventory slots, so you can always know where you are in relation to the target node, and how far away it is. + +There is a GUI that pops up whenever you wield the compass and left click. I never played with a GUI in minetest before, so this was a new experience for me, I learned a lot and made quite a few changes: + +![alt text](http://i61.tinypic.com/29zzgy1.png "image") + +To create a new bookmark, type the name into the "bookmark:" field and click "Create Bookmark" (or just hit enter). To remove a bookmark, select it from the list and click "Remove Bookmark." A confirmation dialog will appear and the bookmark will only be removed if you click "YES". + +The bookmark list has been expanded from a dropdown into a textlist to improve visibility. Select any bookmark in the list by clicking on it, and then click "Find Selected Bookmark" to make the compass (and hud) point at that location. "default" is always at the top of the list and will point to (0,0,0) or your bed from PilzAdams bed-mod, or home location as defined in the sethome-mod. (Setting default to your bed or sethome is old code, I modified it to make it work with my new version, but I cant take credit for the idea or basic structure.) The rest of the list are bookmarked locations that you have set and named + +Just click in the "Sort by" box to change whether the bookmarks are sorted by name, or by distance from your current location. ("default" will still always be the first item in the list no matter which way you sort it) + +Click in the "Dist" box to change whether the distance is calculated in 3d (including your distance in the vertical direction) or in 2d (x and z coords only, ignore vertical distance) + +Down at the lower right of the screen, I'm certain you noticed the "Teleport to bookmark" button. *That button appears if, and ONLY IF the player has teleport privileges.* If they do, then they can select any bookmark out of the list, click on teleport, and be instantly transported to the location of that bookmark. Since the user already had teleport privileges, this just saved them some typing, it's not adding any new abilities. + +If you click the "Settings" button in the upper right hand corner it brings up a screen where you can customize the appearance of your compass gps: + +![alt text](http://i59.tinypic.com/aahqa8.png "image")

+(The two awesome new compass images are by Bas080 and Spootonium) + +I figured the position of the hud text was likely to be something that people would want to customize, so here in the settings gui are the x and y coords for the hud text. Just enter the new coords where you want the hud text to appear and click "Change Hud"

+The cords must be between 0 and 1 and represent a percentage of the screen, so x=0 would put the text at the far left of the screen, and y=0.98 would put the text almost at the bottom of the screen. The default is x=0.4 and y=0.01, and that is displayed right over the input boxes so the user can easily set them back to the default if they are having trouble placing the hud. If you change either the x or y coord to a number that is out of range (less than 0 or greater than 1) then the hud will not be displayed. That makes it easy to turn the hud off if you wish.

+You can also change the color of the hud text by changing the value in the "Color" field here. Again, click "Change Hud" to make the update appear. + +AND, there are three buttons here that allow you to select from 3 different styles of compass images. The basic compass image by Echo. A nice wooden compass image by Bas080. And a high resolution compass image by spootonium. + +In Multiplayer, there are now shared and admin bookmarks!

+![alt text](http://i61.tinypic.com/a5b7li.png "image")

+If a player has the new "shared_bookmarks" privilege, then they will get the "Create Shared Bookmark" button and be able to create bookmarks that all players on the server can see and use. Shared bookmarks are preceded by *shared* and the name of the player that created them. There is a variable near the top of the init.lua called max_shared. This controls the maximum number of shared bookmarks that an individual player can create. It is set to 10 by default, but the server admin can change it to whatever they want. A player can delete their own shared bookmarks, but they can not delete anyone else's (unless they are an admin, then they can delete anyone's shared bookmarks) + +If a player has the "privs" privilege, then they will get the "Create Admin Bookmark" button. Admin bookmarks are intended to allow the admins to mark important places in their world that they want everyone to be able to find. There are no limits on how many admin bookmarks can be created. Only Admins can delete admin bookmarks. + +In a multiplayer game, all players get the "Show: Private, Shared, Admin" checkboxes. You can use these checkboxes to toggle which type of bookmarks show in your list. If you uncheck all three the system will automatically recheck "Private" for you. + +The bookmark list is saved any time a user changes it. All of your other settings, the currently selected bookmark, sort order, distance function, and hud position and color, and compass type, are saved whenever a user leaves the game, and on game shutdown. So if you move the hud down to the lower right hand corner of the screen, and then quit, the hud will still be in the place you put it when you restart the game later. + +The Chat Commands from the orignal compass mod still work, but only on private bookmarks. Chat commands available are:

+list_bookmarks

+set_bookmark

+find_bookmark

+remove_bookmark + +I also fixed a few bugs while I was working on this. There was a problem in the mod that caused compass to jump around in inventory if there were empty slots above it, that is fixed now. And there was also a problem with the bookmark list not being saved after you removed a bookmark if you didn't add a new bookmark afterwards. Now the bookmark list is saved whenever you change it, either adding or removing. + +I tried to follow Echo and TeTpaAka's examples of how to properly code for multiplayer games, and all of the new settings should work just fine in a multiplayer game. + +----** MAPS! **---- + +Thanks to a great idea and initial code from TeTpaAka CompassGPS now includes MAPS!

+Maps allow you to store a bookmark that you can then give to another player and they can use the map to put that bookmark into their own list. They also enhance role playing/story possibilities since you can hide maps for players to find that will give them bookmarks they need to find their next goal. + +Craft a blank map by putting 5 papers in an X pattern:

+``` +paper, ,paper + ,paper, +paper, ,paper +``` +![alt text](http://i57.tinypic.com/20z5wmr.png "image") + +To place a bookmark into a map, just right click while wielding the map, select any bookmark from your list, and click the "write to cgpsmap" button. You can also put your current position into the map (without having to first create a bookmark in your compassGPS) + +The map icon now changes to have a red X on it, so you can tell it is a marked map. This map can be given to another player. To transfer the bookmark to their own compassgps, they right click while wielding the marked map and a formspec like this pops up:

+![alt text](http://i61.tinypic.com/jakj9v.png "image")

+You can change the name of the bookmark to whatever you wish, click the "copy bookmark to your compassgps" button and the new bookmark is now available in your compassgps list. + +To turn a marked map back into a blank map, just put it into the crafting grid. + +Thanks to some nice code by Miner59 you can now mount a map on a wall! If you can dig on the position where the map is placed, you can take the map, otherwise you can add the bookmark saved in the map in your compassgps. This will make it possible on a multiplayer server to mount maps that everyone can use. + +--------------------- + +The code is kinda a mess, because I was learning a lot of new things while working on it. I hope to do a clean up on it sometime in the near future, but I wanted to release it now so some people could start testing it. Please do not hesitate to offer critiques, criticism, or coding advice. I'm new to lua and minetest and could use the help. + +And above all, if you run into a bug, please let me know! + +**Credits:**

+Original mod is by Echo and TeTpaAka, and probably PilzAdam. Cactuz_pl clockmod showed me how to write the hud to the screen. My son offered a lot of advice and suggested several changes. I got an example of how to sort lists in lua from Michal Kottman on StackOverflow. Big thanks to Bas080 and spootonium for providing some very nice alternate images for the compass gps mod! Also thanks to Topywo for the shared bookmarks idea, and to my son for several ideas, corrections, and testing help.

+Map idea, image, and initial code by TeTpaAka. Store current position in map code contributed by Miner95

+intllib support by TeTpaAka

+Wall mounted maps by Miner59 + +**License:**

+Original code by Echo, PilzAdam, and TeTpaAka is WTFPL. My changes are CC0 (No rights reserved)

+textures: original compass textures: CC BY-SA by Echo

+ compass b textures: CC BY-SA by Bas080 (slight modifications by Kilarin)

+ compass c textures: CC BY-SA by Andre Goble mailto:spootonium@gmail.com

+ (slight modifications by Kilarin)

+ map texture: CC BY-SA by TeTpaAka (slight modifications by Kilarin for blank map) + +**Dependencies:**

+default is the only requirement.

+PilzAdams Beds mod and the sethome-mod are supported if you have them. + +**Incompatibilities:**

+This mod will clash with both the original compass and compass+ mods. They should not be installed and enabled at the same time as compassgps. HOWEVER, compassgps is 100% compatible with the bookmarks file from the compass+ mod. So if you were using compass+ and switch to compassgps you will NOT lose your previous bookmarks. + +**github source:**

+[https://github.com/Kilarin/compassgps](https://github.com/Kilarin/compassgps) + +**Download:**

+[https://github.com/Kilarin/compassgps/archive/master.zip](https://github.com/Kilarin/compassgps/archive/master.zip) + +**To install:**

+Simply unzip the file into your mods folder, then rename the resulting folder from compassgps-master to compassgps

+OR, simply install it directly from minetest using the online mod repository. + +**Mod Database:**

+If you use this mod, please consider reviewing it on the MineTest Mod Database.

+[https://forum.minetest.net/mmdb/mod/compassgps/](https://forum.minetest.net/mmdb/mod/compassgps/) + +**Changelog:**

+2.6 bug fix from myoung008, type causing crashes when entering bad color.

+2.5 bug fix from TeTpaAka fix bug when static_spawnpoint is invalid

+2.4 wall mounted maps by Miner59

+2.3 intllib support by TeTpaTka so CompassGPS will work with different languages now!

+2.2 current position option in bookmark list when writing to map (Miner95 contribution)

+2.1 cgpsmap_marked notincreative and defaults to default on /giveme

+2.0 maps so you can exchange bookmarks between players (TeTpaAka initial contribution)

+1.9 corrected undeclared global variables to avoid warnings.

+1.8 changed register_craft to compassgps:0 for unified inventory compatibility

+1.7 fixed bug causing crash on first load of formspec in multiplayer

+1.6 fixed compass point_to not saving

+1.5 shared/admin bookmarks. confirm dialog for remove.

+1.4 corrected teleport button priv

+1.3 multiple compass types

+1.2 rounding of position corrected

+1.1 switched core to minetest

+1.0 Initial release

diff --git a/mods/compassgps/README.txt b/mods/compassgps/README.txt new file mode 100644 index 00000000..781c9898 --- /dev/null +++ b/mods/compassgps/README.txt @@ -0,0 +1,157 @@ +[b]Compass GPS version 2.6[/b] +This mod creates a customizable compass with user settable bookmarks and shared and admin bookmarks in multiplayer. + +Echo created a compass mod back in 2012: [url]https://forum.minetest.net/viewtopic.php?id=3785[/url] +PilzAdams made a modification of it, which I can not find the source to, I don't know how much of PilzAdams changes made it into the later versions of Echo's mod. +Then in 2013 TeTpaAka made a fork of the compass mod that he called compass+ [url]https://forum.minetest.net/viewtopic.php?id=8117[/url] +This fork added the ability to "bookmark" specific places, and a gui so you could choose what point the compass should point to. + +This is my fork of TeTpaAka's fork of Echo's mod. :) + +The compass mod as it was is REALLY cool I love the way Echo managed to make the compass in your inventory actually change it's image to point in the direction of it's target + +[img]http://i59.tinypic.com/a15ls0.png[/img] + +And TeTpaAka's gui, file io, and coding for multiplayer games was simply amazing. But as I was learning from their awesome code, I saw some changes I'd like to make using these new ideas, as well as some things I learned while looking at other mods. So, with complete and total respect for the original awesome mods, and hopefully in the same spirit as theirs, I present my own fork of the fork. CompassGPS + +The crafting recipe for a compass is unchanged: +[code] + , steel , +steel, mese fragment, steel + , steel , +[/code] +[img]http://i59.tinypic.com/14ad2qw.png[/img] + +Compass GPS introduces several other changes though. First of all, this mod adds a heads up display that indicates your current position, and the name of the bookmark the compass is pointing at, that bookmarks pos, as well as the distance to that bookmark. + +[img]http://i60.tinypic.com/facwea.png[/img] + +The hud updates constantly as long as the compass is in one of your active inventory slots, so you can always know where you are in relation to the target node, and how far away it is. + +There is a GUI that pops up whenever you wield the compass and left click. I never played with a GUI in minetest before, so this was a new experience for me, I learned a lot and made quite a few changes: + +[IMG]http://i61.tinypic.com/29zzgy1.png[/IMG] + +To create a new bookmark, type the name into the "bookmark:" field and click "Create Bookmark" (or just hit enter). To remove a bookmark, select it from the list and click "Remove Bookmark." A confirmation dialog will appear and the bookmark will only be removed if you click "YES". + +The bookmark list has been expanded from a dropdown into a textlist to improve visibility. Select any bookmark in the list by clicking on it, and then click "Find Selected Bookmark" to make the compass (and hud) point at that location. "default" is always at the top of the list and will point to (0,0,0) or your bed from PilzAdams bed-mod, or home location as defined in the sethome-mod. (Setting default to your bed or sethome is old code, I modified it to make it work with my new version, but I cant take credit for the idea or basic structure.) The rest of the list are bookmarked locations that you have set and named + +Just click in the "Sort by" box to change whether the bookmarks are sorted by name, or by distance from your current location. ("default" will still always be the first item in the list no matter which way you sort it) + +Click in the "Dist" box to change whether the distance is calculated in 3d (including your distance in the vertical direction) or in 2d (x and z coords only, ignore vertical distance) + +Down at the lower right of the screen, I'm certain you noticed the "Teleport to bookmark" button. [i]That button appears if, and ONLY IF the player has teleport privileges.[/i] If they do, then they can select any bookmark out of the list, click on teleport, and be instantly transported to the location of that bookmark. Since the user already had teleport privileges, this just saved them some typing, it's not adding any new abilities. + +If you click the "Settings" button in the upper right hand corner it brings up a screen where you can customize the appearance of your compass gps: + +[IMG]http://i59.tinypic.com/aahqa8.png[/IMG] +(The two awesome new compass images are by Bas080 and Spootonium) + +I figured the position of the hud text was likely to be something that people would want to customize, so here in the settings gui are the x and y coords for the hud text. Just enter the new coords where you want the hud text to appear and click "Change Hud" +The cords must be between 0 and 1 and represent a percentage of the screen, so x=0 would put the text at the far left of the screen, and y=0.98 would put the text almost at the bottom of the screen. The default is x=0.4 and y=0.01, and that is displayed right over the input boxes so the user can easily set them back to the default if they are having trouble placing the hud. If you change either the x or y coord to a number that is out of range (less than 0 or greater than 1) then the hud will not be displayed. That makes it easy to turn the hud off if you wish. +You can also change the color of the hud text by changing the value in the "Color" field here. Again, click "Change Hud" to make the update appear. + +AND, there are three buttons here that allow you to select from 3 different styles of compass images. The basic compass image by Echo. A nice wooden compass image by Bas080. And a high resolution compass image by spootonium. + +In Multiplayer, there are now shared and admin bookmarks! +[IMG]http://i61.tinypic.com/a5b7li.png[/IMG] +If a player has the new "shared_bookmarks" privilege, then they will get the "Create Shared Bookmark" button and be able to create bookmarks that all players on the server can see and use. Shared bookmarks are preceded by *shared* and the name of the player that created them. There is a variable near the top of the init.lua called max_shared. This controls the maximum number of shared bookmarks that an individual player can create. It is set to 10 by default, but the server admin can change it to whatever they want. A player can delete their own shared bookmarks, but they can not delete anyone else's (unless they are an admin, then they can delete anyone's shared bookmarks) + +If a player has the "privs" privilege, then they will get the "Create Admin Bookmark" button. Admin bookmarks are intended to allow the admins to mark important places in their world that they want everyone to be able to find. There are no limits on how many admin bookmarks can be created. Only Admins can delete admin bookmarks. + +In a multiplayer game, all players get the "Show: Private, Shared, Admin" checkboxes. You can use these checkboxes to toggle which type of bookmarks show in your list. If you uncheck all three the system will automatically recheck "Private" for you. + +The bookmark list is saved any time a user changes it. All of your other settings, the currently selected bookmark, sort order, distance function, and hud position and color, and compass type, are saved whenever a user leaves the game, and on game shutdown. So if you move the hud down to the lower right hand corner of the screen, and then quit, the hud will still be in the place you put it when you restart the game later. + +The Chat Commands from the orignal compass mod still work, but only on private bookmarks. Chat commands available are: +list_bookmarks +set_bookmark +find_bookmark +remove_bookmark + +I also fixed a few bugs while I was working on this. There was a problem in the mod that caused compass to jump around in inventory if there were empty slots above it, that is fixed now. And there was also a problem with the bookmark list not being saved after you removed a bookmark if you didn't add a new bookmark afterwards. Now the bookmark list is saved whenever you change it, either adding or removing. + +I tried to follow Echo and TeTpaAka's examples of how to properly code for multiplayer games, and all of the new settings should work just fine in a multiplayer game. + +----[b] MAPS! [/b]---- + +Thanks to a great idea and initial code from TeTpaAka CompassGPS now includes MAPS! +Maps allow you to store a bookmark that you can then give to another player and they can use the map to put that bookmark into their own list. They also enhance role playing/story possibilities since you can hide maps for players to find that will give them bookmarks they need to find their next goal. + +Craft a blank map by putting 5 papers in an X pattern: +[code] +paper, ,paper + ,paper, +paper, ,paper +[/code] +[img]http://i57.tinypic.com/20z5wmr.png[/img] + +To place a bookmark into a map, just right click while wielding the map, select any bookmark from your list, and click the "write to cgpsmap" button. You can also put your current position into the map (without having to first create a bookmark in your compassGPS) + +The map icon now changes to have a red X on it, so you can tell it is a marked map. This map can be given to another player. To transfer the bookmark to their own compassgps, they right click while wielding the marked map and a formspec like this pops up: +[img]http://i61.tinypic.com/jakj9v.png[/img] +You can change the name of the bookmark to whatever you wish, click the "copy bookmark to your compassgps" button and the new bookmark is now available in your compassgps list. + +To turn a marked map back into a blank map, just put it into the crafting grid. + +Thanks to some nice code by Miner59 you can now mount a map on a wall! If you can dig on the position where the map is placed, you can take the map, otherwise you can add the bookmark saved in the map in your compassgps. This will make it possible on a multiplayer server to mount maps that everyone can use. + +--------------------- + +The code is kinda a mess, because I was learning a lot of new things while working on it. I hope to do a clean up on it sometime in the near future, but I wanted to release it now so some people could start testing it. Please do not hesitate to offer critiques, criticism, or coding advice. I'm new to lua and minetest and could use the help. + +And above all, if you run into a bug, please let me know! + +[b]Credits:[/b] +Original mod is by Echo and TeTpaAka, and probably PilzAdam. Cactuz_pl clockmod showed me how to write the hud to the screen. My son offered a lot of advice and suggested several changes. I got an example of how to sort lists in lua from Michal Kottman on StackOverflow. Big thanks to Bas080 and spootonium for providing some very nice alternate images for the compass gps mod! Also thanks to Topywo for the shared bookmarks idea, and to my son for several ideas, corrections, and testing help. +Map idea, image, and initial code by TeTpaAka. Store current position in map code contributed by Miner95 +intllib support by TeTpaAka +Wall mounted maps by Miner59 + +[b]License:[/b] +Original code by Echo, PilzAdam, and TeTpaAka is WTFPL. My changes are CC0 (No rights reserved) +textures: original compass textures: CC BY-SA by Echo + compass b textures: CC BY-SA by Bas080 (slight modifications by Kilarin) + compass c textures: CC BY-SA by Andre Goble mailto:spootonium@gmail.com + (slight modifications by Kilarin) + map texture: CC BY-SA by TeTpaAka (slight modifications by Kilarin for blank map) + +[b]Dependencies:[/b] +default is the only requirement. +PilzAdams Beds mod and the sethome-mod are supported if you have them. + +[b]Incompatibilities:[/b] +This mod will clash with both the original compass and compass+ mods. They should not be installed and enabled at the same time as compassgps. HOWEVER, compassgps is 100% compatible with the bookmarks file from the compass+ mod. So if you were using compass+ and switch to compassgps you will NOT lose your previous bookmarks. + +[b]github source:[/b] +[url]https://github.com/Kilarin/compassgps[/url] + +[b]Download:[/b] +[url]https://github.com/Kilarin/compassgps/archive/master.zip[/url] + +[b]To install:[/b] +Simply unzip the file into your mods folder, then rename the resulting folder from compassgps-master to compassgps +OR, simply install it directly from minetest using the online mod repository. + +[b]Mod Database:[/b] +If you use this mod, please consider reviewing it on the MineTest Mod Database. +[url]https://forum.minetest.net/mmdb/mod/compassgps/[/url] + +[b]Changelog:[/b] +2.6 bug fix from myoung008, type causing crashes when entering bad color. +2.5 bug fix from TeTpaAka fix bug when static_spawnpoint is invalid +2.4 wall mounted maps by Miner59 +2.3 intllib support by TeTpaTka so CompassGPS will work with different languages now! +2.2 current position option in bookmark list when writing to map (Miner95 contribution) +2.1 cgpsmap_marked notincreative and defaults to default on /giveme +2.0 maps so you can exchange bookmarks between players (TeTpaAka initial contribution) +1.9 corrected undeclared global variables to avoid warnings. +1.8 changed register_craft to compassgps:0 for unified inventory compatibility +1.7 fixed bug causing crash on first load of formspec in multiplayer +1.6 fixed compass point_to not saving +1.5 shared/admin bookmarks. confirm dialog for remove. +1.4 corrected teleport button priv +1.3 multiple compass types +1.2 rounding of position corrected +1.1 switched core to minetest +1.0 Initial release diff --git a/mods/compassgps/cgpsmap.lua b/mods/compassgps/cgpsmap.lua new file mode 100644 index 00000000..cab62ed6 --- /dev/null +++ b/mods/compassgps/cgpsmap.lua @@ -0,0 +1,350 @@ +--original code for storing bookmarks outside of the compass by TeTpaAka +--modifications by Kilarin and Miner59 +--wall mounted maps by Miner59 + +--set growing_wall_maps to true and wall mounted maps will get bigger the further +--away the target is. +local growing_wall_maps=false + + +-- Boilerplate to support localized strings if intllib mod is installed. +local S +if (minetest.get_modpath("intllib")) then + dofile(minetest.get_modpath("intllib").."/intllib.lua") + S = intllib.Getter(minetest.get_current_modname()) +else + S = function ( s ) return s end +end + + +local selected_cgpsmap = {} +local textlist_bookmark = {} +local selected_bookmark = {} + +function write_to_cgpsmap(itemstack, user) + --print("write_to_cgpsmap") + selected_cgpsmap[user:get_player_name()] = itemstack + local list,bkmrkidx=compassgps.bookmark_loop("M", user:get_player_name()) + if list == "" then + return nil + end + textlist_bookmark[user:get_player_name()] = list + local formspec = "size[9,10;]".. + "button_exit[2,2;5,0.5;write;"..S("Write to cgpsmap").."]".. + "textlist[0,3.0;9,6;bookmark_list;"..list..";"..bkmrkidx.."]" + minetest.show_formspec(user:get_player_name(), "compassgps:write", formspec) + --print("write_to_cgpsmap end") +end + + +function read_from_cgpsmap(itemstack, user, meta) + --print("read_from_cgpsmap") + local formspec = "size[9,5]".. + "button_exit[2,3;5,0.5;read;"..S("copy bookmark to your compassgps").."]" + if itemstack~=nil then + formspec=formspec.. "button_exit[3.1,4;2.6,0.8;rename;"..S("rename bookmark").."]" + else + itemstack=ItemStack("compassgps:cgpsmap_marked 1") + if meta then + itemstack:set_metadata(minetest.serialize(meta)) + end + end + if not meta then --marked map from creative or /giveme has no meta! + meta={bkmrkname="default",x=0,y=0,z=0} + itemstack:set_metadata(minetest.serialize(meta)) + end + selected_cgpsmap[user:get_player_name()] = itemstack + + formspec=formspec.."label[2,0.5;"..S("bookmark pos:").." ("..meta["x"]..","..meta["y"]..","..meta["z"]..")]".. + "field[2,2;5,0.5;name;"..S("bookmark name:")..";"..meta["bkmrkname"].."]" + minetest.show_formspec(user:get_player_name(), "compassgps:read", formspec) + --print("read_from_cgpsmap end") +end + + + +minetest.register_craft({ + output = 'compassgps:cgpsmap', + recipe = { + {'default:paper', '', 'default:paper'}, + {'', 'default:paper', ''}, + {'default:paper', '', 'default:paper'} + } +}) + +minetest.register_craft({ + output = 'compassgps:cgpsmap', + recipe = { + {'compassgps:cgpsmap_marked'}, + } +}) + +minetest.register_craftitem("compassgps:cgpsmap", { + description = S("CompassGPS Map (blank)"), + inventory_image = "cgpsmap-blank.png", + --groups = {book = 1}, + stack_max = 1, + on_use = function(itemstack, user, pointed_thing) + write_to_cgpsmap(itemstack, user) + return + end +}) + +minetest.register_craftitem("compassgps:cgpsmap_marked", { + description = "CompassGPS Map (marked)", + inventory_image = "cgpsmap-marked.png", + groups = {not_in_creative_inventory = 1}, + stack_max = 1, + + on_use = function(itemstack, user, pointed_thing) + local meta = minetest.deserialize(itemstack:get_metadata()) + read_from_cgpsmap(itemstack, user, meta) + return nil + end, + + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.type=="node" and pointed_thing.above then + local pos=pointed_thing.above + local ppos=placer:getpos() + local facedir=minetest.dir_to_facedir(vector.direction(ppos,pointed_thing.under)) + local x=pos.x + local y=pos.y + local z=pos.z + if facedir~=nil and itemstack:get_name()=="compassgps:cgpsmap_marked" + and (not minetest.is_protected(pos,placer:get_player_name())) then + minetest.set_node(pos,{name="compassgps:cgpsmap_wall",param2=facedir}) + local mapdata = itemstack:get_metadata() + local meta=minetest.get_meta(pos) + meta:set_string("mapdata",mapdata) + if mapdata~=nil then + local data=minetest.deserialize(mapdata) + if data~=nil then + meta:set_string("infotext", data["bkmrkname"]) + x=data["x"] + y=data["y"] + z=data["z"] + end + end + if facedir==1 then + pos={x=pos.x+0.3,y=pos.y,z=pos.z} + elseif facedir==3 then + pos={x=pos.x-0.3,y=pos.y,z=pos.z} + elseif facedir==0 then + pos={x=pos.x,y=pos.y,z=pos.z+0.3} + elseif facedir==2 then + pos={x=pos.x,y=pos.y,z=pos.z-0.3} + end + local e = minetest.env:add_entity(pos,"compassgps:cgpsmap_item") + local yaw = math.pi*2 - facedir * math.pi/2 + e:setyaw(yaw) + local dist=math.abs(pos.x-x)+math.abs(pos.y-y)+math.abs(pos.z-z) + if growing_wall_maps == false then + e:set_properties({visual_size={x=0.85,y=0.85}}) + elseif dist>30000 then + e:set_properties({visual_size={x=3.45,y=3.45}}) + elseif dist>15000 then + e:set_properties({visual_size={x=2.95,y=2.95}}) + elseif dist>5000 then + e:set_properties({visual_size={x=2.45,y=2.45}}) + elseif dist>3000 then + e:set_properties({visual_size={x=1.45,y=1.45}}) + elseif dist>2000 then + e:set_properties({visual_size={x=1.2,y=1.2}}) + elseif dist>1000 then + e:set_properties({visual_size={x=1,y=1}}) + elseif dist>500 then + e:set_properties({visual_size={x=0.85,y=0.85}}) + end--else default (0.7) + + itemstack:take_item() + end + end + return itemstack + end, +}) + +minetest.register_node("compassgps:cgpsmap_wall",{ + description = "CompassGPS Map (wallmounted)", + drawtype = "nodebox", + node_box = { type = "fixed", fixed = {-0.5, -0.5, 7/16, 0.5, 0.5, 0.5} }, + selection_box = { type = "fixed", fixed = {-0.7, -0.7, 7/16, 0.7, 0.7, 0.7} }, + tiles = {"compassgps_blank.png"}, + inventory_image = "cgpsmap_marked.png", + wield_image = "cgpsmap_marked.png", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + groups = { choppy=2,dig_immediate=2,not_in_creative_inventory=1,not_in_craft_guide=1 }, + legacy_wallmounted = true, + sounds = default.node_sound_defaults(), + on_punch = function(pos,node,puncher) + local meta = minetest.env:get_meta(pos) + local mapdata=meta:get_string("mapdata") + + if minetest.is_protected(pos,puncher:get_player_name()) then + --don't take map, instead open formspec to add coordinates in compassgps + if mapdata~=nil then + read_from_cgpsmap(nil, puncher, minetest.deserialize(mapdata)) + end + return + end + local inv = puncher:get_inventory() + + local objs = nil + objs = minetest.env:get_objects_inside_radius(pos, .5) + if objs then + for _, obj in ipairs(objs) do + if obj and obj:get_luaentity() and obj:get_luaentity().name == "compassgps:cgpsmap_item" then + obj:remove() + end + end + end + local itemstack=ItemStack("compassgps:cgpsmap_marked 1") + itemstack:set_metadata(mapdata) + if inv:room_for_item("main",itemstack) then + inv:add_item("main",itemstack) + else + minetest.env:add_item(pos, itemstack) + end + minetest.remove_node(pos) + end, +}) + +minetest.register_entity("compassgps:cgpsmap_item",{ + hp_max = 1, + visual="wielditem", + visual_size={x=0.7,y=0.7}, + collisionbox = {0,0,0,0,0,0}, + physical=false, + textures={"compassgps:cgpsmap_marked"}, +}) + +minetest.register_abm({ + nodenames = { "compassgps:cgpsmap_wall" }, + interval = 600, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + if #minetest.get_objects_inside_radius(pos, 0.5) > 0 then return end + local meta=minetest.get_meta(pos) + local x=pos.x + local y=pos.y + local z=pos.z + local mapdata=meta:get_string("mapdata",mapdata) + if mapdata~=nil then + local data=minetest.deserialize(mapdata) + if data~=nil then + x=data["x"] + y=data["y"] + z=data["z"] + end + end + local facedir=node.param2 + if facedir==1 then + pos={x=pos.x+0.3,y=pos.y,z=pos.z} + elseif facedir==3 then + pos={x=pos.x-0.3,y=pos.y,z=pos.z} + elseif facedir==0 then + pos={x=pos.x,y=pos.y,z=pos.z+0.3} + elseif facedir==2 then + pos={x=pos.x,y=pos.y,z=pos.z-0.3} + end + local e = minetest.env:add_entity(pos,"compassgps:cgpsmap_item") + local yaw = math.pi*2 - facedir * math.pi/2 + e:setyaw(yaw) + local dist=math.abs(pos.x-x)+math.abs(pos.y-y)+math.abs(pos.z-z) + if dist>30000 then + e:set_properties({visual_size={x=3.45,y=3.45}}) + elseif dist>15000 then + e:set_properties({visual_size={x=2.95,y=2.95}}) + elseif dist>5000 then + e:set_properties({visual_size={x=2.45,y=2.45}}) + elseif dist>3000 then + e:set_properties({visual_size={x=1.45,y=1.45}}) + elseif dist>2000 then + e:set_properties({visual_size={x=1.2,y=1.2}}) + elseif dist>1000 then + e:set_properties({visual_size={x=1,y=1}}) + elseif dist>500 then + e:set_properties({visual_size={x=0.85,y=0.85}}) + end--else default (0.7) + + end +}) + + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if (formname == "compassgps:write") then + if not player then + return + end + local playername = player:get_player_name(); + if (playername ~= "") then + if (selected_cgpsmap[playername] == nil) then + return + end + if fields["bookmark_list"] then + -- to get the currently selected + local id = minetest.explode_textlist_event(fields["bookmark_list"]) + selected_bookmark[playername] = id.index + end + if fields["write"] then + --print("***cgpsmap fields=write***") + if selected_bookmark[playername] == nil then + return nil + end + local bkmrk=textlist_bkmrks[playername][selected_bookmark[playername]] + local write = { ["bkmrkname"] = bkmrk.bkmrkname, + x = bkmrk.x, + y = bkmrk.y, + z = bkmrk.z} + --print("dump(write)="..dump(write)) + selected_cgpsmap[playername]:set_name("compassgps:cgpsmap_marked") + selected_cgpsmap[playername]:set_metadata(minetest.serialize(write)) + player:set_wielded_item(selected_cgpsmap[playername]) + end + end + end + if (formname == "compassgps:read") then + if not player then + return + end + if (fields["read"]) then + --print("***cgpsmap fields=read***") + local meta = minetest.deserialize(selected_cgpsmap[player:get_player_name()]:get_metadata()) + --print("dump(meta)="..dump(meta)) + local bkmrkname = fields["name"] + --print("bkmrkname from fields[name]="..bkmrkname) + local pos = { x = meta["x"] + 0, + y = meta["y"] + 0, + z = meta["z"] + 0 } + local playername = player:get_player_name() + --print(bkmrkname) + compassgps.set_bookmark(playername, bkmrkname, "P", pos) + end + end + + if (selected_cgpsmap == nil) then + return + end + local playername = player:get_player_name() + if (playername == nil) then + return + end + if (selected_cgpsmap[playername] == nil) then + return + end + if fields["rename"] then + local bkmrkname = fields["name"] + local meta = minetest.deserialize(selected_cgpsmap[player:get_player_name()]:get_metadata()) + if meta~=nil and bkmrkname~=nil then + local pos = { x = meta["x"] + 0, + y = meta["y"] + 0, + z = meta["z"] + 0 } + selected_cgpsmap[playername]:set_metadata(minetest.serialize({ ["bkmrkname"] = bkmrkname, + x = pos.x, + y = pos.y, + z = pos.z})) + player:set_wielded_item(selected_cgpsmap[playername]) --new name is saved in marked cpgsmap + end + end + end) diff --git a/mods/compassgps/depends.txt b/mods/compassgps/depends.txt new file mode 100644 index 00000000..9207dab8 --- /dev/null +++ b/mods/compassgps/depends.txt @@ -0,0 +1,2 @@ +default +intllib? diff --git a/mods/compassgps/init.lua b/mods/compassgps/init.lua new file mode 100644 index 00000000..09e2525b --- /dev/null +++ b/mods/compassgps/init.lua @@ -0,0 +1,1298 @@ +--compassgps 2.1 + +--This fork was written by Kilarin (Donald Hines) +--Original code by Echo, PilzAdam, and TeTpaAka is WTFPL. +--My changes are CC0 (No rights reserved) +--textures: original compass textures: CC BY-SA by Echo +-- compass b textures: CC BY-SA by Bas080 (slight modifications by Kilarin) +-- compass c textures: CC BY-SA by Andre Goble mailto:spootonium@gmail.com +-- (slight modifications by Kilarin) + +--fixed bug that caused compass to jump around in inventory +--fixed bug causing removed bookmarks not to be saved +--expanded bookmark list from dropdown to textlist +--added pos and distance to display list +--added hud showing current pos -> target pos : distance + +-- Boilerplate to support localized strings if intllib mod is installed. +local S +if (minetest.get_modpath("intllib")) then + S = intllib.Getter() +else + S = function ( s ) return s end +end + +local hud_default_x=0.4 +local hud_default_y=0.01 +local hud_default_color="FFFF00" +local compass_default_type="a" +local compass_valid_types={"a","b","c"} +local activewidth=8 --until I can find some way to get it from minetest +local max_shared=10 --how many shared bookmarks a user with shared_bookmarks priv can make. +local show_shared_on_singleplayer=false --show shared and admin checkboxes on singleplayer +--the ONLY reason to change this variable to true is for testing. shared and admin bookmarks +--make no sense in a single player game. + +minetest.register_privilege("shared_bookmarks", + S("Can create shared bookmarks for use by anyone with a compassgps")) +--minetest.register_privilege("shared_bookmarks", { +-- description = "Can create shared bookmarks for use by anyone with a compassgps", +-- give_to_singleplayer = false,}) + +compassgps = { } +local player_hud = { }; +local bookmarks = { } +local point_to = {} +local sort_function = {} +local distance_function ={} +local hud_pos = {} +local hud_color = {} +local compass_type = {} +local view_type_P = {} +local view_type_S = {} +local view_type_A = {} +local textlist_clicked = {} +textlist_bkmrks = {} +local singleplayer = false +local target = {} +local pos = {} +local dir = 90 +local default_bookmark = {} +local backwardscompatsave = "NO" + + +print(S("compassgps reading bookmarks")) +local file = io.open(minetest.get_worldpath().."/bookmarks", "r") +if file then + bookmarks = minetest.deserialize(file:read("*all")) + file:close() +end + +--local remove + + +--the sort functions and distance functions have to be defined ABOVE the +--"main" block or will be nil + +function compassgps.sort_by_distance(table,a,b,player) + --print("sort_by_distance a="..compassgps.pos_to_string(table[a]).." b="..pos_to_string(table[b])) + local playerpos = player:getpos() + local name=player:get_player_name() + --return compassgps.distance3d(playerpos,table[a]) < compassgps.distance3d(playerpos,table[b]) + if distance_function[name] then + return distance_function[name](playerpos,table[a]) < + distance_function[name](playerpos,table[b]) + else + return false --this should NEVER happen + end +end --sort_by_distance + +function compassgps.sort_by_name(table,a,b,player) + local atype="P" --default to P + if table[a].type then atype=table[a].type end + local btype="P" + if table[b].type then btype=table[b].type end + if atype == btype then + local aplayer="" + if table[a].player then aplayer=table[a].player end + local bplayer="" + if table[b].player then bplayer=table[b].player end + if aplayer == bplayer then + return a < b --compare on bookmark name + else + return aplayer < bplayer --compare on player name + end --compare player name + else + return atype < btype --compare on bookmark type + end -- compare type +end --sort_by_name + + +function compassgps.distance2d(pos1in,pos2in) +local pos1=compassgps.round_digits_vector(pos1in,0) +local pos2=compassgps.round_digits_vector(pos2in,0) +return math.sqrt((pos2.x-pos1.x)^2+(pos2.z-pos1.z)^2) +end --distance2d + + +--calculate distance between two points +function compassgps.distance3d(pos1in,pos2in) +--round to nearest node +--print(" pos1in="..compassgps.pos_to_string(pos1in).." pos2in="..compassgps.pos_to_string(pos2in)) +local pos1=compassgps.round_digits_vector(pos1in,0) +local pos2=compassgps.round_digits_vector(pos2in,0) +return math.sqrt((pos2.x-pos1.x)^2+(pos2.z-pos1.z)^2+(pos2.y-pos1.y)^2) +end --distance3d + + + +-- ********************************************************** +print(S("compassgps reading settings")) +if minetest.is_singleplayer() and show_shared_on_singleplayer==false then + singleplayer=true +else + singleplayer=false +end + +local settings = { } +local file = io.open(minetest.get_worldpath().."/compassgps_settings", "r") +if file then + settings = minetest.deserialize(file:read("*all")) + file:close() +end +--now transfer these to the correct variables +for name,stng in pairs(settings) do + --if settings[name].point_name then + -- point_name[name]=settings[name].point_name + --end + if settings[name].point_to and settings[name].point_to.bkmrkname then + point_to[name]=settings[name].point_to + else + point_to[name]=nil + end + if settings[name].sort_function then + if settings[name].sort_function == "name" then + sort_function[name]=compassgps.sort_by_name + else + sort_function[name]=compassgps.sort_by_distance + end + end + if settings[name].distance_function then + if settings[name].distance_function == "2d" then + distance_function[name]=compassgps.distance2d + else + distance_function[name]=compassgps.distance3d + end + end + if settings[name].hud_pos then + hud_pos[name]=settings[name].hud_pos + end + if settings[name].hud_color then + hud_color[name]=settings[name].hud_color + end + if settings[name].compass_type then + compass_type[name]=settings[name].compass_type + end + --saved as strings so its easier to check for nil + if settings[name].view_type_P then + view_type_P[name]=settings[name].view_type_P + else + view_type_P[name]="true" + end --view_type_P + if settings[name].view_type_S then + view_type_S[name]=settings[name].view_type_S + else + view_type_S[name]="false" + end --view_type_S + if settings[name].view_type_A then + view_type_A[name]=settings[name].view_type_A + else + view_type_A[name]="false" + end --view_type_A + + if singleplayer then + view_type_P[name]="true" + view_type_A[name]="false" + view_type_S[name]="false" + end--override view types + +end --for + + +function compassgps.bookmark_to_string(bkmrk) + if not bkmrk then return "{nil}" end + local str="{" + if bkmrk.player then str=str..bkmrk.player + else str=str.."player=nil" end + str=str.." : " + if bkmrk.bkmrkname then str=str..bkmrk.bkmrkname + else str=str.."bkmrkname=nil" end + str=str.." : "..compassgps.pos_to_string(bkmrk).." : " + if bkmrk.type then str=str..bkmrk.type + else str=str.."type=nil" end + str=str.."}" + return str + end -- bookmark_to_string + + +function compassgps.bookmark_name_string(bkmrk) + --print("bookmark_name_string: "..compassgps.bookmark_to_string(bkmrk)) + if bkmrk.type=="A" then + return "*admin*:"..bkmrk.player.."> "..bkmrk.bkmrkname + elseif bkmrk.type=="S" then + return "*shared*:"..bkmrk.player.."> "..bkmrk.bkmrkname + else + return bkmrk.bkmrkname + end +end --bookmark_name_string + + +function compassgps.bookmark_name_pos_dist(bkmrk,playername,playerpos) + if distance_function[playername] == nil then + return "" + end + return compassgps.bookmark_name_string(bkmrk).." : "..compassgps.pos_to_string(bkmrk).. + " : "..compassgps.round_digits(distance_function[playername](playerpos,bkmrk),2) +end --gookmark_name_pos_dist + + +function compassgps.count_shared(playername) + local c=0 + for k,v in pairs(bookmarks) do + if v.player and v.player==playername and v.type and v.type=="S" then + c=c+1 + end --if + end --for + return c +end--count_shared + + + +--********************************************************* +--mode "L" create list for displaying bookmarks in gui +--mode "C" display private bookmarks only in chat +--mode "M" similar to "L" but with current position (for maps) +function compassgps.bookmark_loop(mode,playername,findidx) + --print("bookmark_loop top") + local player = minetest.get_player_by_name(playername) + local playerpos = player:getpos() + local list="" + local bkmrkidx=1 + local i=1 + if mode=="L" or mode=="M" then + local spawnbkmrk=compassgps.get_default_bookmark(playername,1) + textlist_bkmrks[playername]={} + if mode=="M" then + local cpos=compassgps.round_pos(playerpos) + list = S("current position : ")..compassgps.pos_to_string({x=cpos.x,y=cpos.y,z=cpos.z,player=playername,type="P",bkmrkname=playername.."'s map"})..",".. + compassgps.bookmark_name_pos_dist(spawnbkmrk,playername,playerpos) + textlist_bkmrks[playername][1]={x=cpos.x,y=cpos.y,z=cpos.z,player=playername,type="P",bkmrkname=S("%s's map"):format(playername)} + textlist_bkmrks[playername][2]=spawnbkmrk + i=2 + mode="L" + else + list = compassgps.bookmark_name_pos_dist(spawnbkmrk,playername,playerpos) + textlist_bkmrks[playername][1]=spawnbkmrk + end --initialize list + + --add all spawn position from beds mod, sethome mod and the default spawn point + spawnbkmrk=compassgps.get_default_bookmark(playername,2) + if spawnbkmrk~=nil then + i=i+1 + list = list..","..compassgps.bookmark_name_pos_dist(spawnbkmrk,playername,playerpos) + textlist_bkmrks[playername][i]=spawnbkmrk + end + spawnbkmrk=compassgps.get_default_bookmark(playername,3) + if spawnbkmrk~=nil then + i=i+1 + list = list..","..compassgps.bookmark_name_pos_dist(spawnbkmrk,playername,playerpos) + textlist_bkmrks[playername][i]=spawnbkmrk + end + textlist_clicked[playername]=1 + end + + --bkmrkidx will be used to highlight the currently selected item in the list + backwardscompatsave="NO" + + for k,v in spairs(bookmarks,sort_function[playername],player) do + --backwards compatibility + --since version 1.5, all bookmarks will have a player and type, but + --bookmarks from the old compass mods and previous versions of this + --mod will not. Because the original mod did not put a seperator between + --the playername and the bookmark name, the only way to seperate them + --is when you have the player name. this if says that if v.player is + --not defined and the begining of the bookmark matches the playername + --then set v.player and v.type and set a flag to save the bookmarks + --print("bookmark_loop unmod "..compassgps.bookmark_to_string(v)) + if not v.player then --if playername is not set, fix it + local pos1, pos2 = string.find(k, playername, 0) + if pos1==1 and pos2 then --add playername and type to bookmark + v.player=playername + v.type="P" + v.bkmrkname=string.sub(k,string.len(v.player)+1) + backwardscompatsave="YES" + end --if pos1==1 + end --if not v.player backwards compatibility + + --even though we set v.player above, that was for bookmarks that match + --this playername, so there could still be other players bookmarks that + --do not have v.player defined, thats why we have to check it again. + local vplayernm="" + if v.player then vplayernm=v.player end + local vtype="P" + if v.type then vtype=v.type end + local vbkmrkname=k + if v.bkmrkname then vbkmrkname=v.bkmrkname end + --now vplayernm,vtype,vbkmrkname are guaranteed to be defined + + --admin and shared bookmarks + if (mode=="L") and + ( (vtype=="A" and view_type_A[playername]=="true") or + (vtype=="S" and view_type_S[playername]=="true") ) then + i=i+1 + list = list..","..compassgps.bookmark_name_pos_dist(v,playername,playerpos) + textlist_bkmrks[playername][i]=v + --print("bookmark_loop AS "..i.." "..compassgps.bookmark_to_string(textlist_bkmrks[playername][i])) + --private bookmarks + elseif vtype=="P" and vplayernm==playername and view_type_P[playername]=="true" then + i=i+1 + if mode=="L" then + list = list..","..compassgps.bookmark_name_pos_dist(v,playername,playerpos) + --list = list..","..vbkmrkname.." : "..compassgps.pos_to_string(v).. + -- " : "..compassgps.round_digits(distance_function[playername](playerpos,v),2) + textlist_bkmrks[playername][i]=v + --print("bookmark_loop P "..i.." "..compassgps.bookmark_to_string(textlist_bkmrks[playername][i])) + elseif mode=="C" then + --minetest.chat_send_player(playername, vbkmrkname..": "..compassgps.pos_to_string(v)) + minetest.chat_send_player(playername, compassgps.bookmark_name_pos_dist(v,playername,playerpos)) + end + end --if vtype + + --print("bookmark_loop mode="..mode.." bkmrkidx="..bkmrkidx.." vbkmkrname="..vbkmrkname.." point_to="..point_to[playername].bkmrkname.." vplayer="..vplayer.." point_to="..point_to[playername].player) + --set testlist_clicked to the currently selected item in the list + if point_to[playername]~=nil then -- don't crash when point_to[playername] is nil + if mode=="L" and bkmrkidx==1 and vbkmrkname==point_to[playername].bkmrkname + and vplayernm==point_to[playername].player then + bkmrkidx=i + textlist_clicked[playername]=i + --point_to is the bookmark this player's compass is already pointing to + --when we open the list, if we found a bookmark that matches that item, we want + --to highlight it (by setting bkmrkidx to the index to highlight) and we want + --to set textlist_clicked to match that item. We need textlist_clicked because + --textlist does not return the currently selected item when you click a button, + --so we must keep the currently selected item in memory + --elseif mode=="I" and i==findidx then + -- return bkmrkname --found the item we were looking for, we are done. + end --if mode=L + end --for spairs + end --point_to[playername]~=nil + + if backwardscompatsave=="YES" then compassgps.write_bookmarks() end + + if mode=="L" then + return list,bkmrkidx + --elseif mode=="I" then + -- return "default" --didn't find it, so return default. + end --if mode=="L" + +end --bookmark_loop + + + + + + +function compassgps.get_confirm_formspec(playername,bkmrkidx) + --print("get_confirm_remove_formspec") + local player = minetest.get_player_by_name(playername) + if not compassgps.verify_bookmark_parms("remove_bookmark",player,playername,bkmrkidx) + then return end + local bkmrk=textlist_bkmrks[playername][bkmrkidx] + + return "compassgps:confirm_remove", "size[8,2;]".. + "label[0,0.2;"..S("Remove bookmark: ")..compassgps.bookmark_name_string(bkmrk).." ?]".. + "button[0,0.7;4,1;confirm_remove_yes;"..S("Yes").."]".. + "button[4,0.7;4,1;confirm_remove_no;"..S("No").."]" +end + + +function compassgps.check_view_type_all_blank(playername) + --view_type values are not all set when you first bring up the form + --so we check to ensure that view_type_A and S are default false for sp and true for mp + --and that if all values are false we set view_type_P to true + local defaultvalue="true" + if singleplayer then + defaultvalue="false" + end + if (not view_type_A[playername]) then + view_type_A[playername]=defaultvalue + end + if (not view_type_S[playername]) then + view_type_S[playername]=defaultvalue + end + if (not view_type_P[playername]) + or (view_type_P[playername]=="false" and view_type_S[playername]=="false" + and view_type_A[playername]=="false") then + view_type_P[playername]="true" + end +end --check_view_type_all_blank + + + +minetest.register_on_player_receive_fields(function(player,formname,fields) + if (not player) then + return false; + end + + local playername = player:get_player_name(); + if (playername ~= "" and formname == "compassgps:bookmarks") then + --"bookmark" field is set EVERY time. I would like to detect someone hitting + --enter in that field, but the problem is, if someone types something into + --the bookmark field, and then clicks on a bookmark in the textlist, + --I would get back bookmark as set. So, the only way to detect that + --enter has been hit in the bookmark field is to check bookmark, and ensure + --every other field is NOT set. + --this leaves open the possibility of someone typing in the hudx or hudy + --field and hitting enter after typing in the bookmark field. Not likely + if (fields["new_bookmark"] and fields["bookmark"]) --hit the bookmark button + or ( (fields["bookmark"]) and (fields["bookmark"]~="") --bookmark field not blank + and (not fields["remove_bookmark"]) and (not fields["find_bookmark"]) + and (not fields["bookmark_list"]) and (not fields["sort_type"]) + and (not fields["distance_type"]) and (not fields["settings"]) + and (not fields["teleport"]) and (not fields["show_private"]) + and (not fields["show_shared"]) and (not fields["show_admin"]) + ) + then + local type="P" + if fields["new_shared_bookmark"] then + type="S" + elseif fields["new_admin_bookmark"] then + type="A" + end --shared or admin + compassgps.set_bookmark(playername, fields["bookmark"],type) + minetest.show_formspec(playername, compassgps.get_compassgps_formspec(playername)) + elseif fields["remove_bookmark"] and textlist_clicked[playername] then + local bkmrkidx=textlist_clicked[playername] + if textlist_bkmrks[playername][bkmrkidx].player ~= playername then + --only admins can delete someone elses shared bookmark + --check to see if the player has "privs" privliges + local player_privs + player_privs = minetest.get_player_privs(playername) + if not player_privs["privs"] then + minetest.chat_send_player(playername,S("you can not remove someone elses bookmark:").. + compassgps.bookmark_name_string(textlist_bkmrks[playername][bkmrkidx])) + return + end --if not player_privs + end -- if player~=playername + + -- you can't remove default bookmarks (bed, home, spawnpoint) + if textlist_bkmrks[playername][bkmrkidx].bkmrkname==nil or textlist_bkmrks[playername][bkmrkidx].player==nil then + return + end + if bookmarks[textlist_bkmrks[playername][bkmrkidx].player..textlist_bkmrks[playername][bkmrkidx].bkmrkname]==nil then + return + end + + --if they got here, they have authority to del the bookmark, show confirm dialog + minetest.show_formspec(playername, compassgps.get_confirm_formspec(playername, bkmrkidx)) + elseif fields["find_bookmark"] and textlist_clicked[playername] then + --print("compassgps.fields find_bookmark triggered, playername="..playername.." textlist_clicked="..textlist_clicked[playername]) + compassgps.find_bookmark(playername,textlist_clicked[playername]) + elseif fields["bookmark_list"] then + local idx=tonumber(string.sub(fields["bookmark_list"],5)) + --textlist_clicked[playername]=compassgps.bookmark_from_idx(playername,idx) + --textlist_clicked[playername]=compassgps.bookmark_loop("I",playername,idx) + textlist_clicked[playername]=idx + --print("bookmark_list triggered textlist idx="..idx.." tlc="..textlist_clicked[playername]) + elseif fields["sort_type"] then + local idx=tonumber(string.sub(fields["sort_type"],5)) + if idx==1 then + sort_function[playername]=compassgps.sort_by_name + else + sort_function[playername]=compassgps.sort_by_distance + end --if name else distance + minetest.show_formspec(playername, compassgps.get_compassgps_formspec(playername)) + elseif fields["distance_type"] then + local idx=tonumber(string.sub(fields["distance_type"],5)) + if idx==1 then + distance_function[playername]=compassgps.distance3d + else + distance_function[playername]=compassgps.distance2d + end --if 2d else 3d + minetest.show_formspec(playername, compassgps.get_compassgps_formspec(playername)) + elseif fields["show_private"] then + view_type_P[playername]=tostring(fields["show_private"]) + compassgps.check_view_type_all_blank(playername) + minetest.show_formspec(playername, compassgps.get_compassgps_formspec(playername)) + elseif fields["show_shared"] then + view_type_S[playername]=tostring(fields["show_shared"]) + compassgps.check_view_type_all_blank(playername) + minetest.show_formspec(playername, compassgps.get_compassgps_formspec(playername)) + elseif fields["show_admin"] then + view_type_A[playername]=tostring(fields["show_admin"]) + compassgps.check_view_type_all_blank(playername) + minetest.show_formspec(playername, compassgps.get_compassgps_formspec(playername)) + elseif fields["teleport"] then + -- Teleport player. + compassgps.teleport_bookmark(playername, textlist_clicked[playername]) + elseif fields["settings"] then + --bring up settings screen + minetest.show_formspec(playername, compassgps.get_settings_formspec(playername)) + end --compassgps formspec + elseif (playername ~= "" and formname == "compassgps:settings") then + if fields["hud_pos"] then --and fields["hudx"] and fields["hudy"] then + --minetest.chat_send_all("hud_pos triggered") + if tonumber(fields["hudx"]) and tonumber(fields["hudy"]) then + hud_pos[playername].x=fields["hudx"] + hud_pos[playername].y=fields["hudy"] + if tonumber(hud_pos[playername].x)<0 or tonumber(hud_pos[playername].x)>1 + or tonumber(hud_pos[playername].y)<0 or tonumber(hud_pos[playername].y)>1 then + minetest.chat_send_player(playername,S("compassgps: hud coords out of range, hud will not be displayed. Change to between 0 and 1 to restore")) + --compassgps.write_settings() --no need to save until you quit + end + else --not numbers + minetest.chat_send_player(playername,S("compassgps: hud coords are not numeric. Change to between 0 and 1")) + end --if x,y valid + if tonumber(fields["hudcolor"],16) then + hud_color[playername]=fields["hudcolor"] + else + minetest.chat_send_player(playername,S("compassgps: hud color not valid hex number")) + end --if color valid + elseif fields["compass_type_a"] then + compass_type[playername]="a" + elseif fields["compass_type_b"] then + compass_type[playername]="b" + elseif fields["compass_type_c"] then + compass_type[playername]="c" + end --if fields["hud_pos"] + elseif (playername ~= "" and formname == "compassgps:confirm_remove") then + if fields["confirm_remove_yes"] then + compassgps.remove_bookmark(playername, textlist_clicked[playername]) + minetest.show_formspec(playername, compassgps.get_compassgps_formspec(playername)) + elseif fields["confirm_remove_no"] then + minetest.show_formspec(playername, compassgps.get_compassgps_formspec(playername)) + end -- if fields["confirm_remove_yes"] + end -- form if +end) + + +--saves the bookmark list in minetest/words//bookmarks +function compassgps.write_bookmarks() + local file = io.open(minetest.get_worldpath().."/bookmarks", "w") + if file then + file:write(minetest.serialize(bookmarks)) + file:close() + end +end --write_bookmarks + + +--saves the settings in minetest/words//compassgps_settings +function compassgps.write_settings() + --loop through players and set settings + --(less error prone than trying to keep settings in sync all the time + print(S("compassgps writing settings")) + local players = minetest.get_connected_players() + for i,player in ipairs(players) do + local name = player:get_player_name(); + local sort_short="name" + --if you save the actual sort_function or distance_function, it saves the + --whole function in the serialized file! not what I wanted, and doesn't work right. + if sort_function[name] and sort_function[name]==compassgps.sort_by_distance then + sort_short="distance" + end + local dist_short="2d" + if distance_function[name] and distance_function[name]==compassgps.distance3d then + dist_short="3d" + end + settings[name]={point_to=point_to[name], + hud_pos=hud_pos[name], + sort_function=sort_short, + distance_function=dist_short, + hud_color=hud_color[name], + compass_type=compass_type[name], + view_type_P=view_type_P[name], + view_type_S=view_type_S[name], + view_type_A=view_type_A[name]} + end + --now write to file + local file = io.open(minetest.get_worldpath().."/compassgps_settings", "w") + if file then + file:write(minetest.serialize(settings)) + file:close() + end +end --write_settings + + +minetest.register_on_leaveplayer(function(player) + compassgps.write_settings() + end) + +minetest.register_on_shutdown(compassgps.write_settings) + + +function compassgps.clean_string(str) + --remove dangerous characters that will mess up the list of bookmarks + --the file can handle these fine, but the LIST for the textlist + --will interpret these as seperators + str=string.gsub(str,",",".") + str=string.gsub(str,";",".") + str=string.gsub(str,"%[","(") + str=string.gsub(str,"%]",")") + return str +end --clean_string + + + +function compassgps.set_bookmark(playername, bkmrkname, type, predefinedpos) + local player = minetest.get_player_by_name(playername) + if not player then + return + end + + local pos = player:getpos() + if predefinedpos ~= nil then + pos = predefinedpos + end + --we are marking a NODE, no need to keep all those fractions + pos=compassgps.round_pos(pos) + + bkmrkname=compassgps.clean_string(bkmrkname) + + if bkmrkname == "" then + minetest.chat_send_player(playername, S("Give the bookmark a name.")) + return + end + if bkmrkname == "default" or bkmrkname == "bed" or bkmrkname == "sethome" + or string.sub(bkmrkname,1,8) == "*shared*" + or string.sub(bkmrkname,1,7)=="*admin*" then + minetest.chat_send_player(playername, S("A bookmark with the name '%s' can't be created."):format(bkmrkname)) + return + end + if bookmarks[playername..bkmrkname] then + minetest.chat_send_player(playername, S("You already have a bookmark with that name.")) + return + end + + pos.type=type or "P" --Private Shared Admin + + if pos.type=="S" and compassgps.count_shared(playername) >= max_shared then + minetest.chat_send_player(playername, S("The maximum number of shared bookmarks any user can create is %d."):format(max_shared)) + return + end + + pos.bkmrkname=bkmrkname + pos.player=playername + + bookmarks[playername..bkmrkname] = pos + + compassgps.write_bookmarks() + minetest.chat_send_player(playername, S("Bookmark '%s' added at %s type=%s"):format(bkmrkname, compassgps.pos_to_string(pos), pos.type)) +end + + +minetest.register_chatcommand("set_bookmark", { + params = "", + description = S("set_bookmark: Sets a location bookmark for the player"), + func = function (playername, bkmrkname) + compassgps.set_bookmark(playername, bkmrkname, "P") + end, +}) + + + +--returns a pos that is rounded special case. round 0 digits for X and Z, +--round 1 digit for Y +function compassgps.round_pos(pos) + pos.x=compassgps.round_digits(pos.x,0) + pos.y=compassgps.round_digits(pos.y,1) + pos.z=compassgps.round_digits(pos.z,0) + return pos +end --round_pos + + + +function compassgps.round_digits(num,digits) + if num >= 0 then return math.floor(num*(10^digits)+0.5)/(10^digits) + else return math.ceil(num*(10^digits)-0.5)/(10^digits) + end +end --round_digits + +function compassgps.round_digits_vector(vec,digits) + return {x=compassgps.round_digits(vec.x,digits),y=compassgps.round_digits(vec.y,digits), + z=compassgps.round_digits(vec.z,digits)} +end --round_digits_vector + + +--because built in pos_to_string doesn't handle nil, and commas mess up textlist +--this rounds same rules as for setting bookmark or teleporting +--that way what you see in the hud matches where you teleport or bookmark +function compassgps.pos_to_string(pos) + if pos==nil then return "(nil)" + else + pos=compassgps.round_pos(pos) + return "("..pos.x.." "..pos.y.." "..pos.z..")" + end --pos==nill +end --pos_to_string + + + +minetest.register_chatcommand("list_bookmarks", { + params = "", + description = S("list_bookmarks: Lists all bookmarks of a player"), + func = function(name, param) + compassgps.bookmark_loop("C",name) + end, +}) + + +function compassgps.verify_bookmark_parms(from_function,player,playername,bkmrkidx) + --just being paranoid, probably none of these checks are necessary + if not player then + print(S("compassgps.%s player not found"):format(from_function)) + if not playername then print(S(" playername=nil")) + else print(S(" playername=%s"):format(playername)) + end --if not playername + return false + end --if not player + if not tonumber(bkmrkidx) then + print(S("compassgps.%s invalid bkrmkidx"):format(from_funtion)) + if not bkmrkidx then print(S(" bkmrkidx=nil")) + else print(" bkmrkidx="..bkmrkidx) + end --if not bkmrkidx + return false + end --if not tonumber(bkmrkidx) + if not textlist_bkmrks[playername][bkmrkidx] then + print(S("compassgps.%s invalid bookmark playername=%s bkmrkid=%s"):format(from_function, playername, bkmrkidx)) + minetest.chat_send_player(playername,S("compassgps:%s invalid bookmark"):format(from_function)) + return false + end --if not textlist_bkmrks + return true --if you got here it is all good +end --verify_bookmark_parms + + + +function compassgps.remove_bookmark(playername, bkmrkidx) + local player = minetest.get_player_by_name(playername) + if not compassgps.verify_bookmark_parms("remove_bookmark",player,playername,bkmrkidx) + then return end + + + + print(S("remove bookmark playername=%s bkmrkidx=%s"):format(playername, bkmrkidx)) + minetest.chat_send_player(playername, S("removed %s"):format( + compassgps.bookmark_name_string(textlist_bkmrks[playername][bkmrkidx]))) + bookmarks[textlist_bkmrks[playername][bkmrkidx].player.. + textlist_bkmrks[playername][bkmrkidx].bkmrkname] = nil + compassgps.write_bookmarks() +end --remove_bookmarks + + + +function compassgps.remove_bookmark_byname(playername, bkmrkname) + local player = minetest.get_player_by_name(playername) + if not player then + return + end + if bkmrkname == "" then + minetest.chat_send_player(name, S("No bookmark was specified.")) + return + end + if not bookmarks[playername..bkmrkname] then + minetest.chat_send_player(playername, S("You have no bookmark with this name.")) + return + end + bookmarks[playername..bkmrkname] = nil + compassgps.write_bookmarks() + minetest.chat_send_player(playername, S("The bookmark "..bkmrkname.." has been successfully removed.")) +end + + + +minetest.register_chatcommand("remove_bookmark", { + params = "", + description = S("Removes the bookmark specified by "), + func = function(name, bkmrkname) + compassgps.remove_bookmark_byname(name,bkmrkname) + end, +}) + + +function compassgps.teleport_bookmark(playername, bkmrkidx) + local player = minetest.get_player_by_name(playername) + if not compassgps.verify_bookmark_parms("teleport_bookmark",player,playername,bkmrkidx) + then return end + print(S("compassgps teleporting player %s to %s"):format(playername, + compassgps.bookmark_name_string(textlist_bkmrks[playername][bkmrkidx]))) + minetest.chat_send_player(playername, S("Teleporting to %s"):format( + compassgps.bookmark_name_string(textlist_bkmrks[playername][bkmrkidx]))) + player:setpos(textlist_bkmrks[playername][bkmrkidx]) +end --teleport_bookmark + + + +function compassgps.find_bookmark_byname(playername, bkmrkname) + local player = minetest.get_player_by_name(playername) + if not player then + return + end + if not bkmrkname or bkmrkname == "" then + minetest.chat_send_player(playername, S("No bookmark was specified.")) + return + end + if bkmrkname == "default" then + minetest.chat_send_player(playername, S("Pointing at default location.")) + point_to[playername] = compassgps.get_default_bookmark(playername,1) + return + end + if not bookmarks[playername..bkmrkname] then + minetest.chat_send_player(playername, S("You have no bookmark with this name.")) + return + end + point_to[playername] = bookmarks[playername..bkmrkname] + minetest.chat_send_player(playername, S("Pointing at %s."):format(bkmrkname)) +end + + + +function compassgps.find_bookmark(playername, bkmrkidx) + local player = minetest.get_player_by_name(playername) + if not compassgps.verify_bookmark_parms("find_bookmark",player,playername,bkmrkidx) + then return end + point_to[playername] = textlist_bkmrks[playername][bkmrkidx] + minetest.chat_send_player(playername, S("Pointing at %s."):format(point_to[playername].bkmrkname)) +end + + +minetest.register_chatcommand("find_bookmark", { + params = "", + description = S("Lets the compassgps point to the bookmark"), + func = function(playername, bkmrkname) + compassgps.find_bookmark_byname(playername,bkmrkname) + end, +}) + + + + + +-- compassgps mod + + + + +-- default to static spawnpoint +local static_spawnpoint = minetest.setting_get_pos("static_spawnpoint") +-- default to 0/0/0 if spawnpoint is not present or invalid +local default_spawn = static_spawnpoint or {x=0, y=0, z=0} + +local last_time_spawns_read = "default" +local beds_spawns = {} +local sethome_spawns = {} +function read_spawns() + -- read BlockMen beds-mod positions (added to default minetest game) + local beds_file = io.open(minetest.get_worldpath().."/beds_spawns", "r") + if beds_file then + while true do + local x = beds_file:read("*n") + if x == nil then + break + end + local y = beds_file:read("*n") + local z = beds_file:read("*n") + local name = beds_file:read("*l") + beds_spawns[name:sub(2)] = {x = x, y = y, z = z} + end + io.close(beds_file) + else + -- read PilzAdams beds-mod positions + beds_file = io.open(minetest.get_worldpath().."/beds_player_spawns", "r") + if beds_file then + beds_spawns = minetest.deserialize(beds_file:read("*all")) + beds_file:close() + end + end + + -- read sethome-mod positions + if minetest.get_modpath('sethome') then + local sethome_file = io.open(minetest.get_modpath('sethome')..'/homes', "r") + if sethome_file then + while true do + local x = sethome_file:read("*n") + if x == nil then + break + end + local y = sethome_file:read("*n") + local z = sethome_file:read("*n") + local name = sethome_file:read("*l") + sethome_spawns[name:sub(2)] = {x = x, y = y, z = z} + end + io.close(sethome_file) + end + end +end + + +function compassgps.compass_type_name(playername,imagenum,ctypein) + local ctype="a" + if ctypein then + ctype=ctypein + end + if playername~="" and compass_type[playername] then + ctype=compass_type[playername] + end + if ctype=="a" then + ctype="" + end + --print("compass type name return "..ctype..imagenum) + return ctype..imagenum +end + + +function compassgps.get_default_bookmark(name,num) + -- try to get position from beds-mod spawn + local pos = beds_spawns[name] + local posname="bed" + if pos~=nil and num==1 then + default_bookmark={x=pos.x,y=pos.y,z=pos.z,player=name,type="P",bkmrkname=posname} + return default_bookmark + elseif pos~=nil then + num=num-1 + end + -- fallback to sethome position + pos = sethome_spawns[name] + posname="home" + if pos~=nil and num==1 then + default_bookmark={x=pos.x,y=pos.y,z=pos.z,player=name,type="P",bkmrkname=posname} + return default_bookmark + elseif pos~=nil then + num=num-1 + end + if num>1 then + return + end + + -- fallback to default + pos = default_spawn; + posname="spawn" + default_bookmark={x=pos.x,y=pos.y,z=pos.z,player=name,type="P",bkmrkname=posname} + return default_bookmark +end --get_default_bookmark + +function compassgps.get_default_pos_and_name(name) + -- try to get position from PilzAdams bed-mod spawn + local pos = beds_spawns[name] + local posname="bed" + -- fallback to sethome position + if pos == nil then + pos = sethome_spawns[name] + posname="sethome" + end + -- fallback to default + if pos == nil then + pos = default_spawn; + posname="default" + end +default_bookmark={x=pos.x,y=pos.y,z=pos.z,player=name,type="P"} +return pos,posname +end --get_compassgps_target_pos + + + + +minetest.register_globalstep(function(dtime) + if last_time_spawns_read ~= os.date("%M") then + last_time_spawns_read = os.date("%M") + read_spawns() + end + local players = minetest.get_connected_players() + for i,player in ipairs(players) do + local playername = player:get_player_name(); + + local gotacompass=false + local wielded=false + local activeinv=nil + local stackidx=0 + --first check to see if the user has a compass, because if they don't + --there is no reason to waste time calculating bookmarks or spawnpoints. + local wielded_item = player:get_wielded_item():get_name() + if string.sub(wielded_item, 0, 11) == "compassgps:" and string.sub(wielded_item, 0, 18) ~= "compassgps:cgpsmap" then + --if the player is wielding a compass, change the wielded image + wielded=true + stackidx=player:get_wield_index() + gotacompass=true + else + --check to see if compass is in active inventory + if player:get_inventory() then + --is there a way to only check the activewidth items instead of entire list? + --problem being that arrays are not sorted in lua + for i,stack in ipairs(player:get_inventory():get_list("main")) do + if i<=activewidth and string.sub(stack:get_name(), 0, 11) == "compassgps:" and string.sub(stack:get_name(),0,18) ~= "compassgps:cgpsmap" then + activeinv=stack --store the stack so we can update it later with new image + stackidx=i --store the index so we can add image at correct location + gotacompass=true + break + end --if i<=activewidth + end --for loop + end -- get_inventory + end --if wielded else + + + --dont mess with the rest of this if they don't have a compass + if gotacompass then + --if they don't have a bookmark set, use the default + point_to[playername]=point_to[playername] or compassgps.get_default_bookmark(playername,1) + target=point_to[playername] --just to take up less space + pos = player:getpos() + dir = player:get_look_yaw() + local angle_north = math.deg(math.atan2(target.x - pos.x, target.z - pos.z)) + if angle_north < 0 then angle_north = angle_north + 360 end + local angle_dir = 90 - math.deg(dir) + local angle_relative = (angle_north - angle_dir) % 360 + local compass_image = math.floor((angle_relative/30) + 0.5)%12 + + + --update compass image to point at target + if wielded then + player:set_wielded_item("compassgps:".. + compassgps.compass_type_name(playername,compass_image)) + elseif activeinv then + --player:get_inventory():remove_item("main", activeinv:get_name()) + player:get_inventory():set_stack("main",stackidx,"compassgps:".. + compassgps.compass_type_name(playername,compass_image)) + end --if wielded elsif activin + + + --update the hud with playerpos -> target pos : distance to target + distance_function[playername]=distance_function[playername] or compassgps.distance3d + --if distance_function[playername]==nil then + -- distance_function[playername]=compassgps.distance3d + --end + + + local hudx=tonumber(hud_default_x) + local hudy=tonumber(hud_default_y) + if hud_pos[playername] then + hudx=tonumber(hud_pos[playername].x) + hudy=tonumber(hud_pos[playername].y) + else + hud_pos[playername]={x=hud_default_x, y=hud_default_y} + end + + local hudcolor=tonumber(hud_default_color, 16) + if hud_color[playername] then + hudcolor=tonumber(hud_color[playername], 16) + else + hud_color[playername]=hud_default_color + end + + local compasstype=compass_default_type + if compass_type[playername] and + (compass_type[playername]=="a" or compass_type[playername]=="b" or compass_type[playername]=="c") then + compasstype=compass_type[playername] + else + compass_type[playername]=compass_default_type + end + + local h=nil + if hudx>=0 and hudx<=1 and hudy>=0 and hudy<=1 then + h = player:hud_add({ + hud_elem_type = "text"; + position = {x=hudx, y=hudy}; + text = compassgps.pos_to_string(pos).." -> ".. + compassgps.bookmark_name_pos_dist(target,playername,pos); + --text = compassgps.pos_to_string(pos).." -> "..target.bkmrkname.. + -- " "..compassgps.pos_to_string(target).." : ".. + -- compassgps.round_digits(distance_function[playername](pos,target),2); + number = hudcolor; + scale = 20; + }); + end --if x and y in range + if (player_hud[playername]) then + --remove the previous element + player:hud_remove(player_hud[playername]); + end + player_hud[playername] = h; --store this element for removal next time + --this elseif is triggered if gotacompass=false + elseif (player_hud[playername]) then --remove the hud if player no longer has compass + player:hud_remove(player_hud[playername]); + player_hud[playername]=nil + end --if gotacompass + end --for i,player in ipairs(players) +end) -- register_globalstep + + + + + + + + + +function compassgps.sort_by_coords(table,a,b) + if table[a].x==table[b].x then + if table[a].z==table[b].z then + return table[a].y = Entfernt den Wegpunkt der mit angegeben ist. +Settings = Einstellungen +Shared = Geteilt +Show: = Zeige: +Sort by: = Sortiere nach: +Teleporting to %s = Teleportiere zu %s +The bookmark = Der Wegpunkt +The maximum number of shared bookmarks any user can create is %d. = Jeder Nutzer kann nur %d geteilte Wegpunkte erstellen. +Yes = Ja +You already have a bookmark with that name. = Sie haben bereits einen Wegpunkt mit diesem Namen. +You have no bookmark with this name. = Sie haben keinen Wegpunkt mit diesem Namen. +bookmark = Wegpunkt +compassgps reading bookmarks = compassgps liest die Wegpunkte. +compassgps reading settings = compassgps liest die Einstellungen. +compassgps = Kompass +compassgps teleporting player %s to %s = compassgps teleportiert Spieler %s nach %s. +compassgps writing settings = compassgps schreibt die Einstellungen. +compassgps.%s invalid bkrmkidx = compassgps.%s ungültige bkmrkidx. +compassgps.%s invalid bookmark playername\=%s bkmrkid\=%s = compassgps.%s ungültiger Wegpunkt Spielername\=%s bkmrkidx\=%s. +compassgps.%s player not found = compassgps.%s Spieler nicht gefunden. +compassgps: hud color not valid hex number = compassgps: HUD Farbe ist keine zulässige Hexadezimalzahl. +compassgps: hud coords are not numeric. Change to between 0 and 1 = compassgps: HUD Koordinaten sind keine Zahlen. Ändern sie diese zu Werten zwischen 0 und 1. +compassgps: hud coords out of range, hud will not be displayed. Change to between 0 and 1 to restore = compassgps: HUD Koordinaten sind außerhalb des zulässigen Bereichs. Ändern sie diese zu Werten zwischen 0 und 1 um das HUD wiederherzustellen. +compassgps:%s invalid bookmark = compassgps.%s ungültiger Wegpunkt +create admin = Erstelle Administratorwegpunkt +create bookmark = Erstelle Wegpunkt +create shared = Erstelle geteilten Wegpunkt +current position : = Momentane Position : +distance = Entfernung +find selected bookmark = Finde den ausgewählten Wegpunkt +list_bookmarks: Lists all bookmarks of a player = list_bookmarks: Zeigt alle Wegpunkte eines Spielers. +name = Name +remove bookmark = Entferne den Wegpunkt +remove bookmark playername\=%s bkmrkidx\=%s = Entferne den Wegpunkt Spielername\=%s bkmrkidx\=%s +removed %s = %s entfernt. +set_bookmark: Sets a location bookmark for the player = set_bookmark: Setzt einen Wegpunkt für den Spieler. +teleport to bookmark = Teleportiere zu dem Wegpunkt. +you can not remove someone elses bookmark: = Sie können den Wegpunkt eines anderen Spielers nicht entfernen: +CompassGPS Map (blank) = CompassGPS Karte (leer) +CompassGPS Map (marked) = CompassGPS Karte (markiert) +Write to cgpsmap = Schreibe auf die Karte +copy bookmark to your compassgps = Kopiere den Wegpunkt in ihren Kompass. +bookmark name: = Name des Wegpunkts: +bookmark pos: = Position des Wegpunkts: diff --git a/mods/compassgps/locale/template.txt b/mods/compassgps/locale/template.txt new file mode 100644 index 00000000..20af3180 --- /dev/null +++ b/mods/compassgps/locale/template.txt @@ -0,0 +1,63 @@ + bkmrkidx\=nil = + playername\=%s = + playername\=nil = +%s's map = +A bookmark with the name '%s' can't be created. = +Admin = +Bookmark '%s' added at %s type\=%s = +Change hud: = +Color: = +Dist: = +Compass Type: = +Give the bookmark a name. = +Lets the compassgps point to the bookmark = +No = +No bookmark was specified. = +Pointing at %s. = +Pointing at default location. = +Private = +Remove bookmark: = +Removes the bookmark specified by = +Settings = +Shared = +Show: = +Sort by: = +Teleporting to %s = +The bookmark = +The maximum number of shared bookmarks any user can create is %d. = +Yes = +You already have a bookmark with that name. = +You have no bookmark with this name. = +bookmark = +compassgps reading bookmarks = +compassgps reading settings = +compassgps = +compassgps teleporting player %s to %s = +compassgps writing settings = +compassgps.%s invalid bkrmkidx = +compassgps.%s invalid bookmark playername\=%s bkmrkid\=%s = +compassgps.%s player not found = +compassgps: hud color not valid hex number = +compassgps: hud coords are not numeric. Change to between 0 and 1 = +compassgps: hud coords out of range, hud will not be displayed. Change to between 0 and 1 to restore = +compassgps:%s invalid bookmark = +create admin = +create bookmark = +create shared = +current position : = +distance = +find selected bookmark = +list_bookmarks: Lists all bookmarks of a player = +name = +remove bookmark = +remove bookmark playername\=%s bkmrkidx\=%s = +removed %s = +set_bookmark: Sets a location bookmark for the player = +teleport to bookmark = +you can not remove someone elses bookmark: = +CompassGPS Map (blank) = +CompassGPS Map (marked) = +Write to cgpsmap = +copy bookmark to your compassgps = +bookmark name: = +bookmark pos: = diff --git a/mods/compassgps/textures/cgpsmap-blank.png b/mods/compassgps/textures/cgpsmap-blank.png new file mode 100644 index 0000000000000000000000000000000000000000..f3289f346b9c912268c9c1c766d7b51977d3988d GIT binary patch literal 359 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHj>wqkxnu*ZIAhfkIzAT^vI!PA{Ek$aTm;!1X^r+s5re zIW`@wbJY!6GX#DXXoX+ zIR14;Svqbiaurm}WmR!KSFOOg$z}8GyPgyFuC_ zYWn#{m4}DnCx?n_S@suqV}=81hJlIO_BOHieLLBfdw|Wgg_YlAhnGcs_}1uf{Ri!W ze++`s^`6%Uec%h*9`J76GdZ@pkc5QIVZ7%=XT1A*PT=L&Wm3=E1*@7hFPSWTz003J x=jHUbpO&sR{8nJY$dF_4edVjp#}Z0G7Uk=@X6r`jEd_-fgQu&X%Q~loCIDUDiq!xB literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/cgpsmap-marked.png b/mods/compassgps/textures/cgpsmap-marked.png new file mode 100644 index 0000000000000000000000000000000000000000..a4bfd7c7a7647e8e691d69357e8783914617fcfd GIT binary patch literal 399 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHj>=E4KhomU50W0|TRsr;B5V#p$J!484vxh_wB$H$3qz zj62ij;5>&2YyX6Qt7NMw^>>o1h^f04sG_hm!c+V`k-0y zaPq$Tf8YHzlz#Zj_DHLwYj<(Hv{KOg^pD3R^16l9%YDAr-p;j~uFY^DiD~!M6y`4_ zx94^X7wkOr`0i4D14bXlBc9v)g%dV!J1)Y;V9n$?QS0cBwL5IPM1Jg7c&Pw$NpE%KY=rYfpSLxqen4faa*wb>-`~UtI>2lxymo4}l z_Ok!Od&w7j7T%k~BXTXB_u#e0dvz6iTz~%*gTe~DWM4fLpY>T literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_0.png b/mods/compassgps/textures/compass_0.png new file mode 100644 index 0000000000000000000000000000000000000000..bb33a804229d0197d74b962f8efee1213b0febf0 GIT binary patch literal 485 zcmVr~{@v~s~_wPT$x353`A3Jjj>>VbME%pw21U18e zUw|cpuD&8TtiT3<0xY*MfGEu{keTDhz{buBW;2P32`~r?^O0nLrj{IogoGf(0AXQX zk~D(=8ygFQpddsa)4TUya4I~1bp}@PU%&n^ynFW`=i1_gS3u9H; zJcbj;uH)6bWzz|U$rCm(z!DJ%z!~UyK}AK1fr*(39AGzZJO<~5t5+T}pyvgQ+(l|` bq!<7IXXUb)Yh6?j00000NkvXXu0mjfcXH4U literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_1.png b/mods/compassgps/textures/compass_1.png new file mode 100644 index 0000000000000000000000000000000000000000..f7646828721c46921521d5c31f2ac05156959112 GIT binary patch literal 492 zcmVf;>OWEYum2 zQ#~2f)Mdcp|Nj1CxO(*=!?ekp7<^Hn(*pF&G)EV%2DI?=SKMRI`|Nb+4`}*Vmu`{Q@ zhA@HrZ112)P%{kp1z0lZ>MMf73Tyxkq@bcb_2!yn6AT;qBW` zB)Q=FwMPsuU%rRB0BF+W{tYA{Ai&7000SaNLh0L01m_e01m_fl`9S#00004XF*Lt006O%3;baP0004kNkl1OJ7Dcp3NvxEc6(IT=2D_{#7Rgg<@-$uS};ym0Lz0}HZ%fFRF*GYfTw z@1VzEWUR_S4DbuE zWYE=D1cw#a08oJC76yPN4Yf0fG9)v{kAaPy72*O>F#!f)VLmYD{M8v?LkJn9sU^oC zAt4B6vj_|GqDX=aL3Ry{j||w@SQrEaA^KR}z5jyM7Hk?};McD|4Da53hIrxCi}ws~ z-+m&>?=W!v+9QUSFW*B90GTwoe*;MdOrNre;n&aK5Cedi@!)|=4Cl_?CQ9?B4aXTS zU%U@uGQtdC`0)MK{003bvnjqWy_0a$T002ovPDHLkV1lV~%eVjl literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_11.png b/mods/compassgps/textures/compass_11.png new file mode 100644 index 0000000000000000000000000000000000000000..2cf7fc039966e911ecc3dd8d0e56861f6918fbac GIT binary patch literal 499 zcmVH?J47k9S zO(z&8_N`~wbMO!&iVHwCw{;~k7#XXA1r4<`7|vgvfnk7;p9RCefBzZ2ef{zO*qKvc zLzqB*ws+8jYX$+3W{@G+fM0+mgRZ_JIIO@1fC4PHFo1y+keTDhz{buBW;2P32`~r? z^I<5$=L$_NIR*&{L5Kmu!n`Ee4gzd!EDVBz5PeMV-haWV5L-Zkz^`9_7~Z}63^Cx< zi}ws~-+m&=1=p`VVtD!TJ=6t2lP33XAjyE~Q#LXD`uQ7T04RALJaCEO+}YbiY2LKq zIK$1OJ7Dcp3NvxEc6(IT=2D_{#7Rgg<@-$uS};ym0Lz0}HZ%fFRF*GYfTw z@1VzEWUR_S4DbuE zWYE=D1cw#a08oJC76uTd*-$$JOlRi!F|e_-g4ryhVgd}p!hA$&Jb!ftnAX&iV~~&# zgcu+!%uBRJ7+_;#VGtCA=wo^J{tHe6&^5xquU~%{-o5(_3B*?~-ZQ*?`-!M9fPw4R z9x=Rp`5s~b$fU{r8%Q!>`jkx!zkdFP7y!hK2M=6gICu6oQJObxIL>hS;(ZX45oQ3x zhxcC?tIFmvoH%wJuVzq6oIGIz!?$lg;mMg1IWr;W1r-%31}0`EaDd&s@femD7?AS< gC@C{inj0ww01f1qBI31NB>(^b07*qoM6N<$g7k;QQ2+n{ literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_3.png b/mods/compassgps/textures/compass_3.png new file mode 100644 index 0000000000000000000000000000000000000000..3b07e41f54a6b70521f294aa48e7be775f2c8ee4 GIT binary patch literal 487 zcmVH?J47k9S zO(z&8_N`~wbMO!&iVHwCw{;~k7#XWF-~&E>77YLX{b%_0^~e8XXHJ0)VFLNt-a(I` zW*G1buw>BHR|JO@*Z@#~27nY|1HXR#VR-lMGsFw8Uc6^``}Pw_Ubuek z5yQ)u?;!?&Oq$%kfg}T_Puaxq>*sHX0ifi0@W3U8b7yZ8rFqka;|!NC-iIe^CJ^!A z{TIfnvUvH?J47k9S zO(z&8_N`~wbMO!&iVHwCw{;~k7#XWF-~&E>77YLX{b%_0^~e8XXHJ0)VFLNt-a(I` zW*G1buw>BHR|JO@*Z@#~Y zEX<2jp`msL7^4F=HWmg!L5Mzsr)*;Q_47Bx08sKgc;FJlxwE&4GGx<+ z;|!NC-iIe^CJ^!A{TIfnvUvH?J47k9S zO(z&8_N`~wbMO!&iVHwCw{;~k7#XWF-~&E>77YLX{b%_0^~e8XXHJ0)VFLNt-a(I` zW*G1buw>BHR|JO@*Z@#~Y zEX<2jp`msLR&h2q76w5K|tP0Oxoq^RA z*RMTdc=_@@)CEA3Ciib3$pzD=Y-0HJ^Ebo*Q1U!@;1a{Rv$u(I#ik9%87^PE4^P%i zAmYROFN{@X^B7JXyN=Tk5CEmb$rCm(z!DJ%z!~UyK}AK1fr*(39AGzZJO<~5t5+T} iV9g82fYjVbF#rHq`k@k3d;rh@0000|_`K!-000SaNLh0L01m_e01m_fl`9S#00004XF*Lt006O%3;baP0004VNklH?J47k9S zO(z&8_N`~wbMO!&iVHwCw{;~k7#XWF-~&E>77YLX{b%_0^~e8XXHJ0)VFLNt-a(I` zW*G1buw>BHR|JO@*Z@#~Y zEX<2jp`msLR&h2q76w5K|k_@S-~hXM<1sidT)py;0c&1B2BhXj aiU9x$MVQu+7Y7jl0000H?J47k9S zO(z&8_N`~wbMO!&iVHwCw{;~k7#XWF-~&E>77YLX{b%_0^~e8XXHJ0)VFLNt-a(I` zW*G1buw>BHR|JO@*Z@#~Y zEX<2jp`msLR&h2q76w5K|thS%OIs>Z# z*RMTdc=_@@)CEA3Ciib3$pzD=Y-0HJ^Ebo*Q1U!@;1a{Rv$u(|eba{H43{t7hbL<$ z5b@#t7sjfxc?>6xT?Z?|r5ThGCr{YG082z50B4}*1r-%31}0`EaDd&s@fe&Ju3mY_ ifHf~515$G%#Q*@H`k@kY8vc0z00001OJ7Dcp3NvxEc6(IT=2D_{#7Rgg<@-$uS};ym0Lz0}HZ%fFRF*GYfTw z@1VzEWUR_S4DbuE zWYE=D1cw#a08oJC76uTd83r^yeAqD_3M9xgec|k=*ih+rl2^?TIZ#;(O l1qS5207}Y?l;%c?0RSM(m>7t^7@7b8002ovPDHLkV1mx^$b0|* literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_9.png b/mods/compassgps/textures/compass_9.png new file mode 100644 index 0000000000000000000000000000000000000000..5243b798e648e91d35f31fa34832dbe00a0e8764 GIT binary patch literal 487 zcmV1OJ7Dcp3NvxEc6(IT=2D_{#7Rgg<@-$uS};ym0Lz0}HZ%fFRF*GYfTw z@1VzEWUR_S4DbuE zWYE=D1cw#a08oJC76uTd83r0}2 z)Xu=F`25uw7-DQ}EDVBz5PdA~-haWV5EuCM>kq@bcb_3%c=h5v!`ru?Nb_^MZPx#24YJ`L;x@VMgX!28XzkG000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^r9 z7bP~L=7^{O000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}0004_NkljvT=E48ijmc(do7^tL8j&)uhvHFZ?PD zd_=2Wk;KdZt{!eI7{{^SJz(v(9hLC3Rv-*~m0f>su?&r-g?F4P!88i$ORmvd8o)Jr zl=Qqhnq*eqq4N@|{|``d-eNl+qdBmhae}(*vK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new file mode 100644 index 0000000000000000000000000000000000000000..b990fc2a24b07362bcb28ef1501d0576826cf719 GIT binary patch literal 526 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPggKHbya39l<$je}F=gC9V-A&iT2y zsd*&~&PAz-C8;S2<(VZJ3hti10pX2&;y|l1JzX3_EKVmUED$hIDz-8@`#)RLbFoIm z&gWLnJG#}Ff#C4gYX66iL@)arEt1%<()xuxNbIlpe1n{y|K1vdR50&)Shw`GL}bF8 z-}-ijHUGcOeE7y%a!1pI3knw1XJ3`_q~CYEVP+)%@R5(fv7gfV5*9lv9tstjzc&zP#Zm7sTZ~w=pMj%+YZeg2a;?J5k_KBSuvwTj+8yf(@oL!%$Jp5$a5&kgF z;L3yq5SXyR#UdK0P=wjWQr+l8dt7owq0FP!rPk|}c^WJ`B^GELWKTcL+tB)d?n2Lu4^P)Px#24YJ`L;x@VMgX!28XzkG000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^r9 z7bh(mwIjv=000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}0004&NklJF0mWC1#${zcWxbtubFxC-uvdwH}8q5p>9;Xy?+2uu9X$p67pO^>u9c0 z?SdW)7X|Dc-!L}V2|(J&sV)H^4%dghWPq$`5rpg500hYap{WV3W0T59JbPr+Bj;d0 zNh<%fk4IkoCrI|p<10NKA@~mJoqtBJ(7nLLE}iA2l^<1UmxkpDbCEHjx{k%A1xjJ^ z_MV;gR?e<`EwsMwFs@@$QCR~(XkfTx^27Kv(cLXZuG5&OfhXv(a8ThNi0*EA`<76x zPau_*tNZPkn0q3z(NvO5y-Z6RIj?+xlk+5Zn>D{CAM7WINBns0(y##K@9XPmYuE;g zg*dV#`KYo#~h57XT9H;@3WqkbU4fwh*f`{ZfNMuw1ptRNe002ov JPDHLkV1j@k@`nHb literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_b3.png b/mods/compassgps/textures/compass_b3.png new file mode 100644 index 0000000000000000000000000000000000000000..16f547bbf56c3dd2fbcdb86546e703c60f90d134 GIT binary patch literal 575 zcmV-F0>J%=P)Px#24YJ`L;x@VMgX!28XzkG000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^r9 z7bp%tN=|zK000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}0004+NkldFZ2iLp!dEXA;Ir-&pqdR?m6dvk9e~(PZEFr{sUm#8%x<1 z_TIvKJ~x%L`_j*+0uD|tSzRgt5OlgpmjDnSwkwVd5Jo++Fj@hSO%4bzNibS*ab0kB zwdRs@blB$N`tH0~_~q^&8Lco{@%dZC#N@PdG@2X8vLy6d$g-r-+!(0JXoaXRm+WBr z0Jl$`4Fo5#+1%ps&meALVLp%1%DtX@Sz#2awF=Q`+=6GcLi%|(;dgt}zz_C!W(UYu zuir8W6zhIG#q2Mb;wxlX4y_>g8W4Wmjavvh-PG_towsR>NN{x6X0Z^*i~4dYRl)D4 z()|L!u~}zjqU8n%Fm?0Y@x}YK7givBfckR)Z^?+*X@PTN(3E+cTY|&$U`ChJR-Z!qmW&7fd5eAnoH3#k}3cI N002ovPDHLkV1gk!?KJ=Z literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_b4.png b/mods/compassgps/textures/compass_b4.png new file mode 100644 index 0000000000000000000000000000000000000000..812b78462a3f480384cc973e510d5530d73dc88b GIT binary patch literal 541 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPggKHbyaJhEln=Gl4>qC9V-A&iT2y zsd*&~&PAz-C8;S2<(VZJ3hti10pX2&;y|k^JY5_^EKZ*dHuPW$l=$b@6m%iS+G25$ z(d-t7McZ1;+MPSu*xi@63CJj^NcBX`xwT24(_*J$21k~dYT=6j_4OUy=A3gESj0Bp z`#di_*!%vM|MvHP-}_(xzW#vx!N|!mS~)C#nVfgj=Ox;2;$z4tGl@DM6Kd)9;GvTV zgM;d>x6>T=vop*P>tB|dcg`ndQSycN3-5gmbkfngv_t3QigNdleeY*qTj{XaSAgro zff*%}Y}4|%f3FX;{eEj#QG{o&86!gt@8oTU-{wpY*|IF7;`NIh_Js`m3=g)uu$Z%` z@Yx5R(ZAi2R4BN_NNVAiE3-Ie=+2x`dgF-H`-O(GiZ8@-^rAo38Az_adGW<$t2OHv z2+5{;&ePmb6@I|osCARd;g>}~v{~-Tl#i1t#0zKH9?naXyUm^H_N2@;;Y=FKnOyCC zeV?Y^5%B(~wwe8M+kG1?VMgIj-{xakOA}UB>*(;`jd-U2q+jV+e&1>rci)Q{%P(#@ d^DzDayPtQ1kMQ}{JYYmIc)I$ztaD0e0suUn*gpUO literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_b5.png b/mods/compassgps/textures/compass_b5.png new file mode 100644 index 0000000000000000000000000000000000000000..5d46b1bad5b2ccb68699c2e6afd5a8ce05386c69 GIT binary patch literal 525 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPggKHbyZO>+XaiCQho-U3d7N?UF76=$96xua>q1qF-hv#&~d((gOoFf)>W_{hiL*iUJF35%T-g4>Fg7-VE- zA1sV@<_!xsROFtw|6@}l5G-7`ux;U9rzSyjj4Up!jDl2lIr* zlQ}KL-tGT!WJB6ltG2iIKL?uFbojV*^7`q;RWuxqEqKLsC4{lA?eg43Jo9)tm_??Y zPp=S|d18Y{tfcCOjcQAdrb`qqW0q)G+WhC9ZAS|W^G3D*58wPg{#?29v*OA}&C4UE z>@nDQxSq4g!Q%7+&)FdXZzolqYCmLC`~44$rjF6*2UngEH@ B%&`Cf literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_b6.png b/mods/compassgps/textures/compass_b6.png new file mode 100644 index 0000000000000000000000000000000000000000..41027182baf3c0ea47d87316bc5b9135844771b9 GIT binary patch literal 537 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPggKHbyZGmWk~jyn#ZJC9V-A&iT2y zsd*&~&PAz-C8;S2<(VZJ3hti10pX2&;y|lPJY5_^EKZ-DZ0NxhC~>?#Tu@VVi)3ej zchxo%*9$MiEM}N=2DFDwUIhx_Ljw zmB;Sf@@4+Jz2EoW|Gn>jEqncxM=>(Fx?ir$)SUisS%9)^H^YMKzB~6 z|2%oQL70(Y)*K0-AbW|YuPggKHbyaJsg4?v$3P*;64!_l=ltB< z)VvY~=c3falGGH1^30M91$R&1fbd2>aiCRMo-U3d7N?UF76=$96xua>q1qF-hv#&~d((gOoFf)>W_^5#S-2IA!2`dy29$*L!xgOA* zbbGVvAD*B$pABPE_e#`HGns#m9i+fIMCTe#~$fOAtL z5I7z(>Tv9K=04hRR5&$o&(}v5N4UMqK!@#Gf@H z%zkBD3s}s$7&lzm_JgNoe?Z(U#V4;!r<63vJ>cFJ=P1F@Z#4OT!MDGUKTkaJb3(|+ zgTXppaWf*`e3B3ExL^OV^Wl}L%L}Ienz}AIMM8vu;m7xy)BTZd`oO4R@O1TaS?83{ F1OS<+)y)6^ literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_b8.png b/mods/compassgps/textures/compass_b8.png new file mode 100644 index 0000000000000000000000000000000000000000..27dc76649360bde5cb58579f59726d908ef93269 GIT binary patch literal 522 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPggKHbya32?LEwoaiCSHo-U3d7N?UF76=$96xua>q1qF-hv#&~d((gOoFf)>W_{hiL*iUJF35%T-4~3RJT`#$1 z%hm@w)-7aPy*gq7>-qZ?2M-)L+`mv_U8izu&VcC;PxqCnlCLh99Mnu60Nh|NztGLtWXVH)43>hA`d5?Z#Mthf06@8eI8M>QU+emu|=Q`Ps; zDf`){r(?E3SONGuGsfMJNEbq0}TcSE48|8f1^MDfw98i>FVdQ&MBb@06%5Y AcmMzZ literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_b9.png b/mods/compassgps/textures/compass_b9.png new file mode 100644 index 0000000000000000000000000000000000000000..970e53f966d3074422711838555f82c1b01ea35f GIT binary patch literal 552 zcmV+@0@wYCP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^t& z7AO__H_*8N000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}0004lNkl$k=5J*siG#W)jC^xhP zHimR04qc~{7skPxgig^ZuHkr3PsOFBZ+h?lzVG+m_vd@SAA=j-oE@y0LU7)e@KCN} zcWW5{pf+`;pIp6iHo#*}Gyy;(h7B;|;Lz<_+9*7dlsG5dXv9Fj*Fm-IV+qli2rZaL zpm~T=Q9`wC=^MUpmgAs{T7$sl_OOF=CIulRVB3|45E78iq-?kMdmTG~LTK@%pt`K+ zcyC&5u@+XAyZ`|2x;WMKXiNmDSS{Q=)dv9jBv&?vPXLSeg|Xtjqc6a*D?0lZk)*`oU&JrNC(j0000Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^t& z6CfEplhknl00~=3L_t(o!_AjjY~0lq#((#}%sw8^;@Lc7k0)d!i?R_yAP}-C0kv$U zAZXP}NL?OEk&vqPsgORSC#ZGL;_U!g}JllV{ zeQ+B2{T{Eb&iU?lj?Ve6;2YwZCw?mjKKu~NG`Tc93_xb-QdCW2&8AH}`oxps zo5Z{3%Xh9^A*D4(GT|T=)6rE326YrwFk7{dQZO}bFgDge3LpChPhV4P?dvYwy?&k4 zMTM0sB)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zkxn6{#4s(2`8?yJmpF3xU6%BD zn3<_ksi~eXjN(_1d@Kge&a-K4H)Eq0I5Tt(DQ(W5KE2>uG@VGghd{Io8?bDPR9}|N z;>8R7A_V?$gyfsQEvbc2qJgr89 z6GsPlec$V>S*%bh*CMG!P1{W&_i-7#|tI?e%f$ z#A)`uvJa1#;D!|e-XF60+kpXb&8GARcW#sq-nEMSjGO(3PSF_(a_eok;&Ez36G^a5 zqRAwM>1l$I2!-h!E}xIliKe-L>-;>DJn0Q+|4q0aO)&eh0QK$(815)SHY?RhcfC zw1tP4556nD)xY6?@$1JQl@pgnkkY1@p9UZjjU$9YDwE~+e|$y&3=R(JD_5>G__mPG l=RN$tpi-$Q*K&3(_&3#?IKo*D{ht5;002ovPDHLkV1l4!(2oEB literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_c1.png b/mods/compassgps/textures/compass_c1.png new file mode 100644 index 0000000000000000000000000000000000000000..74e2c58c753f57cadc52ceb5b758f0d705555702 GIT binary patch literal 2551 zcmVPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^t& z6CxtNu3y&x010dV6PlqW1^`#7q2dmtNU2dKg#g7LE?!7(MS}Dq);f5&t^$ppXBt5N!APmc<7P4 zC>9%-^`boXMpC@%5qx~CUvA$L;A$$*<)mb6>u&Ddw~y}bPJ*Ejs;1&{X$VEdGEMB3 zO|4ev##D-zj=jLuE2nw%;~!vXAi+<5bd-ZHUlO+s@Zi{h+;vZcSI?!%RAPMkbB{5$ zd5my8hEP>BA#i)WsEPuB-DJ{9eZzh7zCE41KAvHr+Qw%-|9LiU*@WgX2zcCh!y!~vMIb;*kkC-4QH~tNcjP3q zJGSE9zMtKDcjNK8_~}zm;YfJw@%t$+F3I0teDiG(>RUfPvT1|7cW0bp&Efo2i$^~B z2{vrrNFW@fr>_^U&x?>Y!m&X@%eIlaM)_OchNquJq~COwT|0uRWEw0z`rqojoy*pU!gM-hGUW4ik)o>FMi7R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kjvur2k0Fbp!<$KR82z&fubk~p@6C)fnvVE>{OCU zsYEI@!*jnqiqT3kJP_b7uh)6*uc!ZWAOV<2%|Gc!)2p){Y*8?ji-1o+slG5O)$E9vd+<;-}Fv*XkFd;vNV?fCqD z;_)br`Vv;lrjXB*$u5w~&f`~$4E1TCxHrfNy^Q=UzM^-jk=dC?wQJWld9ResX1)Bss8}p2xAX6I^bhGz8@tv$-IM?T N002ovPDHLkV1kR$_6`65 literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_c10.png b/mods/compassgps/textures/compass_c10.png new file mode 100644 index 0000000000000000000000000000000000000000..c4b3e13f7e2da2cad58eee24841f78e13fef8e3e GIT binary patch literal 2573 zcmV+o3i9=dP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^t& z6EO${`qz^H011srL_t(o!_Aj_Y@OwO$3M?|Iq$jJ=Vl-KIKC#a195_5An`&%NJxM* zYePGA@JFReMWX+qR!G$*ZCa=_snb?;>!u<^D-a#5gmh3!LLf~D7n3-S?Kr;2 zKKJ8ue0(nN?b#m|8HiO26MyXc-}CCH=l$sSd-Q$2kKl9aCnx?&j-Ee{W82J4P6E&~ zFo3FQ42_KN#EGZG=h^R;i;oR%m(p1y+3q2c(9u0L_Uu zq;xSWYt(BE8m7g}^en%9^(0f{7kT8X_b||x;GcealIPyOEN&U#Yr}o=;C&I!f4EF~ zEygz8x&Pj6 z{OE6A@n`XXEzEiKA%Q&G>Wc!Hj1SH1gfS{ zUM-PLtq=@{sg$eSfAlc^fWgy0{xPnE$G`mmAEP2!u9cSE}TBiww-s7=txq??eGtgSOQeuc5~7jVoPxGuI?r>}oA_Z@u*ui-&apsTMN>6q;Pqdh$Ir7!W^3ukF- z50i*}y5lzij_ukh@7v$QM^}r)TRYjZxrb0VOvjeZXg)8FSw)dxR_hefX+k~^SQgT; zajgaumq%&qOyc$Xuq_KA6ngr%qIq=o?%zu?*~QuOvmAb48^?C-l%D|z25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&F>Ns%d1G zSI~4HYt=fHwN+Z1+IahNq59&5?}t8C39C*3Aq+Nd2r@K0LOz>gVRnvaB1s?;!Sy7n z&tSE<%FsLS;;AZ%;m5KpcI?|rG@ih;Z8XEcab1L>VB0o@Y?k@y83r%DMeoKStE**- z6*c&YQvAx`J7Q>TodY}Dn46yD{m}`e^q3gAiR*bNnvRqZ42Ov|HBzqDK+`}`5UR$O zT>~u4&azf6qv-|+!PM9|p6f8bu*B5uQ3iU$y!qQZ_A7($i2w0#xLPwPmFt{1yoop8 zxX6w7Zcxe>n3tt6}xcKS?O2s0M<1l-B60=rg z_}UN`&R<~QK81XtLayx7|5raSHa-8mUynX_Xm<+Th%k6*n2yeN%*r~h>jHv6Foe)F z1OlNbAnraRu{hmZwxIcZEX~ieFf~oSu*%Q><2;5l&DQP+ufJR6+#6TL|LKU%UA!(r zAyxk6qdPGSA7_8^uben}96jKtyt+y@5+N846OKf19UE2CKq#2?8jj;KKQ%=l6lQv6 zf%CsOPf#qdds~dbn-=HZ92WO%O22w$pM2tx?POL1y!xA)#FGh*96dtN&}eQ=gXhqk zPLo|;CehePc6kMVIL!11GhBN6GUKBoY;3I1*B#^P82t3t*YC}g=JR=@p`pP9c=XsV z`KQNwXm4-l+DMM~M&<~GBDAEM35CNnHYTZ8Ygmp;A)jX@lO>l~Caf0e>(W5+bA1wi zadGI=+45X2rz|cm>N|GqFu!!_LD?9#dFWsl@pzoYtjXM+GP!(-m3$Qe#KSs4ze2^4KEax38 z5#;4xza>7?yW#Kkch5X67iOlA(j%8y2B5LI1tAnRbanIh|M(pNFfuZt_xJbPd{)Y2 lGC}^os8}p2_tJMS`fnI}Ei4Vd59j~@002ovPDHLkV1hOZ@@N16 literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_c2.png b/mods/compassgps/textures/compass_c2.png new file mode 100644 index 0000000000000000000000000000000000000000..431b687a9915060ac2af3394b687910315280704 GIT binary patch literal 2551 zcmVPx#24YJ`L;(K){{a7>y{D4^000Sa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b/mods/compassgps/textures/compass_c3.png new file mode 100644 index 0000000000000000000000000000000000000000..8ea342f78d606e90a36c7805851c9a0cd8c2ddf7 GIT binary patch literal 2536 zcmVP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^t& z6D1nh?QxC(010SGL_t(o!_AjjY~0lu#ees|%=(}4%y>NG8GD?ulh_F)Q5-^W0tq23 zB_NP+L{13Mzf*OWS~2(U(4eDv&Bwswx%HqDrJC0Rf>UOQCT|oy1uj9NV!S zd&Zu{Gak?K-)ce+$xK>JMnRLoSGO44h5RK|6s-RMJkWw(8vzVT4Acet!(KAk9b_l%Ce6a z-#H=vX99QhXXM89Ei_f<)P+R~^&maH8@XmjKk;OeSTu%2QYw`xE-Wy4ag57rLe+1RQNa9x|efdPzg7}v3JEDOhMAq2E1ItUtm6d{pP5^jqS3>j2PWm4T; zgpDBk_rFSaCc(yQJ8-M|zOlL7drBz(Ngx_FNp-jL=I{cy-?^8~*KI}!$=dbnQ5Avf zSO^?&OoWg`V=+?cG(N8f$1+i*i)&eUG>z=)RVcV@+kOLg-gOtxy>NuiRD@*v`xSqW zz}mnSNLN3ozp@_6CRL91w)wpo-6y-tzkmw$rct;YS*TW4% z+c+B*{1mIYFxdwgu(c0EqRq%bvu zkS>jC6-7!^)1f$X8O3qwzh(f4`BhcK(V2rBX>>%;$+le9SM_ z=u9Q4mP-VJ1~@KAiKZ&(x{ji0bPn{>KRC#fKlv$dyzmPEcQ7rku-hVq}!-w%@?;N`;2*ci9? zxP|(r?fAT2R_Z1mua4PjUQs|wsYwB*Wg#6G*Oi#2iK=Nx1VUAjQes&)uH)hl_%XsE z6d{lZ6ixr=QS0@B07doFp6tXI@Za`Ulf?Mvr2it6+ zX&PI$4_cy-IUH3jn*ShsrJlPkZH9N!HcOD`1?5}V` z0WJ<7XKATQDCnnUI`{*|6#_yCJC^96P%hDCD9p`Xrdp}cYBtbx4e2^Kj)QC4sM4W$ zX^M02oZzwVe~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@-@ z@J7y`K21HBrIcJ{Zh9I;5$LLl+ofS!2Dwy{6Tdo2wNfD%i!m}fg4^xm#!8i;p*Y`v z{(JJzw_tH@mhGc{mRCwdV{!Th`w50aD2l)_OqSP|OyR+*GZe?z%) zi+_3H$DI59ABe}}jBeh7rt6GOj1vsC;_-TjcO>ZQ>1HKWqAlhllS-}k0o%4crqMuC z1f_DFNHj`!e?O|GfNkP979(57z--dm8lc7P;@@6;34b7n=JAoOOJY46X;iN9#5cYU zE*DJ+(vdVx166mS>n>{5H9T%NYc&&>TgNmS>k3FIH7USsHj%c2<48=?1jj+j^-5P% zfugH;L#_B@aXel(j_n{3D4LGu^3tdjS-o}*qg=o->e$T&NC`*~5KXk>@wVXncl}B6 zp(1SY`l;1wxZGfv2DR!MO{PC~tpZp4mNRZy%PV{eolf%z_8-VdWdoY^@w%ug< z(q$rv1cLQ&jfR28?{=omdY(6ix)g<8Y;RsN4jY>8TK&958S}D>I@8Yeu^R=I! z{E6=)ov>!LAcUKNZZA`prpaZptW~PCb#|k>TaZXJkBf4t!UuB;NL5E^@nc$&m*;N) zke|Is>V+fN(nitT7!8YDI>++Tbt1Nyn!}yS&(|^3(eD%z`;(zr6#k!kPxxs;bpW*bIrwI7H437+Vrw@dRNzk8ohB+R}0@5SrZXzS<%$D*yXlT0#6I2I$5 zOyTkSS-N(eb8o%P+{`osu`0uZtxV3si*H=KGgF$&<=oL|)ByP6{oCZ@4{o5Rr-%2Z zvs{?IiO(0HJ<*2G?&bpm?~r0RMSv>XX^>Y&NT` ztgPr;wrnw;c=SFQ^EY{5cR!&}h?R`N&D&+Nxe}>d4FQDwI$n=Lz-n7J*|(8jWzkSkWQz){C`2AP*Cn< b?oRMuCND*x)Sj=c00000NkvXXu0mjfY!v~J literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_c6.png b/mods/compassgps/textures/compass_c6.png new file mode 100644 index 0000000000000000000000000000000000000000..cffa6c68449c5514cc3eb84435eba055c9cc2d19 GIT binary patch literal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0(;5wGRyqwVyolkcfJ99@(EF7!0zSZ?kl(N}*UGS8N~wL9ZRvCF66p@vCh#O=o%; zYKD(j&YYD#k+0eDM;{Pwn?|PFM{hEKqCm*!z_J9n;wH^Ti{-T{*`k3ashs-#o6;xx zH~c%k_uO~H%HljiSQOT?07N@FktCV!RE8h^#zXG}6I1;X*m}me1002ovPDHLkV1me}`&s}1 literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_c8.png b/mods/compassgps/textures/compass_c8.png new file mode 100644 index 0000000000000000000000000000000000000000..4f9860421e2705e584d3a5e6335e393f414257f8 GIT binary patch literal 2565 zcmV+g3i|blP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^t& z6E+H@wIFx^011UjL_t(o!_Ajjj9k^3$A9N8b*pRNx~uoDZrj~<+wL*ma2(q#Hj6RY z7-b+4nURJOXd-134~dkAn7m}9(P$JDB~qm10Ywl^#026PEI?st8;lL6joYTXvAf)h z%hlDjbyam$-COtGlZOrnM534x5A&Dq!?`;8&hISWcm7B4DfRf#AIXW+r*UkXtJBi} zq((+iHH~e1_VDeakBLtc?}j@c*|J$mr%HF1hh$PmS0NhJQB=W7#X(BJ^=ymz`36!1 zI6isthGJ`fufvyjY?rzyv1PMF*L*Byt4yU=Fm07e-9{*aXhaB7cr+ES-#}Ltqy!g@TD68FCDMhKBYFLmah`hOR~))!3kMHu zj8xQ>kw z8mJy3@d&OfDHThU3MCF6K7`M2@XMe66j#E-kK9RRr6K?L?&Xg`s2^>7apz6)_5%q@ zt1c5W7GHhfe)it74^>l1tzVDXY;f|#33~c^@CVv(EDKjU;5y&}ib5b9A`}TzT+Y$m z+e;|m=hqqbKFqcq+fX!>!Ql}U zp%72BbMFK96OKl4S{6tL*Rq&=^9(Z+6Evz-9NR`!RR%{kfa|dPb2oGMJ@@eB@5bru zija(de8oQmIC9gNymfzy^Y4{Nbo8-)U5Y?B%)o|qfQ@5YsH#RV9OmM=2^_Npwg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ZJ7rsFsc*@XqJFJ>5j^(4cCKFZ|^rJCydL@7Qt zenw18t+MB)9_G`RdGFE;Ez4wXdK$aYMD_S^1$ca3V#y@ch6TEgP&E|YVB^+pWEV0t z>kTwrM@pCU)HI5!u&{WY+4nE8Z8*SdZ(eI18$Todsvjsf3|1;l4((shYp=XYFyLck z<1nhK($&+0;nfiMNsVqsB5+*=gh2Bc%v_w}?blCnOAwx*}rW_0H)@$k9kz%=w15<@E8G} zJ8_b5B#PhfrM9wy*|4auHn6M~j^ki9np7(lYSmSQrjwqY#&uk#r?2ooPyP;%Jx*{EXsjf4&XC1I=Z^Swdv^YW;vTBnn zCX>;}#>UM1?!Hwf0xfRen<5g4kXbgFzg8h%SYfG9M*xw4j?b$QG)zK16U%BbwE$H+ z$TKgzCO(s=*_ZCvC)+fOq23_<-CWVYoy~IwS00000NkvXXu0mjfoA=$= literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compass_c9.png b/mods/compassgps/textures/compass_c9.png new file mode 100644 index 0000000000000000000000000000000000000000..6fbf03ccd7f9078a58226ba2a5d4954e67fe3be4 GIT binary patch literal 2530 zcmV<82_5!{P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^t& z6E6v-yx7_R010AAL_t(o!_AjjY+ThD$A9N8b7!|_@r=hyGIkti!7)h)Ngz8(fRMHj zXbUPxeL$jblnSZpTY(oUwX`CtXjQ3F#RE`E*#l)!Aqh*!>Lezylh{r?&e*ftGpBYk5^MD zRH>B<^6k@O;+nT$*UB!revOYa7jk?)CRw?5E4S>}K{((=#m3+4r94|A6m2D!$>Q|- zC>G~PXQp}otv#GMb%=X+tz%Jllt2A(56^vcQd~8_-7CB0mdybU97~d#4e`K(53zVj z54s|8xm~#3ZrmOxwMvDCW#esbrdqBsozJ5=4Cdx)oH%xp=b!y6+cx#Fb>m|G@Y{d# z-2N*euGoSdOXG6;wit&8Q)Egl{Pe*GS-z?tRTYFI5&TVlG){g0175V0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q_jDEdI(eg^$xZz=~}WBRnxJhWV%pba$FZyD)9J+P^WpY-@%nsNW&>5zKq%Cz6-?72 zF*=IN&)M_(9^7Jr8?S5PlT$W-e|JD!btrvc=W2Q1oy$m1yLjvUlQahdY}~XF zx1kYGd);a-L5<{*>WUgLH*UEb4CJ&=9=v-m$9-rMXcNjtpiwIyjEU3Rg%f1-rwI}yZiRdGVE<|%gu3`o0~~yYK&hjlFiMK%9Rm7 zvscIMRPY%!{O%g{dV`?^%$h!4eRrSuPOfHmZeK55TAl6=AM@IpP*n){9N4xbm7Akd zu9BE6GLH s_4PIQu9Qxv-Tc3(P$(!@^X_W&A5m@_u%7}&e*gdg07*qoM6N<$f{N?P3IG5A literal 0 HcmV?d00001 diff --git a/mods/compassgps/textures/compassgps_blank.png b/mods/compassgps/textures/compassgps_blank.png new file mode 100755 index 0000000000000000000000000000000000000000..1b1e662cd2dc511c2aa331c75f3d039fe9435830 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>rX+877l!}s{b%+Ad7K3vk;M!Q t+`=Ht$S`Y;1W=IM)5S4_<9c#J0+7SZz^HI_%5flz!PC{xWt~$(699>Q6fyt+ literal 0 HcmV?d00001 diff --git a/mods/worldedge/init.lua b/mods/worldedge/init.lua index 5e672dd7..7a7bf9bd 100644 --- a/mods/worldedge/init.lua +++ b/mods/worldedge/init.lua @@ -62,10 +62,10 @@ minetest.register_globalstep(function(dtime) if pos.z >= edge then newpos = {x = pos.x, y = 10, z = -newedge} - newpos.y = get_surface_pos(newpos).y + newpos.y = get_surface_pos(newpos).y+1 -- /MFF (Mg|19/05//15) elseif pos.z <= -edge then newpos = {x = pos.x, y = 10, z = newedge} - newpos.y = get_surface_pos(newpos).y + newpos.y = get_surface_pos(newpos).y+1 -- /MFF (Mg|19/05/15) end -- Teleport the player