/* called by: entrance ctrl of the object 'track'
- ]' T4 [) l* N; y& ?9 G*/
0 g D9 q, d6 `! Iis& u7 y; U+ g# P( J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 l$ M& F' w8 Vdo
6 o6 }3 K( M# D% Y W1 b$ y$ @ Lan := rootfolder.Internal.Tools.AOLlanguage;4 _" a# N k. W# m, w+ M
if current = @.Destination -- else return
& X8 ~8 F6 Z6 i$ f6 _: f then
- \0 `# T5 \9 Y8 U6 P/ S. ~6 a1 \ @.Destination := void;8 {. ?- g) Y! l6 E' m2 R
if @.occupied then7 w" g/ z. z; q4 @$ t U
part := @.cont;
% }3 _. W1 c$ C# [ @.transpOrder := void;, x3 f0 K) k- @9 W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) U9 u8 B6 E+ m% l' q5 b3 r+ ^
@,root.eventcontroller.simTime);
. [2 J: y* t) l @.HasOrder := false;
# B" c G5 x2 A, I# X) K @.DrivingHome := true;$ J9 C3 V3 {: i
rgManager.tryToStartTransOrder;! S/ c% b- P' k; f$ A; X
if @.Destination = void
7 |0 S# y7 r- p' d then -- no transport order for vehicle @
: ?- K+ M9 {' l/ G* _ @.Destination :=
* M! B8 o$ v& N# A6 \$ ^ rgManager.nearestFreeStation(@,track.~);1 h! u( f- I ^" P
newDirection(@);
. e* Q# [* V9 d p- A \ if @.Destination /= void then% I; Q) s5 |4 N8 ^- F: G! q
@.Destination.NumReservation :=& h% Y7 \: D* ?) b" Q0 h/ u1 K5 i& p
@.Destination.NumReservation + 1;
. n M, t+ t6 X end;
; Y5 B7 B {; L5 }$ ? @.CurrIcon := "drivingHome";9 `, W% ]% O( ^/ b
@.DrivingHome := true;4 H' H& }5 }3 _0 U3 d( i
end;! A' v7 h8 f0 A1 J, @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 m# o& s% q' H: q& @# G part := @.transpOrder;
. o. X* b2 P5 S( \9 [ part.move(@);-- load part
! `' J9 p% `% C3 a" g8 x @.CurrIcon := "load";
2 p- e" o6 W- O& i GlobalDistObj := part.globDestination;7 z+ r& Y2 w- K s
assignLObj := rgmanager.rgAssignL;
6 Q/ M4 e! M; D- Y% }) i+ M8 a& ~: }# D. | row := assignLObj.getRowNo(GlobalDistObj);: k! Z8 M$ x# o
if Row = -1 then -- since 70% h% f* H s% b# v& z4 J
if lan=1 then
/ ?* O' ]. @# h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 ]' v$ D& K. A. `. M
to_str("in der Andockstation: \"",?.~.name,"\""));
5 V6 e# X( J$ A5 I else
) h3 o) o8 [0 X+ y$ |! W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ h6 B; k: x w/ G. }2 U to_str("in docking station: \"",?.~.name,"\"")); , k, H/ N1 ?' B& y0 F
end;" G4 ]* Y( c i7 A6 ]$ T
else
+ f- Y7 D) p9 H R6 k8 q4 l( k @.Destination := assignLObj[1,row];! B6 w& F5 @3 v6 e. D b0 D
end;
. p& R' _7 p& a. {, Q; c* Y newDirection(@);
1 J$ S* t+ M, L @.HasOrder := true;
5 F r+ V1 F3 G! z( h5 ~ end;3 O7 ]4 Y! k9 {/ K# O5 W
end;' Q& t- A# x% q* O
end; -- of the method
( T+ O! m( E( V- y0 Z0 F4 X- k/ g |