/* called by: entrance ctrl of the object 'track'; q* z' l- ?$ k# j1 S" H# _% m
*/( Z# ^" T+ j, B3 T4 F3 ~
is
" p! }0 W$ L& y8 m part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: u5 i: Q. ]8 ?8 }$ [ h: S- j/ A. G9 c( [do
3 V P* t, d& t8 I3 P) m8 b Lan := rootfolder.Internal.Tools.AOLlanguage;0 p" Y4 }0 N; A o2 O8 L
if current = @.Destination -- else return
) O) M1 Q T5 L9 n6 y% p then: }* s. U( p5 T& v4 Y8 `1 G
@.Destination := void;& f1 [, b- b+ j
if @.occupied then
7 ~) K( L/ G; i8 ` part := @.cont;1 C F! T- o1 K2 s8 A5 w" m
@.transpOrder := void;
$ t/ c( B G, p5 {8 e7 m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 ]9 U% l; l$ @" E% c
@,root.eventcontroller.simTime);- u/ L" {( z5 \/ b, I: m( D1 z. l6 _
@.HasOrder := false;& \; d, ^/ m; @& D7 V5 j& }9 z. g
@.DrivingHome := true;2 s3 p- i- R# x# f/ Q# Y- J
rgManager.tryToStartTransOrder;
5 X$ X4 D% p5 _- ]) F if @.Destination = void$ H, w: g- |* [
then -- no transport order for vehicle @" X( k$ y! L. E7 u9 t
@.Destination :=; w0 S5 A! C; C$ T+ z
rgManager.nearestFreeStation(@,track.~);
( P% j; c2 C% _4 l1 f/ v( P( e4 l% p/ c newDirection(@);
9 _* Z, B/ P; E if @.Destination /= void then& @4 E1 g# v8 t% Y) h. d* [
@.Destination.NumReservation := i7 p1 f# k8 P* B& L
@.Destination.NumReservation + 1;, |0 [) u! @% h. V. X
end;7 W* \1 _5 `* j1 [$ _6 J' H4 J
@.CurrIcon := "drivingHome";
- l' A4 p. z H' Z @.DrivingHome := true;
/ S% @3 u+ o! X9 F6 ?( n end;
$ `$ t$ s. ~" B1 `# [* y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; \% ^. p' j; `6 `3 N0 Y0 _ part := @.transpOrder;3 o C* O) ^, d0 C5 b7 \
part.move(@);-- load part
5 A- B2 s. y- r* Q @.CurrIcon := "load";, T* t" P5 x6 B& f. Y
GlobalDistObj := part.globDestination;
- P+ L$ `1 u! v5 ~ assignLObj := rgmanager.rgAssignL;$ q9 `8 Q% U: Z" s( q+ |. C
row := assignLObj.getRowNo(GlobalDistObj);
+ U& d' w7 r( r @+ y if Row = -1 then -- since 70, a4 T$ M" ?3 E/ s: j+ H9 p
if lan=1 then' W9 }& s2 v+ K( E# b) b' D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 {" V$ z- E# D$ H* J
to_str("in der Andockstation: \"",?.~.name,"\""));7 L- I$ w- ^2 v3 j- U' ~4 X. u
else4 q9 m( C% ^. B8 E% D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 V9 ?& r+ U1 c9 ~' ^
to_str("in docking station: \"",?.~.name,"\""));
% @7 D. \, S: d9 N end;0 G2 C/ @4 B1 x. T
else4 C0 w" `4 H( f
@.Destination := assignLObj[1,row];7 r8 T n7 d. [+ k
end; 0 h m/ {( T! X. `3 G; C8 U" `" t
newDirection(@);
j3 s4 X6 a, ? @.HasOrder := true;9 @9 k+ D9 m, i- X
end;7 S8 R0 q8 B( r$ H0 w `
end;( I ]' {$ ]( N: i* e" F
end; -- of the method4 q( L# V7 { W, t" u$ Z! t
|