minor changes
parent
3300a0f9e9
commit
ca6edacfdc
19
README.md
19
README.md
|
@ -2,7 +2,7 @@
|
|||
|
||||
A transportation mod for sightseeing tours.
|
||||
|
||||
![TechPack](https://github.com/joe7575/airshuttle/blob/master/screenshot.png)
|
||||
![airshuttle](https://github.com/joe7575/airshuttle/blob/master/screenshot.png)
|
||||
|
||||
|
||||
## Instructions
|
||||
|
@ -18,18 +18,18 @@ The player has to have 'airshuttle' privs to be able to configure the flight rou
|
|||
|
||||
1. Place the launcher block at your preferred start position, the displayed number (ID) will be the flight number for this block.
|
||||
|
||||
2. Specify the waypoints with `add_waypoint <id> <number> <extra-height>`
|
||||
2. Specify the waypoints with `/add_waypoint <id> <number> <extra-height>`
|
||||
You can specify the altitude relative to your current position.
|
||||
`<id>` is the flight ID, `<number>` are the waypoints number from 1 .. 50
|
||||
`<extra-height>` should be something between 3..50 nodes
|
||||
Marker blocks appear at all waypoints, but disappear after a few minutes.
|
||||
|
||||
3. Deleting points again with `del_waypoint <id> <number>`
|
||||
3. Deleting points again with `/del_waypoint <id> <number>`
|
||||
There may also be gaps in the numbers.
|
||||
|
||||
4. With `del_route <id>` you can delete the route again. If you remove the launcher block, the route is gone too.
|
||||
4. With `/del_route <id>` you can delete the route again. If you remove the launcher block, the route is gone too.
|
||||
|
||||
5. With `show_route <id>` you can have your route displayed.
|
||||
5. With `/show_route <id>` you can have your route displayed.
|
||||
|
||||
5. When you right-click the launcher block, the air shuttle appears. After right-clicking the air shuttle
|
||||
the flight starts. The only possibility to abort the flight is to leave the game.
|
||||
|
@ -40,16 +40,16 @@ The player has to have 'airshuttle' privs to be able to configure the flight rou
|
|||
## Further hints
|
||||
|
||||
* The higher you fly, the faster you fly.
|
||||
* If the distance between to waypoints is greater than 400 nodes, the air shuttle we be teleported to the next waypoint.
|
||||
* If the distance between to waypoints is greater than 200 nodes, the air shuttle we be teleported to the next waypoint.
|
||||
This allows you to visit hotspots far away without spending too much time.
|
||||
* At the waypoints the plane slows down, especially with strong changes of direction.
|
||||
* There is no recipe so far, only the admin are players with creative privs can distribute launcher blocks to players.
|
||||
* There is no recipe so far, only the admin or players with creative privs can distribute launcher blocks to players.
|
||||
* Only one flight at the same time. The launcher is blocked in the meantime.
|
||||
|
||||
|
||||
|
||||
### License
|
||||
Copyright (C) 2018 Joachim Stolberg
|
||||
Copyright (C) 2018-2020 Joachim Stolberg
|
||||
Mod highly inspired by airboat from paramat and flying_carpet from Wuzzy
|
||||
Code: Licensed under the GNU LGPL version 2.1 or later. See LICENSE.txt
|
||||
Textures: CC BY-SA 3.0
|
||||
|
@ -62,4 +62,5 @@ Textures: CC BY-SA 3.0
|
|||
### History
|
||||
- 2018-09-26 v0.1 * first try
|
||||
- 2018-09-27 v0.2 * some improvements
|
||||
|
||||
- 2020-01-15 v0.3 * bugfix
|
||||
-
|
||||
|
|
|
@ -111,7 +111,8 @@ function AirshuttleEntity.on_rightclick(self, clicker)
|
|||
if not clicker or not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
if self.driver and clicker:get_player_name() == self.driver then --and landed(self) then
|
||||
local name = clicker:get_player_name()
|
||||
if self.driver and name == self.driver then --and landed(self) then
|
||||
detach_player(self, clicker)
|
||||
remove_airshuttle(self)
|
||||
elseif not self.driver then
|
||||
|
@ -130,7 +131,7 @@ function AirshuttleEntity.on_rightclick(self, clicker)
|
|||
end
|
||||
self.driver = clicker:get_player_name()
|
||||
clicker:set_attach(self.object, "",
|
||||
{x = 0, y = 6, z = 0}, {x = 0, y = 0, z = 0})
|
||||
{x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
|
||||
default.player_attached[name] = true
|
||||
minetest.after(0.2, function()
|
||||
default.player_set_animation(clicker, "stand" , 30)
|
||||
|
|
|
@ -16,8 +16,8 @@ local DBG = function(...) end
|
|||
|
||||
local MissingPlayer = {}
|
||||
|
||||
local MAX_DISTANCE = 1000 -- per hop
|
||||
local TELEPORT_DIST = 400
|
||||
local MAX_DISTANCE = 5000 -- per hop
|
||||
local TELEPORT_DIST = 200
|
||||
|
||||
-- Speed horizontal [m/s]
|
||||
local SH_MAX = 8
|
||||
|
@ -26,7 +26,7 @@ local SH_MIN = 0.1
|
|||
local SH_STEP = 0.5
|
||||
|
||||
-- Speed vertival [m/s]
|
||||
local SV_MAX = 2
|
||||
local SV_MAX = 4
|
||||
local SV_MIN = 0.1
|
||||
local SV_STEP = 0.2
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ local function add_waypoint(name, id, number, pos, height)
|
|||
if not AirRoutes[name][id] then
|
||||
AirRoutes[name][id] = array(MAX_NUM_WAYPOINTS, false)
|
||||
end
|
||||
local speed = range(height/2, 2, 8)
|
||||
local speed = range(height, 2, 8)
|
||||
pos.y = pos.y + height
|
||||
AirRoutes[name][id][number] = {waypoint = table.copy(pos), speed = speed}
|
||||
update_mod_storage()
|
||||
|
|
Loading…
Reference in New Issue