/* called by: entrance ctrl of the object 'track'
( q! S: \. h" ]*/
' A# s8 f0 `5 K7 \' A$ \is4 J) S% Q* v2 C9 [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) v4 Y) M0 Y. T: z2 L* U4 Qdo
. q. G" x+ K0 Q' n7 Z T Lan := rootfolder.Internal.Tools.AOLlanguage;
2 F' ]( v- {% Q8 l q( {! \5 E if current = @.Destination -- else return
' p$ Y1 O% S9 P, @) r then
+ A1 w( j9 \0 w7 A$ o* b+ {5 l @.Destination := void;
! @) r! d O" y if @.occupied then1 \- Y' C( v6 d3 g
part := @.cont;% @+ |6 \( I$ L" Y6 p: R6 ^- B
@.transpOrder := void;( u! V9 F3 c, W# F. o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ d8 T2 }5 I3 O; b" f8 W$ x
@,root.eventcontroller.simTime);/ I) i3 J' r7 P0 _) C
@.HasOrder := false;
% u) D7 Q- b7 @ S @.DrivingHome := true;
+ |1 i$ Z: w$ E( i! ]* g7 C! y rgManager.tryToStartTransOrder;3 X- X& p4 P5 S6 L
if @.Destination = void& F8 @5 E8 J" }! I9 P' B
then -- no transport order for vehicle @
# U t9 B1 f# Z2 k+ S5 i @.Destination :=3 ^7 Y- z6 d3 }- W& v& ], h
rgManager.nearestFreeStation(@,track.~);
5 u& a8 Q! G# P7 [ newDirection(@); & b6 |$ ^5 J# O' T
if @.Destination /= void then
3 }- N& |8 @9 w. o( X @.Destination.NumReservation :=. y) ]( e7 V% Q8 T
@.Destination.NumReservation + 1;+ u6 n! U' H9 L- | {
end;+ S u$ ~" H Z, v7 z& k7 k
@.CurrIcon := "drivingHome";
9 y1 `1 v8 k4 M; l; _: ]! _8 F( H @.DrivingHome := true;
) J' k: V V( A K end;4 {5 k$ [# X( t- C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 Q; }& M& R2 H) }) A$ P& X6 Z3 i part := @.transpOrder;
% N" Q1 I! L9 L& k3 G part.move(@);-- load part5 l& y( R* H* k0 @0 l) A5 k
@.CurrIcon := "load";
1 V V9 x1 x) f9 Y" z! v GlobalDistObj := part.globDestination;! a2 t. u/ [( Q+ r3 t
assignLObj := rgmanager.rgAssignL;0 _( {, a3 F, u7 R( X s) m6 V4 K
row := assignLObj.getRowNo(GlobalDistObj);* B& V; L6 s' B5 P4 \/ t3 \8 ]
if Row = -1 then -- since 70+ Q# K% N8 Y7 h" b
if lan=1 then
% P* t. L. A+ |7 }/ S) H: q: u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: U! t, c- C3 V! u' `4 Z; Q. w% {
to_str("in der Andockstation: \"",?.~.name,"\""));
2 `+ N- P3 u: O) f* ? else. x( i8 h% j% ]& x3 i# j8 X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& n, i- l e% h+ S* W2 d6 l$ Q6 W7 J
to_str("in docking station: \"",?.~.name,"\""));
" K) F8 @, K$ Z7 y end;' y/ i4 a7 A# U Z+ x3 l2 u
else0 `% Q/ Q" [1 { K; ?) l# [
@.Destination := assignLObj[1,row];
1 ?, |1 ~8 r$ A end;
% {. Y! Q& Z' S1 a6 c( u* y" W* I newDirection(@);( Y/ G2 _+ ~2 X" ]
@.HasOrder := true;) v! E9 x: F7 Z
end;* n W4 O5 e# S& Y2 r
end;4 j; O3 n' k& ~1 r
end; -- of the method! R" \- m4 k: K2 f+ o7 Y% i9 |
|