/* called by: entrance ctrl of the object 'track' `# R0 B4 K5 e
*/8 ]+ O* H4 ~$ \- v9 n' C: @
is2 L1 p! ]. Y4 B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, M% a8 a5 S |, z `* e
do
" A* j9 R+ s( V4 O$ ^. X Lan := rootfolder.Internal.Tools.AOLlanguage;
7 m: R. Y- @0 V3 E if current = @.Destination -- else return! A2 j% A0 N/ i9 C# P
then
1 { P6 ]8 _. L( J @.Destination := void;( @2 Z" E" b" D8 P
if @.occupied then
0 T+ b: N- o" C8 r+ ] part := @.cont;
3 K/ m. X* \5 @# k @.transpOrder := void;: `; k$ Z# J( [) \% W/ K0 b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* \9 {9 N X$ S1 J X3 }* I- d
@,root.eventcontroller.simTime);$ m7 x# x+ \3 H" b/ g9 Z
@.HasOrder := false;
7 { ?+ M% ], o' n @.DrivingHome := true;2 _/ p% B: y' p, N5 I+ ^6 I' t' p
rgManager.tryToStartTransOrder;
) Y. R0 {. [/ _1 [9 @7 @ if @.Destination = void" l2 {) _& Z, M% i
then -- no transport order for vehicle @
& A5 q; r& ~( \9 H @.Destination :=
% A3 m8 E o6 m rgManager.nearestFreeStation(@,track.~);, ~ e) Z6 L+ ?7 b: y+ g
newDirection(@);
?0 q' ~7 P1 z, R$ r if @.Destination /= void then
: X% N6 L# ~/ x# f0 F7 n @.Destination.NumReservation :=
2 t+ P" i* T: @5 |" K @.Destination.NumReservation + 1;2 E6 k" B. |) A& ]6 E% w
end;
2 O1 x3 ~1 l3 ~# V; T @.CurrIcon := "drivingHome";
7 y6 g6 @1 u2 T( ?: k @.DrivingHome := true;
& Q3 d1 @* P5 I6 I6 \5 _ end;
6 c: [# n; v( P1 d* ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 p6 |" a/ b- p. f& \ part := @.transpOrder;
9 w- i# \7 q6 e; b" _" ~ part.move(@);-- load part1 Q7 @' e0 N- K" k! r
@.CurrIcon := "load";
* v) C O5 `1 ^8 m GlobalDistObj := part.globDestination;. L) Z7 l; S# r% |& d1 b- b
assignLObj := rgmanager.rgAssignL;
8 c w% |$ ~2 t: M" Y. ~ row := assignLObj.getRowNo(GlobalDistObj);
; {4 G e4 U6 T! v _ if Row = -1 then -- since 70
# d3 e3 r g0 f5 a5 x# i+ y if lan=1 then
) s+ Y# _5 N- G; h, ~. W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! Y! |1 s& z% \ to_str("in der Andockstation: \"",?.~.name,"\""));
# s/ p6 {, U% e) O5 ?* o else
3 V/ m: d( c, D4 t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( d& q' G# o; A* j7 R. \# Y/ G to_str("in docking station: \"",?.~.name,"\""));
2 A* b6 q h) f" X- v( k% v end;
0 a2 n9 a& x# T* E else5 c) B" L# d, N! z5 V- q# ] b
@.Destination := assignLObj[1,row];
: L6 M: d/ [& n: j" Q5 w& M$ [+ D end;
* G0 M) v3 x5 s t+ t5 U1 i$ O newDirection(@);0 z, w5 E% e5 w4 c4 o& N& f/ C/ k5 R
@.HasOrder := true;2 ]: k" h6 u0 [7 R
end;: j1 g$ ]. R W8 K7 u
end;
3 S" P. H0 q" U; W; {+ `/ Pend; -- of the method5 G- N% V; {& f7 ?9 ]8 f: n
|