Pod shell cheating bug fix
This commit is contained in:
parent
8fcb5b3cb3
commit
be7a843eb2
@ -390,7 +390,6 @@ minetest.register_node("hyperloop:elevator_bottom", {
|
|||||||
-- due to the missing display, a trip needś 20 sec maximum
|
-- due to the missing display, a trip needś 20 sec maximum
|
||||||
local seconds = math.min(1 + math.floor(dist/30), 20)
|
local seconds = math.min(1 + math.floor(dist/30), 20)
|
||||||
floor.busy = true
|
floor.busy = true
|
||||||
minetest.forceload_block(dest.pos)
|
|
||||||
door_command(floor.pos, floor.facedir, "close", true)
|
door_command(floor.pos, floor.facedir, "close", true)
|
||||||
door_command(dest.pos, dest.facedir, "close", true)
|
door_command(dest.pos, dest.facedir, "close", true)
|
||||||
minetest.after(1.0, on_travel, floor, dest, player, seconds)
|
minetest.after(1.0, on_travel, floor, dest, player, seconds)
|
||||||
|
7
init.lua
7
init.lua
@ -3,9 +3,9 @@
|
|||||||
Hyperloop Mod
|
Hyperloop Mod
|
||||||
=============
|
=============
|
||||||
|
|
||||||
v0.11 by JoSt
|
v0.12 by JoSt
|
||||||
|
|
||||||
Copyright (C) 2017 Joachim Stolberg
|
Copyright (C) 2017,2018 Joachim Stolberg
|
||||||
|
|
||||||
LGPLv2.1+
|
LGPLv2.1+
|
||||||
See LICENSE.txt for more information
|
See LICENSE.txt for more information
|
||||||
@ -22,6 +22,9 @@
|
|||||||
2017-07-31 v0.09 Some bug fixes on the Bocking Machine
|
2017-07-31 v0.09 Some bug fixes on the Bocking Machine
|
||||||
2017-08-01 v0.10 Elevator now with sound and travel animation plus minor bug fixes
|
2017-08-01 v0.10 Elevator now with sound and travel animation plus minor bug fixes
|
||||||
2017-08-06 v0.11 Crowbar now allows repairing of illegally detroyed tubes
|
2017-08-06 v0.11 Crowbar now allows repairing of illegally detroyed tubes
|
||||||
|
2018-03-27 v0.12 Some minor improvements with player position, arrival time,
|
||||||
|
Wifi node improvements, Podshell cheating bugfix,
|
||||||
|
forceload_block removed.
|
||||||
|
|
||||||
]]--
|
]]--
|
||||||
|
|
||||||
|
1
lcd.lua
1
lcd.lua
@ -79,7 +79,6 @@ local generate_line = function(s, ypos)
|
|||||||
file = charmap[s:sub(i, i + 1)]
|
file = charmap[s:sub(i, i + 1)]
|
||||||
i = i + 2
|
i = i + 2
|
||||||
else
|
else
|
||||||
print("[Hyperloop] W: LCD: unknown symbol in '"..s.."' at "..i)
|
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
if file ~= nil then
|
if file ~= nil then
|
||||||
|
6
seat.lua
6
seat.lua
@ -15,8 +15,6 @@ local function enter_display(tStation, text)
|
|||||||
-- determine position
|
-- determine position
|
||||||
if tStation ~= nil then
|
if tStation ~= nil then
|
||||||
local lcd_pos = hyperloop.new_pos(tStation.pos, tStation.facedir, "1F", 2)
|
local lcd_pos = hyperloop.new_pos(tStation.pos, tStation.facedir, "1F", 2)
|
||||||
-- load map
|
|
||||||
minetest.forceload_block(lcd_pos)
|
|
||||||
-- update display
|
-- update display
|
||||||
minetest.registered_nodes["hyperloop:lcd"].update(lcd_pos, text)
|
minetest.registered_nodes["hyperloop:lcd"].update(lcd_pos, text)
|
||||||
end
|
end
|
||||||
@ -101,7 +99,7 @@ local function display_timer(pos, elapsed)
|
|||||||
end
|
end
|
||||||
meta:set_int("arrival_time", atime)
|
meta:set_int("arrival_time", atime)
|
||||||
local text = meta:get_string("lcd_text")
|
local text = meta:get_string("lcd_text")
|
||||||
if atime > 5 then
|
if atime > 2 then
|
||||||
enter_display(tStation, text..atime.." sec")
|
enter_display(tStation, text..atime.." sec")
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
@ -176,7 +174,7 @@ local function on_start_travel(pos, node, clicker)
|
|||||||
minetest.get_node_timer(pos):start(1.0)
|
minetest.get_node_timer(pos):start(1.0)
|
||||||
hyperloop.close_pod_door(tDeparture)
|
hyperloop.close_pod_door(tDeparture)
|
||||||
|
|
||||||
atime = atime - 9 -- substract start/arrival time
|
atime = atime - 7 -- substract start/arrival time
|
||||||
minetest.after(4.9, on_travel, tDeparture, tArrival, clicker, atime)
|
minetest.after(4.9, on_travel, tDeparture, tArrival, clicker, atime)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
75
station.lua
75
station.lua
@ -62,40 +62,40 @@
|
|||||||
local AssemblyPlan = {
|
local AssemblyPlan = {
|
||||||
-- y-offs, x/z-path, facedir-offs, name
|
-- y-offs, x/z-path, facedir-offs, name
|
||||||
-- middle slice
|
-- middle slice
|
||||||
{ 1, "2F", 0, "hyperloop:pod_wall"},
|
{ 1, "2F", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 1, "", 0, "hyperloop:pod_wall"},
|
{ 1, "", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 1, "", 0, "hyperloop:pod_wall"},
|
{ 1, "", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 0, "1B", 0, "hyperloop:pod_wall"},
|
{ 0, "1B", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 0, "1B", 0, "hyperloop:pod_wall"},
|
{ 0, "1B", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 0, "1B", 0, "hyperloop:pod_wall"},
|
{ 0, "1B", 0, "hyperloop:pod_wall_ni"},
|
||||||
{-1, "", 0, "hyperloop:pod_wall"},
|
{-1, "", 0, "hyperloop:pod_wall_ni"},
|
||||||
{-1, "", 0, "hyperloop:pod_wall"},
|
{-1, "", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 0, "1F", 2, "hyperloop:seat"},
|
{ 0, "1F", 2, "hyperloop:seat"},
|
||||||
{ 1, "1F", 0, "hyperloop:lcd"},
|
{ 1, "1F", 0, "hyperloop:lcd"},
|
||||||
-- right slice
|
-- right slice
|
||||||
{-1, "1F1R", 0, "hyperloop:pod_wall"},
|
{-1, "1F1R", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 1, "", 0, "hyperloop:pod_wall"},
|
{ 1, "", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 1, "", 0, "hyperloop:pod_wall"},
|
{ 1, "", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 0, "1B", 0, "hyperloop:pod_wall"},
|
{ 0, "1B", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 0, "1B", 0, "hyperloop:pod_wall"},
|
{ 0, "1B", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 0, "1B", 0, "hyperloop:pod_wall"},
|
{ 0, "1B", 0, "hyperloop:pod_wall_ni"},
|
||||||
{-1, "", 0, "hyperloop:pod_wall"},
|
{-1, "", 0, "hyperloop:pod_wall_ni"},
|
||||||
{-1, "", 0, "hyperloop:pod_wall"},
|
{-1, "", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 0, "1F", 0, "hyperloop:pod_wall"},
|
{ 0, "1F", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 0, "1F", 0, "hyperloop:pod_wall"},
|
{ 0, "1F", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 1, "", 0, "hyperloop:pod_wall"},
|
{ 1, "", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 0, "1B", 0, "hyperloop:pod_wall"},
|
{ 0, "1B", 0, "hyperloop:pod_wall_ni"},
|
||||||
-- left slice
|
-- left slice
|
||||||
{-1, "2L2R", 0, "hyperloop:pod_wall"},
|
{-1, "2L2R", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 1, "", 0, "hyperloop:pod_wall"},
|
{ 1, "", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 1, "", 0, "hyperloop:pod_wall"},
|
{ 1, "", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 0, "1B", 0, "hyperloop:pod_wall"},
|
{ 0, "1B", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 0, "1B", 0, "hyperloop:pod_wall"},
|
{ 0, "1B", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 0, "1B", 0, "hyperloop:pod_wall"},
|
{ 0, "1B", 0, "hyperloop:pod_wall_ni"},
|
||||||
{-1, "", 0, "hyperloop:pod_wall"},
|
{-1, "", 0, "hyperloop:pod_wall_ni"},
|
||||||
{-1, "", 0, "hyperloop:pod_wall"},
|
{-1, "", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 0, "1F", 0, "hyperloop:pod_wall"},
|
{ 0, "1F", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 1, "", 0, "hyperloop:pod_wall"},
|
{ 1, "", 0, "hyperloop:pod_wall_ni"},
|
||||||
{ 0, "1F", 1, "hyperloop:doorTopPassive"},
|
{ 0, "1F", 1, "hyperloop:doorTopPassive"},
|
||||||
{-1, "", 1, "hyperloop:doorBottom"},
|
{-1, "", 1, "hyperloop:doorBottom"},
|
||||||
}
|
}
|
||||||
@ -456,6 +456,21 @@ minetest.register_node("hyperloop:pod_wall", {
|
|||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_node("hyperloop:pod_wall_ni", {
|
||||||
|
description = "Hyperloop Pod Shell",
|
||||||
|
tiles = {
|
||||||
|
-- up, down, right, left, back, front
|
||||||
|
"hyperloop_skin2.png",
|
||||||
|
"hyperloop_skin2.png",
|
||||||
|
"hyperloop_skin.png",
|
||||||
|
},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {cracky=2, not_in_creative_inventory=1},
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
drop = "",
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_lbm({
|
minetest.register_lbm({
|
||||||
label = "[Hyperloop] Station update",
|
label = "[Hyperloop] Station update",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user