/* called by: entrance ctrl of the object 'track', [# C% a; T- H/ N2 m1 @& P( L& |0 i3 J. b
*/
8 N5 E! l$ n9 Y2 U( q. |is
- s5 I$ _, q$ K8 j" ? part, GlobalDistObj, assignLObj:object;row,Lan:integer; G0 [5 r6 J- G9 H; |- d
do. A9 q! n9 E6 T0 o6 N! e
Lan := rootfolder.Internal.Tools.AOLlanguage;7 U$ z' R/ ?1 M, j! I6 ^7 O
if current = @.Destination -- else return
2 S/ K b* K: l1 U. G. p4 | then3 [$ j1 Z: T3 b( L" T5 @
@.Destination := void;. E( r. b+ S0 b5 J! g
if @.occupied then. x3 G4 i! V* \/ i) _3 r1 {, {
part := @.cont;0 I4 m! Z/ L9 b9 O# |1 h; X: T
@.transpOrder := void;
6 `3 B1 G W2 e1 L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 |' l p0 A% k; f) } @,root.eventcontroller.simTime);
$ I: o! `, O1 @& K. o5 C @.HasOrder := false;
0 A# s, h) T9 }! r2 x# _ @.DrivingHome := true;
! T( t% X/ ^9 l3 T) y1 M9 N# o rgManager.tryToStartTransOrder;
% X V$ w, b0 E, A if @.Destination = void- r8 Y% x3 @- @/ q7 h8 B. e1 \( ~
then -- no transport order for vehicle @+ I& f: |+ T0 }* K
@.Destination :=
8 u4 Z6 |: s3 i5 n4 |: ?: X rgManager.nearestFreeStation(@,track.~);2 s3 ?: T$ v( [9 ]: L
newDirection(@);
. X# a6 N! s0 i$ J7 i if @.Destination /= void then
. C" _$ s3 N5 n* ~ @.Destination.NumReservation :=3 \. h/ o2 |7 n8 l; f; f9 u
@.Destination.NumReservation + 1;1 U$ h9 V* a% K; r& Y
end;! L4 }3 W8 u# H: k' |$ a# e$ i
@.CurrIcon := "drivingHome";
" J& e* @7 a" e4 X0 X/ _2 P @.DrivingHome := true;& I6 a: }3 Q; w4 k; d& K
end;* \ r3 J, m6 g2 V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ }5 w, {8 k# m" ~2 F _, L# C0 y part := @.transpOrder;( P* k+ a; K9 n( x6 K
part.move(@);-- load part; z& ~! u% E/ q
@.CurrIcon := "load";9 a1 G }4 P T
GlobalDistObj := part.globDestination;
' k [& e( J6 ^: M _' R# Z6 w, r assignLObj := rgmanager.rgAssignL;4 ]. z8 l9 w2 m4 b; X( d
row := assignLObj.getRowNo(GlobalDistObj);% L# m J) }/ d/ M5 D
if Row = -1 then -- since 70
' T7 f( d9 O* W8 O h9 L: Y if lan=1 then
& M) [+ U) P+ @0 ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 u+ u' k4 T9 }
to_str("in der Andockstation: \"",?.~.name,"\""));. A3 y! ~& C$ g" K9 Q8 w
else* c& c7 O" W7 Z: g7 U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 }) c, F3 S* u0 g4 Z. g
to_str("in docking station: \"",?.~.name,"\"")); : N; J; `+ a+ Q3 X
end;
) S1 w R: t p$ V% y8 v5 ] else* Q$ T2 G [& \. ^1 e$ A, B) z5 K
@.Destination := assignLObj[1,row];% M, f4 R$ h4 Y: {$ M9 `
end;
" c$ Z' ?$ ?1 X* i: k: h newDirection(@);
, e: B* z P! [) K, m& \, r @.HasOrder := true;2 ^: P. R9 U0 ^& X" E6 W
end;. z& y* C/ V4 ~% K, l& E1 [
end;' q/ \% L3 q2 S+ v- }$ ~; ^9 q
end; -- of the method2 u7 u" B. D ~1 a8 l
|