/* called by: entrance ctrl of the object 'track'
0 Q9 S- G4 i U1 g$ X*/
2 D6 Q, ^" p0 k9 b; ^3 Wis; Y8 o9 _- G" o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( Y$ w: t$ k8 m# v d5 | o _% h
do
# R/ F% |2 [4 r# k% e! D- ]& X* F Lan := rootfolder.Internal.Tools.AOLlanguage;' w; O$ y# T) T; ?8 E
if current = @.Destination -- else return
) {( l5 ~9 d! f1 N: `/ d }$ h- a then4 r* p( T5 C+ J9 }+ k
@.Destination := void;1 j3 D3 a$ f* g3 E, P
if @.occupied then4 ]2 y6 E0 ]: k& r4 L
part := @.cont;
1 s, J4 B' Y% L7 D7 r @.transpOrder := void;
6 S# {, C; z ^1 H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, [% o9 H+ c2 |" M
@,root.eventcontroller.simTime);
3 Q( A, I1 \0 p) x @.HasOrder := false;, J( h4 c, W; B
@.DrivingHome := true;
6 b* U! Y7 A( I- a" b1 T rgManager.tryToStartTransOrder;: R2 {. M- P8 r- g# v T( }7 {& x& W
if @.Destination = void
! j8 a; X0 P I2 Z R3 B then -- no transport order for vehicle @
* K4 D. ^8 V- y) J: d- X @.Destination :=
3 Y& D4 O+ }% x) d rgManager.nearestFreeStation(@,track.~);2 ^0 t1 a8 `) l
newDirection(@);
! x$ {% ]8 M" X" l if @.Destination /= void then V6 d+ \2 t3 o
@.Destination.NumReservation :=" S+ Q3 ]& s/ w6 h" V# ?4 D2 S9 ~1 w
@.Destination.NumReservation + 1;7 P6 T+ x7 l, B6 D* P% G, ]- ^
end;
' n- s1 F4 U/ p9 G/ y& k+ Y @.CurrIcon := "drivingHome";' a( B) t. Y* e& Z: F2 l! e. h
@.DrivingHome := true;
/ N, c+ j$ v$ f1 i end;3 w3 R( Q4 ]: Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 D, B/ k C4 a* ? part := @.transpOrder;
# o9 l4 d" N) j5 s( Q part.move(@);-- load part
0 L+ h r. @( G% D1 o @.CurrIcon := "load";
" M* ^$ {' n' b8 d# y: X$ v GlobalDistObj := part.globDestination;
! t4 L- }: H$ G assignLObj := rgmanager.rgAssignL;) I% C9 Q, a8 k+ ?, K/ g
row := assignLObj.getRowNo(GlobalDistObj);
: \6 l. U4 m L2 Y2 b) G if Row = -1 then -- since 70. D# m5 e( u7 v( k7 v% W
if lan=1 then
. q$ \( o- M% X3 Y+ r! m, f; S, P: ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 D6 }) U+ K! Z* W
to_str("in der Andockstation: \"",?.~.name,"\""));$ V: u! o+ U$ h. c) f- @" [
else
- X. V- Z* @ z/ c2 d5 { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 J9 O$ l8 Y! f4 i
to_str("in docking station: \"",?.~.name,"\"")); ! M1 _8 |5 D6 E: k2 c( Q
end;
8 k+ a4 v3 {6 a- X else
+ I4 X4 |3 V2 p9 G+ d1 Y @.Destination := assignLObj[1,row];! G; J8 e% Z9 v, ~; a d k
end; % a8 q5 i) y' V
newDirection(@);7 y2 [# e# V3 a8 p2 ~
@.HasOrder := true;
" h2 \' O# j: V. j8 E end;
" S/ ?! C% Q4 N, p1 g2 E end;
( i, P, |; _ Y# C. v1 x1 qend; -- of the method
6 A/ R# l+ T! {9 w. c7 g. { |