/* called by: entrance ctrl of the object 'track'4 c# W- }$ L- E6 ]2 M. ~
*/
+ w" j- s5 o$ `8 s6 P9 ]& ]: }is/ ^% y6 }8 ^# \, C& x( Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 ~6 ^; _6 I- ^* W! ^do( z5 y+ u$ H0 G( h9 z8 w$ ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
, t! W6 m9 `+ N" z# m9 L( A if current = @.Destination -- else return
9 f$ s5 x' r$ ?; X, [! t* A( W then J; [! ]& W4 z
@.Destination := void;: q7 ^2 g B: z7 K; [* l
if @.occupied then
( ?; X9 ?& l6 \( u part := @.cont;6 Y; @5 X+ l5 o/ G, F
@.transpOrder := void;
# W; e: t' {' s( g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ a( q- |* {$ n7 x' E, u
@,root.eventcontroller.simTime);
* S }2 O, c7 i6 d, p @.HasOrder := false;
7 y! G9 }& @5 ] |. P @.DrivingHome := true;
2 M) ]( N9 [ F" a/ H rgManager.tryToStartTransOrder;
+ C- ~7 U4 R2 H& |3 o- { if @.Destination = void
9 o( M7 k2 m, X" i" [& W8 |. [ then -- no transport order for vehicle @
" {% C. j) c; b n @.Destination :=/ O; f" [" o: m) W
rgManager.nearestFreeStation(@,track.~);
: E" l' |0 R7 u4 o newDirection(@);
/ H7 I, K& s S. Q4 z$ ~& o) ^3 m if @.Destination /= void then
4 J8 ]8 D F- t2 `! v @.Destination.NumReservation :=
- \( Z! P* j1 E3 A+ G$ k- \# B n @.Destination.NumReservation + 1;
# E5 `! F5 ?0 t. T6 m& b, I5 x; b! W end;
; X( B# E- T) B- k @.CurrIcon := "drivingHome";
, m4 [1 B, B3 ?" M @.DrivingHome := true;( t% }$ s8 V5 G, w
end;
( X6 P4 D- w) d" M! c" B( _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 L( `! J+ v5 P, G( \1 E part := @.transpOrder;$ t# @1 N- l- H
part.move(@);-- load part
o1 m3 M4 N+ ~# ?3 i9 k @.CurrIcon := "load";- c3 r, J* W) G' a7 c) O8 n
GlobalDistObj := part.globDestination;
4 T7 P" |( x$ X% k% n7 X/ j4 D) u, h assignLObj := rgmanager.rgAssignL;
3 ~! d8 ?8 g' [ row := assignLObj.getRowNo(GlobalDistObj);/ Q4 c1 i: g0 {! E
if Row = -1 then -- since 703 }% i- V- Z/ S1 ~/ J
if lan=1 then
. m5 E/ W' q3 l, r- H# t a" [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( c0 o% b0 x2 p* `. F
to_str("in der Andockstation: \"",?.~.name,"\""));
& x- o' o4 l+ ~* L* g- V else
3 @. K- `+ j+ v3 F8 q- K8 K/ i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; @4 H( K- A/ W$ Q to_str("in docking station: \"",?.~.name,"\"")); 6 N7 C- G: H0 w' i" q% u
end;, ~. y C0 u0 _. A% |
else. P V6 R) I0 w6 D% g% S
@.Destination := assignLObj[1,row];+ w7 a# J' C+ K7 r1 c0 X; ]
end;
' d3 X0 d+ Y* B" \ newDirection(@);
) K: x8 d1 \/ b4 T; j @.HasOrder := true;2 Q9 D9 M8 ]2 m
end;
3 c' f: A9 e8 u1 e& U5 q+ c; n end;
1 n8 e0 a9 P- P% C* eend; -- of the method
$ n8 H& ?) M6 }2 n( ~: V |