/* called by: entrance ctrl of the object 'track'
* G2 n8 y; G) F9 i- Q0 ]" q*/
$ z# B) F: C4 b$ L3 Bis
# ^* w( A( y9 D, n0 j part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 ^2 K- z& Y+ F2 N" C+ ?9 m
do# o) a& k, x U
Lan := rootfolder.Internal.Tools.AOLlanguage;/ B0 s9 F% @3 m2 p
if current = @.Destination -- else return
, F4 }: t0 c2 \; i then% f: s" W8 ?) ^# I
@.Destination := void;
3 v f# ?& r/ W- w( v if @.occupied then
' s: f7 X1 @+ Z part := @.cont;- ^) F% w5 M, K6 s
@.transpOrder := void;
7 F6 s5 U# J4 _: ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( {* t& }$ ]1 C
@,root.eventcontroller.simTime);/ W- G4 k5 E/ r2 v) X& J
@.HasOrder := false;
5 D: X/ N H0 j @.DrivingHome := true;2 R% t- w0 U) M
rgManager.tryToStartTransOrder;
' `) h1 }9 ^0 p) }' d# ` X+ k if @.Destination = void
4 n! h; e+ m/ L0 C) Q& T1 V then -- no transport order for vehicle @ {( A7 I+ \( O: t/ P
@.Destination :=$ f' M' @( e% W1 Z y3 }- W
rgManager.nearestFreeStation(@,track.~);7 ? \( }/ T1 d @/ S3 H: N; D
newDirection(@); ; T; v8 n& w8 L+ p! t7 R0 {2 L
if @.Destination /= void then5 I7 Z; l1 L" ]; i0 T" J
@.Destination.NumReservation :=' R' a+ E0 e2 h2 y0 {/ e
@.Destination.NumReservation + 1;* P6 J$ e+ l. U) K6 Q
end;
W- }# Q0 t6 x y1 s+ i0 A% B7 k1 z @.CurrIcon := "drivingHome";' _% d2 V' t5 k# E/ C3 h
@.DrivingHome := true;
! x6 h- D5 S$ f end;
4 y: Y( v, t" n" V% `7 N; ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ `0 F' k% C$ P6 A: C
part := @.transpOrder;
1 w3 K8 B5 \ ]3 @7 k3 z l part.move(@);-- load part4 u { R3 A8 |" A w, N
@.CurrIcon := "load";
. p+ h! v! \7 l8 G4 Y7 M( ] GlobalDistObj := part.globDestination;; v l8 k) s8 J* v" P
assignLObj := rgmanager.rgAssignL;
/ W$ _9 e; [& s, n+ z; Q% U row := assignLObj.getRowNo(GlobalDistObj);7 {3 H+ a4 | U8 F. P2 |: n
if Row = -1 then -- since 704 s% h& o& m& Q; |* Y+ L
if lan=1 then
' |% A8 X8 s: p. c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 Z' t& X! v8 l9 S0 X8 B
to_str("in der Andockstation: \"",?.~.name,"\""));
2 X! L) W& F2 p$ J) d7 H4 ~1 D else
% l: W, p: v! P- r! ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' }4 ?* w% O( Z( z to_str("in docking station: \"",?.~.name,"\""));
, [4 L( I3 s/ I, U2 \" ?7 `: { end; m+ q9 C8 ~) Z5 M; D5 i
else" j3 P) h- o. d. }" J" w
@.Destination := assignLObj[1,row];
8 R8 Z& w, R. P: \) } end; 8 s% Z1 Q0 \3 N* H) K9 F) k
newDirection(@);
0 K6 L z) L) w- ~ @.HasOrder := true;/ b; w0 x# @) {8 P; I' t- U
end;
; `- I- C2 ~5 A- a9 i end;
. {' V2 A( i1 D) [! H( o, Uend; -- of the method
5 a! D5 Q$ z5 H- G V/ z |