/* called by: entrance ctrl of the object 'track'
) Z$ }2 Q$ p' g! n( b+ e4 w2 u*/
7 T) c4 M! d6 Q5 l7 T8 S: N2 Mis
3 Q% S; O& Y6 J8 y$ w* Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 @& U3 \% U/ k& A% ^- Jdo
. M* F" b, j U Lan := rootfolder.Internal.Tools.AOLlanguage;- y9 u. [. w8 e5 u
if current = @.Destination -- else return
& w* i/ N/ W2 }4 ?! b then
7 b/ x. _" U3 ?' B5 y' X, S. W @.Destination := void;
: K+ ^6 @+ f% v6 f2 F if @.occupied then
9 i/ q- w( ~! i2 \& f# e/ W part := @.cont;
2 [6 ?' N+ }% _9 i; [+ ~ @.transpOrder := void;
0 t, s6 W. h/ i' E$ q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, F9 K3 O/ y6 h9 t7 L: z8 X
@,root.eventcontroller.simTime);; l* R+ z) p2 S0 h3 X; w
@.HasOrder := false;
* K$ a7 d4 |! |6 q( q' y2 H @.DrivingHome := true;3 N% j, D5 J5 e2 }, A7 {
rgManager.tryToStartTransOrder;
+ T7 r' H) k+ \ if @.Destination = void) p% c8 C* K0 H1 A. z
then -- no transport order for vehicle @* z) Z: A6 v5 M* D' I
@.Destination :=4 L7 C( G4 m* V
rgManager.nearestFreeStation(@,track.~);+ s6 f! e% p$ W2 e. ^
newDirection(@); 5 j Q/ \/ ]; s! I
if @.Destination /= void then" ^4 k" [- l: @2 t% @
@.Destination.NumReservation :=
1 a0 b# O; l4 `$ b/ `3 L% p @.Destination.NumReservation + 1;
K3 u! }5 e t end;
& i$ q8 j' S2 w4 h# `8 E e @.CurrIcon := "drivingHome";
. l0 B( `& T6 d7 z; L l# W0 Z: | @.DrivingHome := true; P9 V" z; g4 r i6 C
end;; F& N0 H% P1 } A( c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 |+ ?( |' B2 H# V! ^ part := @.transpOrder;
) Q5 v6 l, t; K% O part.move(@);-- load part* l% C7 ~5 I; O0 l) W) b2 X3 s; y
@.CurrIcon := "load";
' P: r& J+ A$ \+ e; V' m. X GlobalDistObj := part.globDestination;* Q$ S6 G! d* i6 o' s+ ?. A. C2 |
assignLObj := rgmanager.rgAssignL;
" n! ~* Z s+ y7 @. W8 b, _ row := assignLObj.getRowNo(GlobalDistObj);! k' ]: p0 X1 H3 y3 L7 z
if Row = -1 then -- since 70
$ [+ l! Y* k/ F' P3 E2 R6 h if lan=1 then+ B F1 ~6 j# O' K# Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ r; @. w, z7 K0 h. S9 I to_str("in der Andockstation: \"",?.~.name,"\""));: T r7 O3 e& f B X3 [
else a0 u) x3 q; C u7 Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ n# I, M6 i q. ?6 e9 z! E$ t to_str("in docking station: \"",?.~.name,"\""));
& b. i3 m( u# K, E8 z4 q' t end;
6 Q2 i7 A6 k V: E" }! U- U else
0 I4 q4 v7 E, K& C+ Z% E8 [, u @.Destination := assignLObj[1,row];
' H2 @$ y/ U: F2 |( ` end;
( l: y& ]3 v' K% [0 p( r9 l newDirection(@);
+ V5 o x: z/ p* s @.HasOrder := true;
# d: f" t2 e0 b9 ] i0 i) g end;8 P5 V/ k0 K5 i9 O+ _
end;
3 }( a1 J5 E* Q9 r. Wend; -- of the method
) g0 ~+ l# q. d! w3 H( j |