Updated web interface and readme.
This commit is contained in:
		
							parent
							
								
									91988c17b0
								
							
						
					
					
						commit
						d623812959
					
				
							
								
								
									
										15
									
								
								README.md
								
								
								
								
							
							
						
						
									
										15
									
								
								README.md
								
								
								
								
							| 
						 | 
				
			
			@ -1,2 +1,17 @@
 | 
			
		|||
# RailSignalAPI
 | 
			
		||||
A simple API for tracking rail traffic in signalled blocks.
 | 
			
		||||
 | 
			
		||||
You can download the program via [releases](https://github.com/andrewlalis/RailSignalAPI/releases).
 | 
			
		||||
 | 
			
		||||
Once you download the JAR file, you can simply run it with `java -jar <jarfile>`. Note that this program requires Java 17.
 | 
			
		||||
 | 
			
		||||
Once it's started up, navigate to http://localhost:8080 to view the RailSignal web interface, where you can make changes to your systems. You should start by creating a new rail system.
 | 
			
		||||
 | 
			
		||||
Once you've done that, you can go ahead and create some signals for your system.
 | 
			
		||||
 | 
			
		||||
## Immersive Railroading and ComputerCraft
 | 
			
		||||
To begin controlling your signals from within the game, you can set up a signal controller computer with a two detector augments on the rail (one for redstone, one for the computer connection) and two monitors. Make sure all perhipherals are connected to the network, and then run this command:
 | 
			
		||||
```
 | 
			
		||||
pastebin run Z72QhG7G
 | 
			
		||||
```
 | 
			
		||||
This will run an installation script that will guide you through setting up your signal's configuration.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,15 +32,7 @@ $(document).ready(() => {
 | 
			
		|||
 | 
			
		||||
    detailPanel = $('#railMapDetailPanel');
 | 
			
		||||
 | 
			
		||||
    $.get("/api/railSystems")
 | 
			
		||||
        .done(railSystems => {
 | 
			
		||||
            railSystems.forEach(railSystem => {
 | 
			
		||||
                let option = $('<option value="' + railSystem.id + '">' + railSystem.name + '</option>')
 | 
			
		||||
                railSystemSelect.append(option);
 | 
			
		||||
            });
 | 
			
		||||
            railSystemSelect.val(railSystems[0].id);
 | 
			
		||||
            railSystemSelect.change();
 | 
			
		||||
        });
 | 
			
		||||
    refreshRailSystems(true);
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
// Handle mouse scrolling within the context of the canvas.
 | 
			
		||||
| 
						 | 
				
			
			@ -237,7 +229,7 @@ function refreshRailSystems(selectFirst) {
 | 
			
		|||
        .done(railSystems => {
 | 
			
		||||
            railSystemSelect.empty();
 | 
			
		||||
            railSystems.forEach(railSystem => {
 | 
			
		||||
                let option = $('<option value="' + railSystem.id + '">' + railSystem.name + '</option>')
 | 
			
		||||
                let option = $(`<option value="${railSystem.id}">${railSystem.name} - ID: ${railSystem.id}</option>`)
 | 
			
		||||
                railSystemSelect.append(option);
 | 
			
		||||
            });
 | 
			
		||||
            if (selectFirst) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue