/* called by: entrance ctrl of the object 'track'
# y* `2 R. i6 Y0 R! n*/3 G4 v5 U' G. W2 a
is
" z) `6 l7 a" W3 i4 C# O3 P: X: ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;( m) ~7 f7 @6 v( r
do
; _9 i M8 W/ ^+ R" Q( _ Lan := rootfolder.Internal.Tools.AOLlanguage;# Y1 c$ B; N) k
if current = @.Destination -- else return
_& A; S# E( X2 F7 w) I then K5 G) k# d* j! G; ^2 [+ |3 S
@.Destination := void;0 [% e$ g8 X, V) F3 S
if @.occupied then' ^" m @# X& V" P/ H# m$ q* H
part := @.cont;; Q& h ~4 q7 f& W# V, D- U
@.transpOrder := void;
' E, {. u+ v- X. ]2 X; B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 s, f. Z( v# f* \; t, v
@,root.eventcontroller.simTime);) f' ~3 g# F! j- @" B! V! n
@.HasOrder := false;
' a' k% i% v+ D& a ^8 k5 _ @.DrivingHome := true;
+ A8 O M; l# O& \ rgManager.tryToStartTransOrder;
) O$ Y0 N ?: m$ O- q if @.Destination = void
. j3 i8 n# _5 c5 j$ ?8 u" g8 t then -- no transport order for vehicle @
( a2 f( L) p% L3 k @.Destination :=
0 {$ d' g {' E5 r- T& }" D2 T rgManager.nearestFreeStation(@,track.~);- j, @" P+ L4 O
newDirection(@);
) M0 l, \9 e8 m' p4 f) u: q7 V0 r3 q if @.Destination /= void then! O# s# m: a4 `: ~( L
@.Destination.NumReservation :=
. R5 e: R+ X% }8 O @.Destination.NumReservation + 1;
7 S, q* K2 w# `: ~ end;; U4 ~; [4 z+ K- N
@.CurrIcon := "drivingHome"; t; b5 u0 n3 G! [$ U
@.DrivingHome := true;
7 T7 w, q% u2 p& ~- d/ P end;
! T* [# O4 ~% A2 k) t1 r else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 c; e; b+ W; M$ r8 v1 D7 x7 m' n
part := @.transpOrder;4 L6 ?' L: b0 M$ d; g* X; Y
part.move(@);-- load part, Z* d+ J& B& I
@.CurrIcon := "load";8 G) x- s, @8 G3 Z
GlobalDistObj := part.globDestination;
/ Y D ^3 Q" n7 J! H; L$ F: d8 ] assignLObj := rgmanager.rgAssignL;
; K# E+ a% Y, p4 t% h- h row := assignLObj.getRowNo(GlobalDistObj);
9 h2 c P9 z) e+ ~' \7 h if Row = -1 then -- since 702 v* @' _4 \4 n
if lan=1 then" \, K$ h5 q6 j2 v" k* l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," \7 i5 ^! a6 G* K) P [1 A- Y
to_str("in der Andockstation: \"",?.~.name,"\""));$ A$ H, s0 f8 x6 ]0 k0 ~
else; ^7 l! w' }* _9 Y# O- g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ F4 U. g* z( e
to_str("in docking station: \"",?.~.name,"\""));
$ R8 b/ F+ |$ }% O! b# ? end;8 t2 Q. C, a$ V3 T, h" m2 H0 Y
else) }% }. b+ `4 Q0 H' N" |8 B- c# D
@.Destination := assignLObj[1,row];
' p" H. e! u( f! C7 @ }2 d+ @4 D end;
% H4 y8 v# I$ Q8 T) m' X( o newDirection(@);
+ w# }3 v& N, \# U7 w$ B9 b* D @.HasOrder := true;
6 Q7 }5 I9 G9 {" m end;
: o: i4 U! J" \ end;
1 Z- S( v8 {2 T) F6 _$ Kend; -- of the method
9 t# S7 w' A/ b" k |