/* called by: entrance ctrl of the object 'track'
8 P0 G& U! y# X2 S- R; {: l*/5 W& J3 ]$ f2 b( ^! H
is9 M+ [1 Q: a- y; p" K# c" W
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" J: @& O& Z- t+ O( K
do
* u4 X- O/ q6 X Lan := rootfolder.Internal.Tools.AOLlanguage;, m, U* a; H) x- } h, k
if current = @.Destination -- else return
% j1 Y4 V8 ]* q- Y7 |/ u: c7 B then2 e7 w8 d" w/ E* K
@.Destination := void;
7 O7 r4 s! D+ i) V" I if @.occupied then0 @( W" a; ]9 V ?) E, G
part := @.cont;- v: j! h) F, m# I2 l4 `1 T4 }
@.transpOrder := void;2 F0 D% R2 m9 d4 ~1 V) ^( v" _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 [! N/ w/ D8 H* U4 A @,root.eventcontroller.simTime);
+ L4 _4 O7 J* R# B @.HasOrder := false;% A( x3 f% B! K# J7 t
@.DrivingHome := true;
- d% L+ N' g) G X+ v. O rgManager.tryToStartTransOrder;
& X: o- j. e/ z( H# @& w if @.Destination = void
. ]9 f& L0 e: V" g5 f" e then -- no transport order for vehicle @
$ u: a! i1 q8 T; }5 H' H, v @.Destination :=
) A9 I$ |) }7 x1 R: X! ~' k6 u rgManager.nearestFreeStation(@,track.~);
$ b2 h: ?# C) E( ]8 e& \ newDirection(@);
/ j! O( Q: R3 [5 x- ~/ x: f if @.Destination /= void then( c' J1 |: t0 ~* B: P
@.Destination.NumReservation :=2 l1 M$ Q0 L) V( @2 j0 d1 b5 ?
@.Destination.NumReservation + 1; H8 w2 X7 a5 G1 u. ^
end;
0 b' T) V- P% h. G+ v @.CurrIcon := "drivingHome";
7 l( x; }, m2 U% y1 ]' s @.DrivingHome := true;7 M- q2 t8 A F% \5 @! k# S/ _
end;
9 o9 v" u% x0 \7 l, a9 K. R8 d else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ F! ?) {- T9 J5 V2 Y: {
part := @.transpOrder;
. c$ ]* x1 h% G# n1 r. _ part.move(@);-- load part2 K7 {$ G! C/ D' m$ x( U& E" @
@.CurrIcon := "load";
7 K0 R3 v# p9 H- M) T( k GlobalDistObj := part.globDestination;' [0 f) F h7 ]+ ?( ~; h) ^
assignLObj := rgmanager.rgAssignL;
* Y! g. h5 x! S2 u row := assignLObj.getRowNo(GlobalDistObj);8 s u0 U' c$ H8 O8 s4 L
if Row = -1 then -- since 70
& d b. O4 r0 j2 b3 o, w S if lan=1 then
( q9 u- T! N* N9 ^! e4 e+ a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( h4 ^( w; i& M; y
to_str("in der Andockstation: \"",?.~.name,"\""));
8 {* p2 B2 S1 Z9 n" T else
8 @; W$ `2 R8 Q2 W2 M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. r2 E' n* y& o6 f5 k2 @, y
to_str("in docking station: \"",?.~.name,"\"")); 5 ~2 K3 m' ?# ?; ]' N9 q m
end;
8 ^! m- k" V9 m, ]# X else
% o1 X- }, D9 K G; [8 }1 U @.Destination := assignLObj[1,row];
& j- V0 j& i6 |6 v! Y- u3 i end;
5 y; \$ i( m( V" |' q newDirection(@);
8 O- e% N8 S3 [- I% { @.HasOrder := true;
8 R$ n) G" }4 I end;
8 C. a1 T9 N( e" k# Z8 G end;
' E. t. } w# z8 c4 Q9 q; kend; -- of the method
3 d- m, R; J% m) F |