bugfixes
This commit is contained in:
@@ -84,17 +84,16 @@ public class Contact extends Tile{
|
||||
} else {
|
||||
LOG.debug("{} activated.",this);
|
||||
state = true;
|
||||
stream();
|
||||
if (isSet(timer)) timer.abort();
|
||||
Train train = train();
|
||||
Context context = isSet(train) ? train.contact(this) : new Context(this);
|
||||
actions.fire(context,"Contact("+addr+")");
|
||||
|
||||
for (Listener listener : listeners) listener.fired("Contact("+addr+")");
|
||||
|
||||
stream();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int addr() {
|
||||
return addr;
|
||||
}
|
||||
@@ -112,12 +111,7 @@ public class Contact extends Tile{
|
||||
|
||||
@Override
|
||||
public Object click(boolean shift) throws IOException {
|
||||
if (!shift) new Thread(Application.threadName(this)) {
|
||||
@Override
|
||||
public void run() {
|
||||
trigger(200);
|
||||
}
|
||||
}.start();
|
||||
if (!shift) trigger(200);
|
||||
return super.click(shift);
|
||||
}
|
||||
|
||||
|
||||
@@ -540,7 +540,11 @@ public abstract class Tile extends BaseClass implements Comparable<Tile> {
|
||||
oneWay = null;
|
||||
}
|
||||
}
|
||||
if ("on".equals(params.get(DISABLED))) status = Status.DISABLED;
|
||||
if ("on".equals(params.get(DISABLED))) {
|
||||
status = Status.DISABLED;
|
||||
} else {
|
||||
status = isSet(train) ? Status.OCCUPIED : Status.FREE;
|
||||
}
|
||||
String len = params.get(LENGTH);
|
||||
if (isSet(len)) length(Integer.parseInt(len));
|
||||
super.update(params);
|
||||
|
||||
Reference in New Issue
Block a user