don't overwrite waypoints while setting
parent
448171c68c
commit
0d978fdf33
7
init.lua
7
init.lua
|
@ -327,6 +327,13 @@ minetest.register_chatcommand('wp_set', {
|
|||
func = safe(function(param)
|
||||
waypoints = load_waypoints()
|
||||
local point = minetest.localplayer:get_pos()
|
||||
if waypoints[param] then
|
||||
minetest.display_chat_message(
|
||||
('waypoint "%s" not saved: already set'):format(param)
|
||||
)
|
||||
return
|
||||
end
|
||||
|
||||
waypoints[param] = point
|
||||
mod_storage:set_string('waypoints', minetest.serialize(waypoints))
|
||||
|
||||
|
|
Loading…
Reference in New Issue