/* called by: entrance ctrl of the object 'track'5 u. d% F5 q/ T& } L. ]( o8 Y; P
*/& @: A9 t$ p" q
is j: A( \+ s; a; L5 x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; [2 k8 e" \# ]8 d% n( ^do0 g& C( E* W) E8 x
Lan := rootfolder.Internal.Tools.AOLlanguage;2 Q' F/ u9 f z4 Z! u
if current = @.Destination -- else return
R: U4 p, S* k v" D then
) `# t; m# o. h; C) k$ B @.Destination := void;
% {7 M5 Z( M. w& R if @.occupied then
! F; i( l. H' c% ~* C E9 |1 p part := @.cont;
. s: ?" E1 u3 c* }/ u3 M* e2 i @.transpOrder := void;$ w; _" S5 s% R/ h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 \* b) F: D, G! l* F/ ]2 L1 I
@,root.eventcontroller.simTime); j/ i/ i/ ?: n6 h2 R+ A; G0 a, O
@.HasOrder := false;
8 r9 e) R% p. m1 t @.DrivingHome := true;
% E, G/ ]0 H- g/ Y rgManager.tryToStartTransOrder;
& s# F d1 l# c9 y if @.Destination = void8 Y2 ?8 j: I; ^8 S3 l
then -- no transport order for vehicle @+ E- e) h* T! B2 B
@.Destination :=
# K+ N0 j+ ?, N rgManager.nearestFreeStation(@,track.~);
j9 e( ^8 f6 K0 { newDirection(@); & `+ F( ]4 k; \; [" c) v8 |6 e+ {
if @.Destination /= void then
( h% P( N ]0 X @.Destination.NumReservation :=5 i$ G/ M; V; W) s* D: y
@.Destination.NumReservation + 1;
' U6 _" S5 [# w) ^! B$ c end;
3 m }* M+ j" Z* ? @.CurrIcon := "drivingHome";
0 ~8 P1 y) b5 r1 X @.DrivingHome := true;
! m% m( h0 j s' c end;
1 ?; G# [* k& t: v3 n9 g+ m else -- the vehicle @ is empty, both vehicle and part are in the same dock station- Y3 H6 p/ M) q. h
part := @.transpOrder;
: K3 [& W% Q! M' a1 j part.move(@);-- load part1 ^' P( o* s- `, f7 \
@.CurrIcon := "load";
6 j! u5 ~& n' }: z: @- E GlobalDistObj := part.globDestination;
- p# d* L( Z1 o } assignLObj := rgmanager.rgAssignL;+ q4 _$ Z9 D. l2 S6 {
row := assignLObj.getRowNo(GlobalDistObj);
7 [& u* r& ]/ M8 p- w if Row = -1 then -- since 70) Y% A, K, u& U. }/ O8 [) H" @& `
if lan=1 then$ ^9 J2 Z4 e T+ c. f5 ^# [ P* I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 |, A4 Z6 c o to_str("in der Andockstation: \"",?.~.name,"\""));
4 D3 ^) C2 n# v4 R+ @, K else s* k. C" X! X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 @. v) F4 ^% a0 l$ E1 m to_str("in docking station: \"",?.~.name,"\"")); 4 Y) {$ h( g& k8 S9 E" f/ P6 S/ Y
end;
( t/ O5 v. \% z else$ ^6 o+ ^8 G% k6 q. r
@.Destination := assignLObj[1,row];8 `% o$ g3 p- Z6 @/ G
end; % M* R6 `$ y* B! L, @; X3 G9 `
newDirection(@);
$ D2 `2 P0 _) g$ X+ e# p1 S- A7 ` @.HasOrder := true;7 w3 n; k/ W/ Z4 C) s
end;
* F& D$ r$ X7 y9 Y2 ^: p* h8 h i end;/ R" h. ?0 O, M5 X2 Y
end; -- of the method+ G1 h5 K% y. B0 r7 c: O
|