/* called by: entrance ctrl of the object 'track'5 l3 q5 e* M5 F+ U6 \* _ ^" t( K. s
*/
* q1 W8 T i- u/ i5 I: Q' ais+ g/ V" h: D! [, g' `0 I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- A: z% f6 u: g! G. ?
do
3 [! [( M, Z4 P. k" K+ L P$ {. p' ] Lan := rootfolder.Internal.Tools.AOLlanguage;
+ h8 u s; R6 }; B ] if current = @.Destination -- else return x; A y' X5 [- ]$ V! m
then+ i, t- F; Y; m' n+ z& p2 {
@.Destination := void;* t3 {( \8 |1 V
if @.occupied then, [* ]4 u( ^! A
part := @.cont;) {2 m7 g0 x( L/ h) n9 F
@.transpOrder := void; ?5 U. S0 `" @8 V$ d+ @! H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! F% s' _1 s% X" W3 e
@,root.eventcontroller.simTime);
) V1 ^6 e8 Q# }& e5 b! @ @.HasOrder := false;2 S$ Q! S& B2 ]' a
@.DrivingHome := true;
. f" ^$ g+ s1 c) Y8 n& q* {1 W rgManager.tryToStartTransOrder;& P8 i$ R* D/ s6 x2 P- k
if @.Destination = void
# U( z( L( K. t* R% t( X B8 K then -- no transport order for vehicle @
+ q( c1 D2 {% g" u, m" s @.Destination :=: D' ^* w) P6 y* m: A
rgManager.nearestFreeStation(@,track.~);) C/ C2 o2 r+ l' \0 i! [( q
newDirection(@);
" n; o. D7 v, K S$ `1 h3 ~) a if @.Destination /= void then
! i" _' i4 \3 e! F @.Destination.NumReservation :=( T% s0 j3 C, } R6 j/ w/ Y& D. e
@.Destination.NumReservation + 1;
/ o3 g% z3 k( Y6 ^6 Y2 L end;
% _9 i3 {0 j; h% {8 T9 Z6 [ @.CurrIcon := "drivingHome";
; k5 y- H1 x5 @+ g H+ M; W1 s @.DrivingHome := true;
T5 c( `9 e' c- _6 {1 }' G0 E end;
) ?+ S2 A- C2 o- k1 }/ H0 h else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 g5 ~" T1 m" k+ @7 k3 A part := @.transpOrder;$ {: `* n! T- U/ U
part.move(@);-- load part
0 E4 ^, F- G) ^& s& ^ @.CurrIcon := "load";
A& j; ^" P2 v* m: C% m GlobalDistObj := part.globDestination;6 M) {" M/ M8 l4 z& y& ] L, h
assignLObj := rgmanager.rgAssignL;
% p7 Q: J P+ n$ c! T row := assignLObj.getRowNo(GlobalDistObj);% ^- G' Y5 Z6 b2 j) g e
if Row = -1 then -- since 709 _* k% S4 U: N; v
if lan=1 then' S4 Y/ o" ~6 S6 e( r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- N- f1 F* A+ g( C! ^5 q
to_str("in der Andockstation: \"",?.~.name,"\""));$ T0 n' { m. r9 w* B1 t
else
5 V" h7 k7 d# s# }' t2 T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 O: g" @( l# q% g' U$ u C$ M$ P to_str("in docking station: \"",?.~.name,"\""));
0 v% t5 V5 D+ |+ y2 M* b7 R& ^: y end;
1 {4 l" t# L* Q6 g3 V9 \* r6 R7 o5 N else
2 C( Y' `3 g- {( D @.Destination := assignLObj[1,row];
/ e5 z) a# C+ Z/ { end; * |- `, f7 v# k3 T ]5 j9 c
newDirection(@);
& `, u- g$ U# @ @.HasOrder := true;
8 G$ {, J4 ]4 G& M0 s# H) s, C& E end;4 ~4 ?$ L) \, ]/ d; _! W
end;4 N. H, R: D$ A' ?2 Z7 O, u
end; -- of the method' e+ p7 D( O( Y) Z' K/ l( H! ~2 D- Y
|