feldim2425 / OC-Minecarts

Minecraft Mod / Addon for OpenComputers
MIT License
10 stars 4 forks source link

[request] Addresses for network rail controller #15

Open dustpuppy opened 8 years ago

dustpuppy commented 8 years ago

Hi, i have done a setup, with some network rail controller and one computer controlling routing over switches and redstone signals. Now i stuck, because i can't address the network controller. It would be nice, if every controller can get an own address. This would make it possible to do routing for ocminecarts without using any extra stuff.

cloakable commented 8 years ago

+1 to this, an address and component would be useful for the rail controller. Would allow much finer control (i.e knowing that minecart with address x is at network rail y, so I can do something with that information)

feldim2425 commented 8 years ago

I will try that if I have time. So you mean something like

getConnectedCarts() -- returns a list of connected computer carts
getConnectionMode()  -- get the connection to the cart (None, Energy, ....)
setConnectionMode()  -- set the connection type

And for the Cart

getConnectedRail() -- maybe instead of hasNetworkRail() to get the connected rail controller

But I think that a button to disconnect this commponent will be good just to reduce the number of components if you don't need them. (Or make an advanced version of the rail controller)

If someone has more ideas post them here

dustpuppy commented 8 years ago

A name to set for the rail controller would be nice, like the waypoints of oc. getConnectedRail() could return then address, label. This would make codes better readable, but it's just an idea, if you make this method.

What about a slot for a network card? Then user can select, if he want's the rail controller connected over cable, or wireless.