/* called by: entrance ctrl of the object 'track'
: n/ i j+ D2 t6 c: O. Z* G*/
$ B- B7 e# }' K T2 A Zis5 w, e0 y. x4 l* Q6 _' d" K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" x3 `. V& k6 t. T' ]7 e
do
) f8 o( ~1 Y6 p. D$ U Lan := rootfolder.Internal.Tools.AOLlanguage;( o; ?4 E2 U/ {* E0 Y# N( s
if current = @.Destination -- else return3 a6 d* U4 I- b/ Z, E3 |
then4 l+ H; [, L0 q: |$ M; Z& G7 Q
@.Destination := void;
0 ?: c J: G5 U7 L6 t8 U e if @.occupied then
+ `* I& H% z) s' X part := @.cont; \" E: J: e- f! U0 N/ v
@.transpOrder := void;6 P) ~. E$ {9 k2 z( S# L5 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& V0 l; j7 N& ?" e1 s+ j
@,root.eventcontroller.simTime);
+ T4 O4 p, s( ` @.HasOrder := false;
: l* T T t2 w @.DrivingHome := true;- Y9 K0 g+ l+ c4 G5 [+ O9 V9 p6 W
rgManager.tryToStartTransOrder;
5 ~4 p- f. l' _1 D( P! O. X if @.Destination = void- @/ [* n2 v/ Y5 W8 x: L, {2 I
then -- no transport order for vehicle @. M3 V ~2 k1 _3 K
@.Destination :=: ]3 F- \6 g1 M& K" j' C
rgManager.nearestFreeStation(@,track.~);( E7 G$ K& N( j. }
newDirection(@);
+ W8 b; p7 E4 Z7 A5 v% r9 \1 I if @.Destination /= void then
5 R1 F; q" d7 k# g) _ @.Destination.NumReservation :=1 w" r% C. o: p. ^' F# x3 \
@.Destination.NumReservation + 1;
+ E H+ W) Q& F, W( ] end;$ I$ _6 m' [3 }- H' F
@.CurrIcon := "drivingHome";9 f% {9 H1 h! P ?
@.DrivingHome := true;2 Z g; ]5 w! Z4 e# p6 Y
end;" r$ v* P3 o$ R0 w% |) C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# g/ O$ k4 A3 s2 N! f. w6 q part := @.transpOrder;6 ?5 }2 u9 K$ J7 N: w$ r- ~7 U
part.move(@);-- load part5 v' |+ G# |; ~; i! K [
@.CurrIcon := "load";
6 O: U2 V: R! ^" ]9 J4 j* m' S' u% q GlobalDistObj := part.globDestination;$ _9 |' |; k# N8 w9 e
assignLObj := rgmanager.rgAssignL;2 `7 a2 a2 a4 h1 Z
row := assignLObj.getRowNo(GlobalDistObj);2 D1 _5 ^% s9 `# U
if Row = -1 then -- since 702 N0 }+ e4 \& |% n! W8 J; H
if lan=1 then
& g) v2 E2 Q0 m* o% L0 N) C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 @: ~) n1 [! ~0 B9 P
to_str("in der Andockstation: \"",?.~.name,"\""));+ w V* Y0 x' y" n. }* }0 \
else
/ k6 ~/ o3 ^$ N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; o0 z& p$ E4 O2 N8 ^0 c! U
to_str("in docking station: \"",?.~.name,"\"")); : I0 f, Y* r- |4 X# O: Z- }3 U- u" [
end;
' _ k4 S) B7 Z9 \ else' ^$ n3 T# r/ |% Z4 j
@.Destination := assignLObj[1,row];9 \6 O0 s, z$ i; Q0 Z; n* B4 S0 V
end;
% h6 S! u0 x* G- p; G1 |- K newDirection(@);9 X1 c) O# t/ z' o4 A' V D$ n& F5 `
@.HasOrder := true;
# h( @' Y L c8 q8 u) m1 @+ c end;: n7 K1 N" ^7 e7 X0 ~( b
end;% W( n$ v9 h8 R
end; -- of the method5 D& @4 O! p0 L- V- H
|