9 changed files with 65 additions and 11 deletions
@ -0,0 +1,10 @@ |
|||||||
|
package de.srsoftware.web4rail.actions; |
||||||
|
|
||||||
|
public class PowerOff extends Action{ |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean fire(Context context) { |
||||||
|
context.contact.plan().controlUnit().emergency(); |
||||||
|
return false; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,16 @@ |
|||||||
|
package de.srsoftware.web4rail.actions; |
||||||
|
|
||||||
|
import java.io.IOException; |
||||||
|
|
||||||
|
public class StopAuto extends Action { |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean fire(Context context) throws IOException { |
||||||
|
if (context.train != null) { |
||||||
|
context.train.quitAutopilot(); |
||||||
|
return true; |
||||||
|
} |
||||||
|
return false; |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue