Fix broken cart recheck, place carts:rail instead
This adds a hard depencency on the carts mod
This commit is contained in:
parent
d20c3bee46
commit
7957c52cd6
@ -1,6 +1,6 @@
|
||||
default
|
||||
carts
|
||||
tnt
|
||||
farming
|
||||
carts?
|
||||
treasurer?
|
||||
mobs_monster?
|
||||
|
@ -5,7 +5,7 @@
|
||||
tsm_railcorridors.nodes = {
|
||||
dirt = "default:dirt",
|
||||
chest = "default:chest",
|
||||
rail = "default:rail",
|
||||
rail = "carts:rail",
|
||||
torch_floor = "default:torch",
|
||||
torch_wall = "default:torch_wall",
|
||||
|
||||
|
3
init.lua
3
init.lua
@ -316,6 +316,7 @@ local function RecheckCartHack(params)
|
||||
if minetest.get_node(pos).name == tsm_railcorridors.nodes.rail then
|
||||
minetest.add_entity(pos, cart_id)
|
||||
minetest.after(5, RecheckCartHack, {pos, cart_id, tries})
|
||||
return
|
||||
end
|
||||
-- The rail may have been destroyed in the meantime, that's why the node is checked.
|
||||
end
|
||||
@ -625,7 +626,7 @@ local function corridor_func(waypoint, coord, sign, up_or_down, up_or_down_next,
|
||||
-- Note that the callback function is also called there.
|
||||
-- TODO: Move callback function to this position when the
|
||||
-- minetest.add_entity bug has been fixed.
|
||||
minetest.after(2, RecheckCartHack, {cpos, cart_id, 10})
|
||||
minetest.after(3, RecheckCartHack, {cpos, cart_id, 12})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user