/* called by: entrance ctrl of the object 'track'' T3 O/ {( v, o6 f f
*/
W$ w" m( {1 e x/ T0 f8 f Pis! h) z6 z9 r0 B- M5 C% D" x' b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& ?+ W" X, z0 C1 D" hdo" K7 ?5 g$ g, X( V5 N4 q
Lan := rootfolder.Internal.Tools.AOLlanguage;7 N& Z0 n; R- D0 m ~
if current = @.Destination -- else return1 \$ }! f! W( E) k9 @# E6 J+ F
then# Z4 b9 l7 r* K, W9 V
@.Destination := void;
. ~/ @! z4 k, R4 I+ ` if @.occupied then' e: j5 W$ t$ X5 C) h: _# g' x$ z
part := @.cont;+ @( k1 }# C9 u
@.transpOrder := void;# h* I7 `0 f# ~& f* b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: P A7 l. a* q% s) B& H$ ?
@,root.eventcontroller.simTime);
, f6 M/ w; ]- p6 g$ c' A1 D1 @ @.HasOrder := false;4 Q2 U [- _! U8 D
@.DrivingHome := true;
/ O# l% j) L+ ? d8 M2 u' A rgManager.tryToStartTransOrder;/ U$ b: r6 x4 z$ h4 @
if @.Destination = void n( Q) h# W& R, O3 t3 a
then -- no transport order for vehicle @
8 X. V! I! J( S7 K/ s8 w$ x @.Destination :=0 C- p8 f- o$ t1 e
rgManager.nearestFreeStation(@,track.~);
6 j$ |! n* y( s newDirection(@);
' S" T- a Q& Z. ?5 b% N) h) J if @.Destination /= void then
, N' i* }7 b% c. [: M5 s @.Destination.NumReservation := \' G6 M6 b. N+ Y$ Q& Q
@.Destination.NumReservation + 1;" I. o& H \2 F8 _. ^/ |0 F& J
end;
5 s& H1 T) t; |# J+ U, \ @.CurrIcon := "drivingHome";# i0 U0 `, _( h4 U' m
@.DrivingHome := true;
) a: Q: [) e, q1 Y( u. r end;1 `0 }) Y. ?+ q( O6 z8 r- ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) L2 y' [6 f8 j/ @% a i part := @.transpOrder;3 L. Q: `6 }7 X6 [$ ~9 Y
part.move(@);-- load part
7 F; k# v; P9 ]! r2 }8 { @.CurrIcon := "load";
: ]3 i/ u/ s/ ^4 R GlobalDistObj := part.globDestination;2 t9 d, ]( H2 u( m& O* S/ @- Y: {
assignLObj := rgmanager.rgAssignL;% I& ^9 l* H3 N( E
row := assignLObj.getRowNo(GlobalDistObj);
, n7 q# x' ^* h$ x; v9 V8 i5 p3 ` if Row = -1 then -- since 70
+ x6 l9 i9 d4 R5 N, w if lan=1 then
1 C! ]2 p2 i4 [9 M m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 H8 @5 K; o. h% } to_str("in der Andockstation: \"",?.~.name,"\""));7 h8 z" j: ~( ^8 K: o2 L: Q
else
7 m/ i# e3 w& |' G W6 M; W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 [* j" r0 P6 ?) k to_str("in docking station: \"",?.~.name,"\"")); 2 i/ M: p1 o/ I% v- d! Q3 D
end;6 ?% v# n# H9 m$ o F0 K
else
2 ?1 o& @& O. E I @.Destination := assignLObj[1,row];+ G; t& X d. L+ T
end; 6 J+ {! M9 \% @) X& N1 ?
newDirection(@);
7 V2 r6 L0 j* J7 v9 M @.HasOrder := true;
' j6 [4 w8 {( u3 L end;
# ^2 X) ^" r P end;3 i; t |5 C) ]2 c9 z; q/ W0 i
end; -- of the method
3 s0 k0 h7 L- i2 V& q |