/* called by: entrance ctrl of the object 'track'% N. K: ]" O4 S. w- o P$ \
*/
2 \- A+ _1 @8 o5 `! O% \+ G6 vis
. B! c9 R6 K" y3 | part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 S: @* S/ W& @0 L/ s9 }do, ]* C7 B5 T( m3 Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 T [0 H4 e6 E( O4 i/ K6 B; B if current = @.Destination -- else return
" @8 k5 K. ?- m3 u$ e' S then
- R/ l. \! ~. R3 O8 ` @.Destination := void;, u- r5 T9 [: J; k" ^
if @.occupied then
# q* o2 V) J9 a }) M part := @.cont;
7 u6 y$ {3 I8 X9 R; n2 ] {7 c @.transpOrder := void;
. N9 ^9 b4 O$ P$ }; w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* |3 b Y6 ~# k1 r7 T' q @,root.eventcontroller.simTime);
5 x/ m* `2 S' L O( q* Q- F @.HasOrder := false;
* A1 R) J4 o- R, H0 }3 [0 _ @.DrivingHome := true;
5 u1 v8 U E+ c. V* d+ T/ K rgManager.tryToStartTransOrder;9 g! ?, @3 e+ W
if @.Destination = void
1 V. ^6 A+ f, k then -- no transport order for vehicle @0 e/ L3 M: C9 k( Y2 ~
@.Destination :=. V7 g+ G4 p1 x# r
rgManager.nearestFreeStation(@,track.~);
0 x3 ^/ E) y& B, R2 H: W9 j newDirection(@); ! D6 M+ F' V5 }7 _& t: \
if @.Destination /= void then
" }- I2 v( \" G6 m5 t2 { @.Destination.NumReservation :=" e$ u" m8 U4 U3 c
@.Destination.NumReservation + 1;( _9 \, K# a4 ]' Q" m0 k6 P( q
end;* H. t5 H* w; s# K! |
@.CurrIcon := "drivingHome";
0 o- Y0 [8 |6 s3 Z8 D! Q @.DrivingHome := true;
( x: D3 m/ i8 M' ^+ }$ u end;
6 r4 x" ~7 F" a! w/ w+ i else -- the vehicle @ is empty, both vehicle and part are in the same dock station% |3 v6 P# |2 C9 S* K9 s/ I; k$ h
part := @.transpOrder;
0 m8 z! s5 e$ e# M# m7 B part.move(@);-- load part
! H4 @* P' [( S* @) G* Q" ^/ A4 q @.CurrIcon := "load";4 d6 g* _7 F2 _7 v+ M2 l& B
GlobalDistObj := part.globDestination;) w, l8 @4 P' b4 j
assignLObj := rgmanager.rgAssignL;& R7 F: d, i, ]3 m- {
row := assignLObj.getRowNo(GlobalDistObj);0 d ?' Y0 x+ L) A& h
if Row = -1 then -- since 70
% B' `* m5 R' i) h if lan=1 then
+ @6 c* m6 g+ c8 { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, m) z( V! S; ]4 A8 v
to_str("in der Andockstation: \"",?.~.name,"\""));
# q( d# n$ y% @) u: S: w R# O else. P1 W8 n+ @) A) d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ r; G X6 |1 V# l Z- U
to_str("in docking station: \"",?.~.name,"\""));
/ t" U% G* z2 X: p' N% g end;3 g' N/ B3 o1 ~5 ^) M3 l' ^
else! r% q1 L9 a9 F d: G, p5 I- [9 h5 O6 |5 S
@.Destination := assignLObj[1,row];; w' m0 J& V+ \7 ?# r, g1 r3 |
end;
+ n3 H/ O5 T3 C+ B- e% g- d newDirection(@);# ~0 w: }# Z/ }& V2 o( `( V
@.HasOrder := true;+ ?8 u* N: t4 M! x7 E5 L
end;
, b- h( U1 S8 i: V5 W# D! b; i7 o& Q: | end;
|* h f; H! t9 z" V9 L$ Jend; -- of the method2 e3 y, J3 @5 G5 ~
|