/* called by: entrance ctrl of the object 'track'
& D) e( r, x- Z m3 j$ \0 U8 }7 b*/. M5 l2 A# Z J: \- w
is2 G5 E; M/ z9 k# D; ?: c& W. r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) } a1 a" ]+ x! H
do
& s% s3 e# I+ ~5 m$ {1 d% [2 D Lan := rootfolder.Internal.Tools.AOLlanguage;3 n( q- f4 X6 z1 w
if current = @.Destination -- else return, V% t# H! a8 ?) p* Q
then$ ^: u" @- Z3 u! o
@.Destination := void;
/ O( m! j4 {) m- M* `: W if @.occupied then
% ^7 g. k1 h8 [' O1 }, ~# }9 N part := @.cont;
4 e. N, t H) r6 m) F; Z @.transpOrder := void;7 f$ Y, ^! p6 [$ ]8 u- \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 P7 ?- d. X# W+ @8 P9 p" b9 v$ c @,root.eventcontroller.simTime);
2 S! L& c' T) n' w* T( l, { @.HasOrder := false;8 `+ n, U) b, c% O
@.DrivingHome := true;
6 m5 \+ Z4 U8 X; r3 S: b5 @" B rgManager.tryToStartTransOrder;% F7 J+ D1 R$ g$ {: Z9 }' G
if @.Destination = void
/ m* X7 e8 p+ `# t" ?2 H4 k then -- no transport order for vehicle @* i, v; W2 j1 w( T3 g" A: L8 ?
@.Destination :=
9 i' W2 T$ S; D% |) Y rgManager.nearestFreeStation(@,track.~);
( E z6 A. e; Q, E newDirection(@); . h0 c7 D3 i. l8 q) p6 B7 S
if @.Destination /= void then/ w" q c; \9 u. @7 O8 {; J- A/ V
@.Destination.NumReservation :=
0 n; H! i1 w; v5 ~$ k @.Destination.NumReservation + 1;! K, o$ B' [0 I; V# b9 q: G
end;
, D5 _: V4 P/ `0 _& V( Z. t @.CurrIcon := "drivingHome";
3 ~' L: [9 a' G- G @.DrivingHome := true;
/ w& j+ \/ @! y0 U4 @ end;
% `. W& m. i! e else -- the vehicle @ is empty, both vehicle and part are in the same dock station
@& y# Q' M) ~/ S: v3 T) | part := @.transpOrder;
- ~9 q: [' q* K$ _8 ^ part.move(@);-- load part7 e5 K2 [5 E% E$ j v
@.CurrIcon := "load";
; M) d8 d7 R) b0 Q GlobalDistObj := part.globDestination;
6 Z9 B F. Y9 v6 C$ M assignLObj := rgmanager.rgAssignL;- _/ s6 ?7 s U' i
row := assignLObj.getRowNo(GlobalDistObj);
, ]! n3 {+ e, u8 k( j+ N! j6 i" p if Row = -1 then -- since 70" B! Y# e" v/ i
if lan=1 then
0 F! a1 I8 H. I- m7 n9 G4 H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 z5 `( K& L( c4 [# c
to_str("in der Andockstation: \"",?.~.name,"\""));& t& ?/ e8 h* s( a* \
else0 Y0 k& V& s/ V* g/ C' C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- X/ I( j5 ]. S/ O
to_str("in docking station: \"",?.~.name,"\"")); % s2 s+ T/ _" n
end;6 |' M9 `1 Z9 V% m
else
3 I2 ]" Q J& R/ L9 {% o) N @.Destination := assignLObj[1,row];
1 K" \% l6 y: h, O! Y% Q! S. l5 V end; * C) C' L$ ^. K1 f6 k3 O* g
newDirection(@);
; y* F' N' P' p @.HasOrder := true;
' e- E+ _' D* b9 e8 H" Y end;& W3 R) O# m8 u! O% {3 e
end;
6 ^6 [% O% [. @$ iend; -- of the method
% M* l# ?! X9 A- A3 I |