Browse Source

bugfixes

lookup-tables
Stephan Richter 4 years ago
parent
commit
d89bd4a364
  1. 2
      pom.xml
  2. 8
      resources/svg/SignalE.svg
  3. 8
      resources/svg/SignalN.svg
  4. 8
      resources/svg/SignalS.svg
  5. 8
      resources/svg/SignalW.svg
  6. 3
      resources/translations/Application.de.translation
  7. 2
      src/main/java/de/srsoftware/web4rail/Plan.java
  8. 2
      src/main/java/de/srsoftware/web4rail/Route.java
  9. 8
      src/main/java/de/srsoftware/web4rail/moving/Train.java

2
pom.xml

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>de.srsoftware</groupId> <groupId>de.srsoftware</groupId>
<artifactId>web4rail</artifactId> <artifactId>web4rail</artifactId>
<version>1.1.1</version> <version>1.1.2</version>
<name>Web4Rail</name> <name>Web4Rail</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<description>Java Model Railway Control</description> <description>Java Model Railway Control</description>

8
resources/svg/SignalE.svg

@ -1,7 +1,7 @@
<svg width="%width%" height="100" viewbox="0 0 100 100"> <svg width="%width%" height="100" viewbox="0 0 100 100">
<rect x="0" y="35" width="100" height="30" /> <rect x="0" y="35" width="100" height="30" />
<rect class="sig_a" x="5" y="5" height="20" width="20" /> <rect class="sig_a" x="75" y="75" height="20" width="20" />
<rect class="sig_B" x="25" y="5" height="20" width="20" /> <rect class="sig_B" x="55" y="75" height="20" width="20" />
<line x1="45" y1="15" x2="70" y2="15" /> <line x1="30" y1="85" x2="55" y2="85" />
<line x1="70" y1="10" x2="70" y2="20" /> <line x1="30" y1="80" x2="30" y2="90" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 313 B

After

Width:  |  Height:  |  Size: 316 B

8
resources/svg/SignalN.svg

@ -1,7 +1,7 @@
<svg width="100" height="" viewbox="0 0 100 100"> <svg width="100" height="" viewbox="0 0 100 100">
<rect x="35" y="0" width="30" height="100" /> <rect x="35" y="0" width="30" height="100" />
<rect class="sig_a" x="5" y="75" height="20" width="20" /> <rect class="sig_a" x="75" y="5" height="20" width="20" />
<rect class="sig_B" x="5" y="55" height="20" width="20" /> <rect class="sig_B" x="75" y="25" height="20" width="20" />
<line x1="15" y1="30" x2="15" y2="55" /> <line x1="85" y1="45" x2="85" y2="70" />
<line x1="10" y1="30" x2="20" y2="30" /> <line x1="80" y1="70" x2="90" y2="70" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 307 B

After

Width:  |  Height:  |  Size: 308 B

8
resources/svg/SignalS.svg

@ -1,7 +1,7 @@
<svg width="100" height="" viewbox="0 0 100 100"> <svg width="100" height="" viewbox="0 0 100 100">
<rect x="35" y="0" width="30" height="100" /> <rect x="35" y="0" width="30" height="100" />
<rect class="sig_a" x="75" y="5" height="20" width="20" /> <rect class="sig_a" x="5" y="75" height="20" width="20" />
<rect class="sig_B" x="75" y="25" height="20" width="20" /> <rect class="sig_B" x="5" y="55" height="20" width="20" />
<line x1="85" y1="45" x2="85" y2="70" /> <line x1="15" y1="30" x2="15" y2="55" />
<line x1="80" y1="70" x2="90" y2="70" /> <line x1="10" y1="30" x2="20" y2="30" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 308 B

After

Width:  |  Height:  |  Size: 307 B

8
resources/svg/SignalW.svg

@ -1,7 +1,7 @@
<svg width="%width%" height="100" viewbox="0 0 100 100"> <svg width="%width%" height="100" viewbox="0 0 100 100">
<rect x="0" y="35" width="100" height="30" /> <rect x="0" y="35" width="100" height="30" />
<rect class="sig_a" x="75" y="75" height="20" width="20" /> <rect class="sig_a" x="5" y="5" height="20" width="20" />
<rect class="sig_B" x="55" y="75" height="20" width="20" /> <rect class="sig_B" x="25" y="5" height="20" width="20" />
<line x1="30" y1="85" x2="55" y2="85" /> <line x1="45" y1="15" x2="70" y2="15" />
<line x1="30" y1="80" x2="30" y2="90" /> <line x1="70" y1="10" x2="70" y2="20" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 316 B

After

Width:  |  Height:  |  Size: 313 B

3
resources/translations/Application.de.translation

@ -68,6 +68,7 @@ Firing {} : starte {}
FinishRoute : Route abschließen FinishRoute : Route abschließen
Found {} routes. : {} Routen gefunden. Found {} routes. : {} Routen gefunden.
FreeStartBlock : Start-Block freigeben FreeStartBlock : Start-Block freigeben
Fullscreen : Vollbild
Hardware settings : Hardware-Einstellungen Hardware settings : Hardware-Einstellungen
Height : Höhe Height : Höhe
Help : Hilfe Help : Hilfe
@ -140,7 +141,7 @@ Set speed to {} {} : Geschwindigkeit auf {} {} setzen
Set {} to {} : {} auf {} setzen Set {} to {} : {} auf {} setzen
SetPower : Strom schalten SetPower : Strom schalten
Set speed to : Geschwindigkeit setzen Set speed to : Geschwindigkeit setzen
Setup actions : Aktivierungs-Aktionen Setup actions : Vorbereitung-Aktionen
ShowText : Text anzeigen ShowText : Text anzeigen
Signals : Signale Signals : Signale
Simulating movement of {}... : Simuliere Fahrt von {}... Simulating movement of {}... : Simuliere Fahrt von {}...

2
src/main/java/de/srsoftware/web4rail/Plan.java

@ -245,7 +245,7 @@ public class Plan extends BaseClass{
Vector<Route> routes = new Vector<Route>(); Vector<Route> routes = new Vector<Route>();
for (Block block : blocks) { for (Block block : blocks) {
for (Connector con : block.startPoints()) { for (Connector con : block.startPoints()) {
routes.addAll(follow(new Route().begin(block,con.from.inverse()),con)); routes.addAll(follow(new Route().begin(block,con.from),con));
} }
} }
for (Tile tile : tiles.values()) tile.routes().clear(); for (Tile tile : tiles.values()) tile.routes().clear();

2
src/main/java/de/srsoftware/web4rail/Route.java

@ -290,7 +290,7 @@ public class Route extends BaseClass implements Comparable<Route>{
path = new Vector<Tile>(); path = new Vector<Tile>();
turnouts = new HashMap<>(); turnouts = new HashMap<>();
startBlock = block; startBlock = block;
startDirection = from; startDirection = from.inverse();
path.add(block); path.add(block);
return this; return this;
} }

8
src/main/java/de/srsoftware/web4rail/moving/Train.java

@ -598,9 +598,13 @@ public class Train extends BaseClass implements Comparable<Train> {
} }
public Object quitAutopilot() { public Object quitAutopilot() {
if (isSet(nextRoute)) {
nextRoute.reset();
nextRoute = null;
}
if (isSet(autopilot)) { if (isSet(autopilot)) {
autopilot.stop = true; autopilot.stop = true;
autopilot = null; autopilot = null;
return t("{} stopping at next block.",this); return t("{} stopping at next block.",this);
} else return t("autopilot not active."); } else return t("autopilot not active.");
} }
@ -615,7 +619,7 @@ public class Train extends BaseClass implements Comparable<Train> {
boolean error = !nextRoute.lockIgnoring(route); boolean error = !nextRoute.lockIgnoring(route);
error = error || !nextRoute.setTurnouts(); error = error || !nextRoute.setTurnouts();
error = error || !route.fireSetupActions(context); error = error || !nextRoute.fireSetupActions(context);
if (error) { if (error) {
nextRoute.reset(); // may unlock tiles belonging to the current route. nextRoute.reset(); // may unlock tiles belonging to the current route.

Loading…
Cancel
Save