Posted 09 October 2012 - 04:16 AM
If you ever needed to add traffic signals in your world, you'd notice that the only decent method to do so is using Railcraft distant signals. You would also notice that if you have to use 3 or more different lights on a single signal, it gets really messy and you lose track of what's happening. This mod will eliminate reduce the pain and make it easy to integrate with ComputerCraft.
Download
Download version 0.3.0. Simply place it in the mods folder along with the following requirements:
This project is open source-ish. Visit the github page if you'd like.
How to set up your design
Controller Box Analyzer
Computer Signal Controller
Commands
After attaching the peripheral p, you can use the following commands:
The following is a known list of bugs and their temporary solutions
If you need help, found a bug not included above, or would like to suggest a feature, just reply to this topic. Thank you!
Download
Download version 0.3.0. Simply place it in the mods folder along with the following requirements:
- Minecraft 1.3.2
- Minecraft Forge 4.1.4.287+
- ComputerCraft 1.42+
- Railcraft 6.4.1.0+
- Minecraft 1.2.5
- Minecraft Forge ?????
- ComputerCraft 1.4x+
- Railcraft 5.4.7+
This project is open source-ish. Visit the github page if you'd like.
How to set up your design
- Pair up each distant signal with a Signal Controller Box, just like usual
- Use a Controller Box Analyzer (see below) on the Controller Box(es) and record its coordinates
- Next, set up your computer and place the Computer Signal Controller (see below) next to it
- Attach the peripheral (e.g. p = peripheral.wrap("left"))
- For every signal, add it to the peripheral by using p.add("id",x,y,z), where "id" is some unique string and x,y,z are the coordinates of the controller box
- Each time you add a controller box to the peripheral, it will turn off its corresponding signal. It's OK, it's supposed to be like that
- Finally, if you want to set the color of a signal, just use p.setLight("id",light) (see list below)
Controller Box Analyzer
Computer Signal Controller
Commands
After attaching the peripheral p, you can use the following commands:
- p.add(id, x, y, z) - Add a Signal Controller Box located on the coordinates (x,y,z) to the peripheral and call it "id"
- p.remove(id) - Remove the signal from the peripheral
- p.setLight(id, light) - Set the color of the light. The value light is a number corresponding to the following list:
- 0 - Off
- 1 - Red
- 2 - Yellow
- 3 - Green
- 4 - Blinking red
- 5 - Blinking yellow
- p.getLight(id) - Gets the color of the signal using the above chart
The following is a known list of bugs and their temporary solutions
- If the peripheral can't find a tile entity specified by the coordinates, it will do nothing for some reason
- Solution: make sure your coordinates are correct
- After logging out and in again, the peripheral will not recognize any tile entities
- Solution: create some mechanism that will destroy and replace the peripheral at log out. It could be easily achieved with, say, RedPower, if it was updated :D/>/>
- To change the light, the peripheral simply changes the default value of Signal Controller Boxes. As such, if you apply a redstone current to a Box, the light will not show the expected result
- Solution: until it will be possible to pair a signal directly to the peripheral, just keep all your redstone stuff away from the Boxes
- Fix bugs
- Implement a decent API
- ????
- Profit
If you need help, found a bug not included above, or would like to suggest a feature, just reply to this topic. Thank you!