/* called by: entrance ctrl of the object 'track'" j. o2 }3 S( q U# I6 O: L
*/
6 i6 G$ G8 Z Z$ X5 c, w Nis n3 |2 X; v" E: f$ k F4 P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- r& s% Z0 W5 F! `5 hdo
7 ?% E5 @% Z! q* d. k Lan := rootfolder.Internal.Tools.AOLlanguage;
5 n" W: f6 p( Q) c* Y; G if current = @.Destination -- else return' O$ v& q/ \* s# S: B
then( y/ @$ D" z k: }3 L7 I# Q
@.Destination := void;, s0 r% w. y1 E* k+ V
if @.occupied then1 o1 U* G# V# u- f+ X* N
part := @.cont;, v) n7 u+ L* @! G1 V, [4 y5 A
@.transpOrder := void;$ o. Y( V A' l% A% P2 y1 b4 U% J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 L* A w$ y. ? V( c9 m
@,root.eventcontroller.simTime);
& j5 l z* j5 k. E* i5 R5 O0 M: A1 Q @.HasOrder := false;
3 p! _) v( H/ h5 ]4 S% J5 j @.DrivingHome := true;
. f4 m( y0 S5 k9 ^8 ^ rgManager.tryToStartTransOrder;
, A$ i. X5 {+ Z2 i( s' b% e) ~5 U5 | if @.Destination = void1 M( l- \( a5 k' y" w8 |
then -- no transport order for vehicle @
0 u8 n; D4 z# |% [! h @.Destination :=/ P& A0 T0 E1 U1 K& J0 L9 w
rgManager.nearestFreeStation(@,track.~);" |: z, j5 F9 Z# Q0 `& N6 C
newDirection(@);
4 R5 G2 w" I7 U if @.Destination /= void then
# {9 v" @! w5 H* T v4 p @.Destination.NumReservation :=
: Y$ o. p5 D9 \+ _; b @.Destination.NumReservation + 1;# T0 [8 ]/ I5 C4 c% l
end;# G5 A% T* A6 b% V& H7 F
@.CurrIcon := "drivingHome";
" D5 j* }9 a3 Q' t% f: H) C3 v @.DrivingHome := true;/ Q) H0 R# H" L. y9 z
end;
. X8 O& r9 L' Z" q$ H3 [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station' R: O$ l+ n4 q, l! K& u
part := @.transpOrder;
1 _1 T( `- @3 U1 R* j; ^9 V6 y' D part.move(@);-- load part
) q' J( k# O* U! j @.CurrIcon := "load";2 [; q( S( F( e/ j
GlobalDistObj := part.globDestination;% L5 g9 G& H2 H; a- e4 |8 g
assignLObj := rgmanager.rgAssignL;
+ k' m3 n4 Y5 y- X row := assignLObj.getRowNo(GlobalDistObj);
9 _$ L1 q& e3 P+ G `- V8 w if Row = -1 then -- since 70$ b: r' W7 y. |
if lan=1 then9 |1 H. u0 y% u/ u# Z+ c
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. Q1 e7 L& ]6 }# Q
to_str("in der Andockstation: \"",?.~.name,"\""));9 Y" X* I; w% J5 p7 |( a" @
else
( K* F+ `8 S! s0 n5 M( S7 u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 M2 f- l- a* E to_str("in docking station: \"",?.~.name,"\"")); 4 V6 `& k1 Q q# J# \# q" }
end;: a g' B+ U W3 P" [. [# S
else5 m! {- X4 l. l, m( z$ s& N) k
@.Destination := assignLObj[1,row];
' I: |2 t4 k4 y1 Z1 v* r end; $ X6 n7 A0 ^# e/ c4 Y
newDirection(@);2 @( ^6 C- ~/ Q2 ~
@.HasOrder := true;
* N5 p" J9 a6 x4 i( H1 g# \ end;
% T( V/ y: n4 a6 g4 N- _( Q end;
1 s; X+ f! ?: K4 f7 Mend; -- of the method
0 Q5 o1 C: t" T/ ~5 c |