/* called by: entrance ctrl of the object 'track'
; F5 c/ U/ L' i) {5 O*/+ z% S5 o2 |% g6 ^8 P8 O: F
is
/ @: Q( Z! T! M" G, q part, GlobalDistObj, assignLObj:object;row,Lan:integer;) x6 Q- g6 P3 Z. K8 d
do1 [! E \; E6 ?: L, S% B+ r
Lan := rootfolder.Internal.Tools.AOLlanguage;) h- |2 L1 d; \. Z
if current = @.Destination -- else return
( |( c9 ^9 k5 v4 R then7 c2 a: ]7 R5 F' m8 u* a* P
@.Destination := void;
+ j* n; R7 e5 @ if @.occupied then
# f K# r6 \; {% ]! g5 ` part := @.cont;
0 R, j8 Z" \: t4 k2 i& Q# b @.transpOrder := void;
" t* U% Z% ~$ {7 F. p$ o2 V* | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) a" H7 p9 [' P+ k9 o: e8 G @,root.eventcontroller.simTime);
$ M8 M3 v* w8 w: s; _ @.HasOrder := false;
R+ g0 \( z; e: e8 n* p g1 z @.DrivingHome := true;; `2 M I- K3 |
rgManager.tryToStartTransOrder;
* w- K* N) [: S! P if @.Destination = void
9 L; N+ h+ }( _ K* z2 d then -- no transport order for vehicle @1 i8 f( h3 e4 r, \ J) ?
@.Destination :=
* a" b7 h* `3 d0 d: N rgManager.nearestFreeStation(@,track.~);
?2 J: g$ o2 [% B; E! `8 _ newDirection(@);
6 {2 b( O b5 { if @.Destination /= void then) p% I$ Y$ I/ Y0 i+ J1 a7 }7 h' C
@.Destination.NumReservation :=
4 Y9 K& A8 S: ?/ ~, Q/ k @.Destination.NumReservation + 1;
7 ^0 U; y: p3 v1 Y) K" v end; I. W; ~/ V* K2 J
@.CurrIcon := "drivingHome";7 Q' G4 `( h; k; O9 H
@.DrivingHome := true;
& G3 a' z' `! s1 q6 q end;
) T* @( ^% x( y7 G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ i' K8 ?/ B- b! }2 m* s3 f t- f part := @.transpOrder;
# ^* u U4 H) a' q part.move(@);-- load part
1 ~# a! I; F: @1 R @.CurrIcon := "load";
, ~' ^% c L9 z4 B( I GlobalDistObj := part.globDestination;4 |2 X: W4 u4 u$ x- k! b
assignLObj := rgmanager.rgAssignL;
, x( t! |& |6 I row := assignLObj.getRowNo(GlobalDistObj);* z' X" e; K1 m- R8 X/ O! Q( ~
if Row = -1 then -- since 70$ Z- F( E! n' p. ?/ _
if lan=1 then
8 | N5 t% U% C0 A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- I; b! T, a* K3 h6 i. P to_str("in der Andockstation: \"",?.~.name,"\""));" p0 T- e+ @4 z9 z3 }5 P
else- Z5 A* D" [; K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: X& q5 O" J. h- F b+ B to_str("in docking station: \"",?.~.name,"\""));
U8 g8 q* j8 Y: K) _! K2 B end;
: l9 y# u6 r' S) c7 B. y+ Q5 `7 m else5 Y2 Z3 ?' Q% Y) G& m
@.Destination := assignLObj[1,row];
' k% W: g& h# ?/ D* z& U; w9 t/ z end;
! D2 H. }4 N9 t5 K! i3 M newDirection(@);
* Z: @, d/ T" y. n @.HasOrder := true;2 f. h; c6 V A) T, L( N
end;
$ F) j% I1 H$ ]' ] end;/ ]. a: W9 H- I+ M
end; -- of the method
) L- d- l9 ]8 @2 X5 N |