/* called by: entrance ctrl of the object 'track'! V4 s: q% B9 r
*/6 D q8 `# C/ J" C& A
is j" X+ F7 Z! y' r; i: j, O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
I; y7 N( t D _5 p/ rdo) J# K1 ^. \* D" e6 B; R6 N
Lan := rootfolder.Internal.Tools.AOLlanguage;
. E- {# S; G! M3 g( K) K, ?1 Q/ z& \ if current = @.Destination -- else return
2 `6 x4 [9 L3 Y. l0 B. R; u, w- ] then( V/ ^ I1 Z2 e$ S3 ?/ p* d
@.Destination := void;
" f2 [& n5 K* t# a% D if @.occupied then
8 d/ \( H- c3 e) X! y part := @.cont;
, ^, ~1 S+ l" ?$ w! J, r, ^ @.transpOrder := void;+ j' |8 X2 q7 Z1 y( f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& [7 q/ F# t$ K- H) v
@,root.eventcontroller.simTime);
7 o" s Z6 T3 `# Q @.HasOrder := false;
% A0 W5 e6 ]' s- F/ B2 N @.DrivingHome := true;
8 b+ e$ L7 j* h; u. T rgManager.tryToStartTransOrder;
& L% \% ]; Q; P5 E* X0 H if @.Destination = void
/ Z0 Y. j* c; T k0 `6 S then -- no transport order for vehicle @# s+ r" ` x. E8 D- {7 e1 o7 }0 ]
@.Destination :=
. B' b1 L7 h; A0 |* x# M, ^ rgManager.nearestFreeStation(@,track.~);; V$ @, B2 Z2 b- q4 \# L( o( |( _8 L
newDirection(@);
5 ?2 V; U1 t! B2 h3 b& B, N% ] if @.Destination /= void then5 ~- H& F, F! }
@.Destination.NumReservation :=7 ~: g8 r- l5 P% `
@.Destination.NumReservation + 1;
) a5 ?5 |' @3 r9 a0 f0 \7 M3 z end;. D; R7 E2 M2 B/ X
@.CurrIcon := "drivingHome";
- \$ \* G7 e5 E7 O9 S% p8 K @.DrivingHome := true;8 p$ p8 D5 Q5 i
end;5 z' e1 i/ I/ O2 t4 k- L4 t2 @0 j2 l& Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 k$ { W' j( b# G3 r. t" S
part := @.transpOrder;
4 {0 @( Z, H) o part.move(@);-- load part
* o7 ?1 ]( \0 j @.CurrIcon := "load";0 x: ]5 l5 p: b& P( y
GlobalDistObj := part.globDestination;0 @4 l3 q( F$ @2 Z
assignLObj := rgmanager.rgAssignL;6 p+ y# }+ g. t" r" y
row := assignLObj.getRowNo(GlobalDistObj);' d0 V' l9 R7 p- e5 ]/ s
if Row = -1 then -- since 701 a" G+ Z/ ~6 o/ U ~. T, H, w
if lan=1 then: d% ]9 Z+ u* L( Z8 @3 ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 l6 Z( W: C; u- w, v8 a+ I, b to_str("in der Andockstation: \"",?.~.name,"\""));
3 y; k8 ^% u" H' S+ J) j else ]- c# V6 s6 V0 e7 u( G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: ~" n) q' u. ^3 m" D
to_str("in docking station: \"",?.~.name,"\"")); : v" m! T: y( ?
end;6 h2 D, B1 k- C
else; n( X7 H! h; A R' Z2 T3 t
@.Destination := assignLObj[1,row];
9 A& D5 e2 i& K end;
6 m f6 u! ?4 F" h5 ] newDirection(@);. z' c) v/ I+ h/ | L7 Z ~/ [
@.HasOrder := true;
7 F- o& q( k+ I7 ^, h end;$ @& K: T% |/ G$ d/ h# h
end;
, ~* O2 e" G1 ]2 i& W. ]/ vend; -- of the method
* c: T$ W) L- ~) V; ^ i |