/* called by: entrance ctrl of the object 'track'2 ~; S: G5 ?1 S3 p) ~9 P x
*/
. X' F( G: V# X _( }* R3 ]; \is6 j' I( P; b6 k/ N+ M2 O0 S8 C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 V$ h# L( ^% o1 e+ \. ?4 e0 H$ Gdo
7 |6 `7 }. v4 R M) c# t9 F Lan := rootfolder.Internal.Tools.AOLlanguage;
6 s2 O a# X* [- [; R- u7 [ if current = @.Destination -- else return
) s& j) N3 Q2 ^8 B then
) F8 D+ z6 n/ k8 p5 N @.Destination := void;
. x) B3 C3 M7 V0 K8 Q if @.occupied then6 N- C c' D# E1 i( c
part := @.cont;- }( f6 f! x. Z' c% y
@.transpOrder := void;/ U4 p+ N- E7 m9 J% R1 |/ u9 Q0 B8 N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- U9 a) G6 k+ n
@,root.eventcontroller.simTime);! r o3 `$ T- X. }# g" D2 U: v
@.HasOrder := false;
0 h7 N- ]3 C0 j0 b# i) m& M @.DrivingHome := true;4 I* G7 @( q6 t1 z: i3 M% g
rgManager.tryToStartTransOrder;: Z2 ~# u! `* k i: K
if @.Destination = void+ k8 H% `2 G, ?7 N
then -- no transport order for vehicle @
- ?( ?" G- |% |2 t5 e @.Destination :=- Y% ^5 |! d6 B
rgManager.nearestFreeStation(@,track.~);
/ h6 x ^/ H# N( X+ I newDirection(@);
, Y9 C0 V" b; E if @.Destination /= void then1 j9 N0 }) D# S1 M
@.Destination.NumReservation :=
! f6 Y: X$ q4 `3 B/ y$ l- D# ]- a3 o @.Destination.NumReservation + 1;
5 _% m6 |: i' a4 `2 T! m end;
' A0 @9 R; Z6 n7 c/ }. v @.CurrIcon := "drivingHome";4 a1 f: L' F8 q" K2 V1 F
@.DrivingHome := true;" } F1 `7 A- ^: v) `
end;4 c" l. n$ [, O+ _1 w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% \9 r9 B7 ^( b7 ~9 L
part := @.transpOrder;
/ f9 ^2 a9 G9 F/ s0 S o/ b part.move(@);-- load part
# G9 {2 P, q6 H/ c @.CurrIcon := "load";
; z0 n# {; s5 V5 ~# G: n# L+ y GlobalDistObj := part.globDestination;% U& X! S5 d0 r1 J
assignLObj := rgmanager.rgAssignL;' u B& { D$ O
row := assignLObj.getRowNo(GlobalDistObj);
) S; ~- k: K" u9 c- Y4 j$ c if Row = -1 then -- since 70' K! Z8 E$ ]' |2 @; H9 W
if lan=1 then
6 z) C$ N8 v' F2 h n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! x& N4 v5 {3 a& |2 q
to_str("in der Andockstation: \"",?.~.name,"\""));+ o( F3 f+ Q) e2 O) `2 r' m
else% y& H( D6 b" u4 |- q6 |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 A# S8 y6 f7 y: t
to_str("in docking station: \"",?.~.name,"\""));
3 P1 @7 ~# {8 c6 W2 m end;
5 F/ s+ t, |) B9 s, \" Q9 A1 O0 r8 x else; b/ O% k! M" b0 b+ v% y+ S8 l8 c, R
@.Destination := assignLObj[1,row];! {6 h/ k1 ^) }- T1 m# |
end;
8 @4 `2 _1 @* \6 t7 s newDirection(@);4 ^/ \ G* Z+ D: S! m+ U
@.HasOrder := true;4 s3 `' u, A/ c' }; }
end;
! r3 h" h" `- e+ M end;
: j( n# R0 s: ?* P: Hend; -- of the method: c( f8 y$ }* Z0 s5 `5 t- o
|