/* called by: entrance ctrl of the object 'track'+ ~8 a' Z+ n+ p
*/
$ r# }; _, L3 U4 tis
: G5 D' ]3 m) W& k F" v% Q, `/ e part, GlobalDistObj, assignLObj:object;row,Lan:integer;" b% ]1 Y/ V6 v! C+ ~- M
do
. W1 B7 H2 }6 n Lan := rootfolder.Internal.Tools.AOLlanguage;
}2 C7 e4 q' q, V- V& B if current = @.Destination -- else return! q) q9 @8 h9 t' ^4 b& }* U* l2 G! b
then0 P# p. D* b; r% s' T0 A
@.Destination := void;6 M6 ?7 C$ B, j8 Q
if @.occupied then# n+ [2 D, \- x O8 @! H$ x- a
part := @.cont; K0 B, m6 _0 w6 a: z
@.transpOrder := void;; r& w0 z8 j/ Y% P, v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" q, G8 [: I* U" u @,root.eventcontroller.simTime);. j* N1 |% z% I1 Q; d- E
@.HasOrder := false;
2 Z: g# m' B) W) b2 P* c @.DrivingHome := true;( M# ^9 N% V" g. A- z3 `
rgManager.tryToStartTransOrder;
4 s" N: U" \" @, C' G" t9 } if @.Destination = void! y7 ?2 q; _- D2 x. Q
then -- no transport order for vehicle @
2 S0 @: j7 X1 g @.Destination :=& W% E9 m; `4 i9 F8 \/ \, S
rgManager.nearestFreeStation(@,track.~);$ c- U6 s" J1 c' D
newDirection(@); 6 D0 t* n6 h5 w5 |- x( }
if @.Destination /= void then
* O7 n' V( M; E% Q' y8 A3 A9 n @.Destination.NumReservation :=
$ |/ d6 j( T2 f7 c' [& ? @.Destination.NumReservation + 1;, {) Q$ f9 n/ t- a" ?5 h
end;$ d% t) O8 F( _/ {8 F
@.CurrIcon := "drivingHome";8 p1 [5 g' d# P' q& A
@.DrivingHome := true;+ F) I, y& d4 C( U$ A8 ?1 x. k
end;8 l' R# e) e5 ? q z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 U$ I6 \/ y0 Q! N part := @.transpOrder;& Y2 Z( P/ K; u3 ~
part.move(@);-- load part
3 l! W8 A3 ~7 y! k' y( m @.CurrIcon := "load";3 I- o7 ~4 K+ C$ U
GlobalDistObj := part.globDestination;5 m# a0 Q3 q5 n
assignLObj := rgmanager.rgAssignL;
# f* t3 h O. f1 P& f; W' m7 k row := assignLObj.getRowNo(GlobalDistObj);0 D! ~ X \! [/ s8 u: o( W
if Row = -1 then -- since 70$ S. v( F$ _. S! u8 U2 ~
if lan=1 then5 K2 \4 r& }1 H; N Y; Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ a3 B4 j3 T8 u
to_str("in der Andockstation: \"",?.~.name,"\""));1 {& G! X/ \ H
else
& F8 N e* H5 W: R3 J8 O( _1 d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! y- p9 P2 E7 r* l4 W' G+ N6 G
to_str("in docking station: \"",?.~.name,"\""));
: u; D/ ?8 l! @8 B end;5 ^& k/ ?* f: j" S
else/ M7 B; B, k3 l% P3 R* U! Y( i$ q. R
@.Destination := assignLObj[1,row];8 n4 `: c8 E# k5 z& b( N
end; 3 e7 r0 d( D; }/ b6 |( s B
newDirection(@);
2 ?) D) I, E1 |6 `% J) I8 p @.HasOrder := true;
* | @- o" ?" n4 A: Q$ h1 L end;# B% w% P" s8 _' X' @9 i
end;
& z( E3 x- j2 r: p: R! Zend; -- of the method
1 K. p% q, M+ ]- P. S/ `1 y; o |