Now, it's not possible to set an Unknown Categorie, Buttonlabel Set changed to Set or change Categorie

master
= 2017-11-13 20:31:46 +01:00
parent 0eade161eb
commit 4d0b4fb864
3 changed files with 10 additions and 3 deletions

View File

@ -5,7 +5,7 @@ A Mod for Minetest.
![Screenshot 1](textures/minetest_poi_screenshot.jpg)
This Mod adds PoI's, Point's of Interest to your World.
If you have set a PoI, you can everytime jump back to the PoI with a simple Chatcommand.
If you have set a PoI, you can everytime jump back to the PoI with a simple Chatcommand or easy with the GUI.
### /poi_list [-a] [-f] [-c] [-i <Number>]
Lists Points of Interest.<br>
@ -62,7 +62,10 @@ poi:<br>
/poi_reload<br>
/poi_move [name]<br>
/poi_rename [name1], [name2]<br>
/poi_validate
/poi_validate<br><br>
With this Privileg, you have access to the grafical POI-Manager:
![Screenshot 2](textures/minetest_poi_manager.jpg)
## Install

View File

@ -172,6 +172,10 @@ function poi.set(name, poi_name)
p_name, categorie = poi.split_option(poi_name)
-- Check Categorie, if Unknown then set it to General
if categorie == 0 then categorie = 1
end
if poi.exist(p_name) then -- Ups, Name exists
if(poi.get_categorie(p_name) ~= categorie) then -- ok, we want to change the Categorie
if(categorie == -1) then -- Invalid Categoriename?
@ -382,7 +386,7 @@ function poi.gui(player_name, showup, main)
"button[4,2.5;2,1;reload;Reload]"..
"button[4,3.5;2,1;validate;Validate]"..
"field[0.3,5.4;7,1;managename; - enter name -;"..selected_point.."]"..
"button[0.4,6;6,1;set;Set]"..
"button[0.4,6;6,1;set;Set Point or change Categorie]"..
"button[0.4,7;2,1;rename;Rename]"..
"button[2.4,7;2,1;move;Move]"..
"image_button[5.4,7;1,1;minetest_poi_deleteme.png;delete;]"..

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB