/* called by: entrance ctrl of the object 'track'6 U* u4 H: ~' ~% J- F
*/! m; f+ Y2 N4 Y6 S- Q
is
4 a% V6 r; v C part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ A5 c- }- `5 W9 c0 @% `
do
6 q# `+ k$ `) b- C. I; h Lan := rootfolder.Internal.Tools.AOLlanguage;
" W) [9 Z I) ?+ a; k$ e! l/ P5 r w; T if current = @.Destination -- else return
0 R5 b* u8 p9 w! O. C% i then% q! v' d S9 e' r5 ]0 E
@.Destination := void;4 p: q! g6 q3 R3 @
if @.occupied then/ s6 e# {& W; |) } T Q
part := @.cont;
0 C5 ]/ y6 ^* A5 ]3 M @.transpOrder := void;6 V% R9 Y* ^0 F5 A# U5 u2 T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," b; H* ~2 z$ T$ _* Y; R3 q' M
@,root.eventcontroller.simTime);
' v, D! D4 B7 w% p- H2 j @.HasOrder := false;% ]) d% z4 C) E3 K. B U
@.DrivingHome := true;
. Z) f, v1 O/ H8 t0 J3 Q3 H0 J$ W rgManager.tryToStartTransOrder;
' s" v. F" p$ }6 @ if @.Destination = void
3 b$ ^2 n/ d. t# g; A then -- no transport order for vehicle @* |3 y# C6 y4 M' J0 x: e" U
@.Destination :=6 r6 t, w) c$ _! m& N4 `/ {
rgManager.nearestFreeStation(@,track.~);
( V5 W' L% B- z+ }' V newDirection(@);
1 X5 Z& I6 p4 h$ j$ j if @.Destination /= void then( \9 I8 u2 H# Q# S% R
@.Destination.NumReservation :=
3 l& \; x6 _- Q, M' r @.Destination.NumReservation + 1;9 h5 T' L( B8 k( v/ z% v8 x2 G
end;/ `2 J3 i0 p, v7 T1 E h
@.CurrIcon := "drivingHome";
* W1 p- ~# G7 I; M; I$ n @.DrivingHome := true;* M5 W }5 m% q0 U
end;- k" ?8 I" Q& N- F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! p/ S8 _9 G; P# v* X
part := @.transpOrder;
" e4 f2 J1 s1 z3 N4 T) d( R5 W5 Z- ^ part.move(@);-- load part* n7 E6 O' z9 B7 v2 [- k
@.CurrIcon := "load";
! H& _1 s& u! v( M- A- z# E! { GlobalDistObj := part.globDestination;' h4 ?3 b4 Z f6 x* I0 X1 ~' x1 T
assignLObj := rgmanager.rgAssignL;3 Z* w4 Z* Q6 M8 {
row := assignLObj.getRowNo(GlobalDistObj);
0 I* M& O2 G' Z. c if Row = -1 then -- since 70
7 _' ^% t, g0 v1 P4 ?" m if lan=1 then: t% w9 O5 v) y% g( I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( h# w( Y4 X+ H8 [* Z
to_str("in der Andockstation: \"",?.~.name,"\""));" a) v: K5 M9 f+ ~! v/ U6 D+ a# M2 H: y
else
; c" u: y' L$ i7 R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, F3 r; @7 W% H' }( E) w+ J: g% b. V, b
to_str("in docking station: \"",?.~.name,"\"")); 9 O3 g) w2 s4 R
end;
Y6 A5 }/ P0 W6 \( f9 _0 ?% L else8 C( Z7 h+ E: X8 `; L2 Q
@.Destination := assignLObj[1,row];+ [$ V' Q9 z m: h- A* p4 c
end;
* k' `% z2 `) a6 _% I newDirection(@);
" E7 ?5 D; K: o @.HasOrder := true;2 X' \9 I- J- l% v' E
end;
1 G3 ]- X3 `+ O5 K( z ` H9 ` end; l& g3 t. R! }9 i
end; -- of the method, C v% r6 K/ Y
|