diff options
-rw-r--r-- | init.lua | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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)) |