Improve features of teleportation

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Improve features of teleportation

by Sergey » Mon Jan 30, 2017 17:54

Provide assigning names to world's locations (hereinafter, place) and teleporting to them using that names. In this case you don't have to memorize numbers of coordinates of places you want teleport to.

There could be new command /map.

Syntax:
/map (pin|go) <name> [<x> <y> <z>]

Details:
  • pin — subcommand to work with places (map pins) setting and getting their absolute coordinates.
  • go — subcommand to teleport to places previously set (pinned on map) using pin subcommand.
  • <name> — name of place. It is standard identifier (regexp: ^[_a-z][_a-z0-9]*$).
  • <x> <y> <z> — world coordinates (absolute or relative depending on subcommand).

So, there are four variants of /map command:
  1. /map pin <name> — get absolute coordinates of place known by <name> identifier.
  2. /map pin <name> <x> <y> <z> — assign name to place specified by absolute coordinates x, y, z.
  3. /map go <name> — go to place, previously pinned by pin subcommand.
  4. /map go <name> <x> <y> <z> — go to place, previously pinned by pin subcommand, plus relative shift specified by (<x>,<y>,<z>) vector.

For all variants, except for the one of assigning name, show error message if <name> identifier was not used before.

Examples:
  • /map pin home 5 2 15 — assign the name home to the place specified by absolute coordinates (5, 2, 15).
  • /map pin home — get absolute coordinates of place known as home.
  • /map go home — go to place, previously specified as home.
  • /map go home 5 0 4 — go to place, previously specified as home, plus 5 meters to the East and 4 meters to the North.

In this case, there is no need for /sethome and /home commands. The same could be made using /map pin home 5 2 15 and /map go home commands.

Other examples (without explanations):
  • /map pin hill 35 2 50
  • /map pin deep_cave 25 -200 15
  • /map pin sandy_island 100 5 250
  • /map go hill
  • /map go deep_cave
  • /map go sandy_island
  • …and so on.

In case if you settle near the centre of the world, coordinates of your buildings/places could be something like (30, 5, 25). But imagine that you settle far away from the centre of the world. Let's say, you are at the edge of the world. And now you have to handle and memorize coordinates like (29738, 16, -25874). That's awful. To make things better and simplier all you need is to add relative coordinates to go subcommand. For example, command like /map go far_home 5 0 4 will move (teleport) you to the place known as far_home plus 5 meters to the East and 4 meters to the North. By default, these optional coordinates are (0, 0, 0) and you don't have to specify them.

How /map command could be implemented:
1) as extension of /teleport privilege;
2) as independent privilege with corresponding command (let /teleport privilege and its command work as is).
Last edited by Sergey on Mon Jan 30, 2017 23:54, edited 5 times in total.
 

User avatar
kaadmy
Member
 
Posts: 627
Joined: Thu Aug 27, 2015 23:07
GitHub: kaadmy
IRC: KaadmY
In-game: KaadmY kaadmy NeD

Re: Improve features of teleportation

by kaadmy » Mon Jan 30, 2017 23:42

Teleport is pretty overpowered in multiplayer anyway, even /home is usually removed.
Never paint white stripes on roads near Zebra crossings.
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 9 guests

cron