/* called by: entrance ctrl of the object 'track'
' E1 ~, m4 d9 E5 x5 p*/
4 T, t3 K3 q9 N" R, M1 D- @) ~; Ais
' Z' X. B$ k" F! E+ r) D part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 D8 _! ^5 N: ]) [ qdo) L1 _- d" T+ H( q1 ]/ ]
Lan := rootfolder.Internal.Tools.AOLlanguage;+ H" k2 @4 _4 ]* a2 j' u0 _
if current = @.Destination -- else return/ i, C# x7 |3 ]& Z: G) r' H
then
% {" K3 _. Y) }' X% A2 k: D @.Destination := void;
( s, T p% G( s. X7 J" z/ K if @.occupied then
; K$ _) t1 ^% T9 t3 z2 \6 D part := @.cont;7 J) C) v3 D1 t- s) g
@.transpOrder := void;: e: I0 P' {1 D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; U( W4 n$ d/ o# F$ p$ Y
@,root.eventcontroller.simTime);
$ @+ `, i% O% H+ G9 Z4 g. ?. K S @.HasOrder := false;9 y/ l7 s. ]1 |: p
@.DrivingHome := true;
# d* C) Q2 } g. X rgManager.tryToStartTransOrder;: z# ]& R3 ]( X! z' @- k3 x
if @.Destination = void
7 _, M" C4 b+ e) J# M then -- no transport order for vehicle @7 C8 I1 g" Q j( U4 |; c! }1 a
@.Destination :=6 q4 e8 A7 U9 m' i4 T7 g2 O) `- e
rgManager.nearestFreeStation(@,track.~);. }( G6 G' y: u4 }- K a7 p
newDirection(@);
6 \. \' V* c5 z7 R1 G if @.Destination /= void then
( p+ p7 i* A7 G+ k% s @.Destination.NumReservation :=
; W" E5 u) b& Y @.Destination.NumReservation + 1;8 r, J4 J6 Z7 l+ Y5 g
end;: f8 y+ R6 l2 x! [$ m( F( r
@.CurrIcon := "drivingHome";$ P8 A& P, i9 |- A. L1 F
@.DrivingHome := true;
) i* x& _' |) N( { end;
" k5 \! R+ P. u+ T1 U: q9 p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- D. ]6 R8 f0 c6 \2 P) X6 r part := @.transpOrder;
+ q( R' h* ]. S0 K8 N part.move(@);-- load part
9 H- F4 F: T) _& k, V q @.CurrIcon := "load";
) L9 _! h$ u) O# j GlobalDistObj := part.globDestination;
, e. K6 ? e1 ~! ]+ P assignLObj := rgmanager.rgAssignL;
q: C- ]0 d6 F+ D row := assignLObj.getRowNo(GlobalDistObj);
' ?+ Y0 l) W! f8 x if Row = -1 then -- since 70) f. d* t, N: m
if lan=1 then
! D+ t0 v+ w2 n2 Y ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
H3 R6 C: L3 W3 Q1 J to_str("in der Andockstation: \"",?.~.name,"\""));9 [4 ] s: ~" R6 b$ S: C0 f
else
" @% v" \% V, l1 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. C$ Z; k" [- o3 a
to_str("in docking station: \"",?.~.name,"\"")); ; d7 l4 }. f: p+ g* A @
end;4 ]$ q4 Z$ M, w0 I, Y( y$ z
else
0 g% a2 I" O' \. n# \/ I @.Destination := assignLObj[1,row];; q1 q0 w; j. S" ~
end; 1 X1 U. V5 |" }- O9 f" Y$ _
newDirection(@);
+ ?5 t% @% n- S' p @.HasOrder := true;
5 V0 s9 _! d5 `; v0 w$ Y j end;
* T. v/ M$ B# y& z9 w0 d: U0 l8 b6 q% { end;
$ F/ w+ E: S3 X/ `3 Q% yend; -- of the method
+ i; T/ L; x- I% f4 l+ T |