Make powered rails always accelerate moving carts

This commit is contained in:
teknomunk 2024-11-09 12:36:57 -06:00
parent 3191973616
commit 64488a84e5
1 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,10 @@ mod.register_straight_rail("mcl_minecarts:golden_rail_v2",{ "mcl_minecarts_rail_
mod.register_straight_rail("mcl_minecarts:golden_rail_v2_on",{ "mcl_minecarts_rail_golden_powered.png" },{ mod.register_straight_rail("mcl_minecarts:golden_rail_v2_on",{ "mcl_minecarts_rail_golden_powered.png" },{
_doc_items_create_entry = false, _doc_items_create_entry = false,
_rail_acceleration = function(pos, staticdata) _rail_acceleration = function(pos, staticdata)
if staticdata.velocity ~= 0 then
return 4
end
local dir = mod.get_rail_direction(pos, staticdata.dir, nil, nil, staticdata.railtype) local dir = mod.get_rail_direction(pos, staticdata.dir, nil, nil, staticdata.railtype)
local node_a = minetest.get_node(vector.add(pos, dir)) local node_a = minetest.get_node(vector.add(pos, dir))
local node_b = minetest.get_node(vector.add(pos, -dir)) local node_b = minetest.get_node(vector.add(pos, -dir))