mirror of
https://github.com/SmallJoker/boost_cart.git
synced 2024-12-25 18:30:19 +01:00
Git did something...
This commit is contained in:
parent
04c3d73e4a
commit
a98a60e5a6
@ -182,6 +182,10 @@ boost_cart:register_rail("boost_cart:waitrail", {
|
|||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
local player_name = player:get_player_name()
|
local player_name = player:get_player_name()
|
||||||
|
|
||||||
|
local pos = boost_cart.player_formspecs[player_name]
|
||||||
|
boost_cart.player_formspecs[player_name] = nil -- Clean up
|
||||||
|
|
||||||
if not player_name or formname ~= "boost_cart:waitrail" then
|
if not player_name or formname ~= "boost_cart:waitrail" then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
@ -196,7 +200,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local meta = minetest.get_meta(boost_cart.player_formspecs[player_name])
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("cart_acceleration", "wait:" .. num)
|
meta:set_string("cart_acceleration", "wait:" .. num)
|
||||||
meta:set_string("cart_acceleration_backup", "wait:" .. num)
|
meta:set_string("cart_acceleration_backup", "wait:" .. num)
|
||||||
meta:set_string("infotext", "Wait time: " .. num .. " seconds.")
|
meta:set_string("infotext", "Wait time: " .. num .. " seconds.")
|
||||||
|
Loading…
Reference in New Issue
Block a user