Splizard wrote:We need upside down rails so we can make rollercoasters!
ABJ wrote:I am making my own version of this. Is it OK if I release? And what else do I have to do?
May 18 14:34:20 2013lr minetestserver[11467]: 14:34:20: ACTION[ServerThread]: MYUSER right-clicks object 2: LuaEntitySAO at (-14,19,-64)
May 18 14:34:21 2013lr minetestserver[11467]: 14:34:21: ERROR[main]: ERROR: An unhandled exception occurred: /var/lib/minetest/.minetest/mods/boost_cart/init.lua:47: attempt to index field 'player_attached' (a nil value)
May 18 14:34:21 2013lr minetestserver[11467]: 14:34:21: ERROR[main]: stack traceback:
May 18 14:34:21 2013lr minetestserver[11467]: 14:34:21: ERROR[main]: #011/var/lib/minetest/.minetest/mods/boost_cart/init.lua:47: in function </var/lib/minetest/.minetest/mods/boost_cart/init.lua:37>
May 18 14:34:21 2013lr minetestserver[11467]: In thread 7f7b8d498880:
May 18 14:34:21 2013lr minetestserver[11467]: /builddir/build/BUILD/minetest-0.4.9/src/main.cpp:1860: int main(int, char**): Assertion '0' failed.
May 18 14:34:21 2013lr minetestserver[11467]: Debug stacks:
May 18 14:34:21 2013lr minetestserver[11467]: DEBUG STACK FOR THREAD 7f7b8d498880:
May 18 14:34:21 2013lr minetestserver[11467]: #0 int main(int, char**)
May 18 14:34:21 2013lr minetestserver[11467]: (Leftover data: #1 Dedicated server branch)
May 18 14:34:21 2013lr minetestserver[11467]: (Leftover data: #2 virtual void ServerMap::save(ModifiedState))
May 18 14:34:21 2013lr minetestserver[11467]: (Leftover data: #3 virtual void Database_SQLite3::saveBlock(MapBlock*))
arifsaha wrote:Unfortunately I consistently experience server crashing whenever I right-click the cart. The log shows this:
<snip>
minetest.register_craft({
output = "boost_cart:detectorrail 6",
recipe = {
{"default:steel_ingot", "mesecon:mesecon", "default:steel_ingot"},
{"default:steel_ingot", "group:stick", "default:steel_ingot"},
{"default:steel_ingot", "mesecon:mesecon", "default:steel_ingot"},
},
uind_w wrote:"mesecon:mesecon" is should be "mesecons:mesecon"?
TenPlus1 wrote:tomlukeywood: rename carts_mod directory to just carts.
katsukitty wrote:"2015-11-11 18:57:11: ERROR[Main]: ...e/katsu/Programs/minetest/bin/../mods/carts/init.lua:16: attempt to concatenate field 'modpath' (a nil value)"
I get the same error when it's named "carts". Possible bug?
katsukitty wrote:I get the same error when it's named "carts". Possible bug?
Alienant1 wrote:is the power rail/mesecons compatibility now part of the standard download or do I still need to download separately?
amadin wrote:Can you add stop cart by punching against the moving direction to last commit? I saw it in old commit.
It's already now possible to slow down the cart by punching in the opposite direction. Just move slowly (or press the back/down key) to make it stop.
amadin wrote:Can you add different texture inside and outside cart? I want replace texture with wheels like in minecart.
Can you set contorl by keys (up, down), like in minecraft, or how can i do this by itself?.
if ctrl and ctrl.up then
acc = acc + 0.5
end
Laudrin wrote:I recognized that boost_cart rails have a slightly brighter texture <snip> Nothing serious, but is that an intentional choice?
Some suggestions <snip>: <snip> switch railroad junctions
<snip> when the signal is red, a brake rail would stop the cart (not only decelerate) independent of its speed.
benrob0329 wrote:Would forceloading the rails be possible?
Krock wrote:You can use sticky pistons to destroy the rails, so the cart will stop instantly (or maybe not?).
Brake rails can turned on and off with mesecons already now, so a new type or rail would be required (buffer rail?).
The "forced" switch is a good idea. Mesecon signal on junction = push cart in the opposite direction.
If you know Lua and how to use GitHub, I would like to see a pull request. Otherwise it may take a while until I add new features.
Laudrin wrote:Can you give me a hint how it's done?
Krock wrote:The cart calculates its velocity each node, this means, it will decelerate and start moving backwards again (like it does on hills).
- Adding a new meta int "cart_stop" to the new stop rail node
- Checking the meta value near init.lua line 219
- Changing acceleration `acc´ and velocity `vel´ array all to zero and the velocity update flag `update.vel´ to `true´ when the integer "cart_stop" equals 1
after_place_node = function(pos, placer, itemstack)
if not mesecon then
minetest.env:get_meta(pos):set_int("cart_stop", "1")
end
end,
mesecons = {
effector = {
action_on = function(pos, node)
minetest.env:get_meta(pos):set_int("cart_stop", "0")
boost_cart:boost_rail(pos, 2)
end,
action_off = function(pos, node)
minetest.env:get_meta(pos):set_int("cart_stop", "1")
end,
},
},
local stop_mod = tonumber(minetest.get_meta(pos):get_int("cart_stop"))
if stop_mod and stop_mod >= 1 then
acc = 0
for _,v in ipairs({"x","y","z"}) do
vel[v] = 0
update.vel = true
end
end
The problem will be the cart starting. It does not know in which direction it was driving before -> valvulated by velocity.
However, also this can be solved by getting the cart yaw and defining its direction that way.
twoelk wrote:how about the rail detecting the passing cart and teleporting it back to the center of the node and while doing so over riding any direction and velocity information
Laudrin wrote:Even with restarting minetest, removing the rails and building them anew I get different results. Sometimes it works: The cart will stop on the stop rail and start again (even in the right direction) when punching the mesecon button connected to the rails. But sometimes the cart will just slow down a bit and then accelerate again, passing the stop rail. :-/
SaKeL wrote:i get stuck in the walls and floor when im driving and punching the cart
Users browsing this forum: No registered users and 49 guests