/* called by: entrance ctrl of the object 'track'" b5 U8 p7 E/ V \7 a6 S9 `+ ^
*/
% @1 W8 a/ Q, Y* t- Ais
+ g0 h! Z$ w7 X1 e- a& r9 T# L8 K part, GlobalDistObj, assignLObj:object;row,Lan:integer;. G+ ^4 r" @% m
do( |9 Z1 R' A) _8 w
Lan := rootfolder.Internal.Tools.AOLlanguage;
& U8 x0 n5 ?$ z" V: d0 p if current = @.Destination -- else return
% Q9 ]6 u: C3 {9 h6 z) G then, f& n, ~, \+ o( n# [
@.Destination := void;1 U$ I* F D" }6 X5 c; x
if @.occupied then
. n' t' B. P2 q, m- _ part := @.cont;
2 O9 y; l, i; w2 ? @.transpOrder := void;# q" ?. y8 f: z9 u b- s, q" j; D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 R3 K0 x% Z6 b& T* X4 [
@,root.eventcontroller.simTime);
. I5 x7 }# Y; t! a) a8 K6 s @.HasOrder := false;
5 f8 `' B0 d1 E# i( g @.DrivingHome := true;
5 W5 H5 `* P1 v# ^& B) Q+ {2 ] rgManager.tryToStartTransOrder;9 ~: s7 i5 n: v) A3 C, I' l2 ~/ y
if @.Destination = void
0 Y$ q% U' W* U then -- no transport order for vehicle @8 r8 @' m( {4 N! H* ?7 z
@.Destination :=
( }3 Q( `4 l1 K6 }5 @ rgManager.nearestFreeStation(@,track.~); Y/ x! b- H. b' z: X
newDirection(@);
" J- e+ {4 g" |. @% _ if @.Destination /= void then- r/ a. M& S1 Q9 s9 r5 V s4 C" w5 t; ?9 t3 J
@.Destination.NumReservation :=
3 m& K6 M9 u5 w @.Destination.NumReservation + 1;/ s! X8 \2 s7 I7 a% c6 ?
end;1 x: h j+ \ S( W R2 f
@.CurrIcon := "drivingHome";
4 h, f* \7 R( S l5 J1 G* ] @.DrivingHome := true;
! z( ^& U. Q; X$ Q end;
8 i- [# p ~: Y4 h! R9 }5 c. h else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 _# P! o2 z* ?2 W5 j# s part := @.transpOrder;
! F/ W+ _3 ]5 d# u6 o part.move(@);-- load part
( Z% A5 W. l% T, o5 A7 H @.CurrIcon := "load";1 n& o6 ]* _ G, ^9 R0 |$ c7 R
GlobalDistObj := part.globDestination;
0 p+ A6 F4 O0 @) n) J4 s+ `; T assignLObj := rgmanager.rgAssignL;
# y ^3 `! ] [1 c row := assignLObj.getRowNo(GlobalDistObj);
; e, e# o3 E. {/ H9 n8 }$ U) R if Row = -1 then -- since 702 d, d4 ^! N+ H
if lan=1 then
8 h( I7 I0 Q6 t# [% U5 u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), H- V1 @' L- \4 _6 {
to_str("in der Andockstation: \"",?.~.name,"\""));
1 Z4 X7 E( \% p9 ~' K/ J+ _ S else
, H. K9 N) F, q# b$ k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) h" A' l- p( r to_str("in docking station: \"",?.~.name,"\"")); - p# E3 ?8 q6 p5 r' P/ p
end;
* i8 o$ Y+ } y8 u$ C else
- a2 m! d- x9 {, t' N5 i3 l: B( U! C @.Destination := assignLObj[1,row];1 p4 q( y' i* O' e0 S2 L# f" E
end;
3 {/ _8 \5 i) b# } newDirection(@);
2 i5 r# z5 |- Q, e: q/ L+ J' q @.HasOrder := true;
( ^( a; }$ R+ S" g: C' c' q/ X0 r+ O end;
1 _) b8 p( ?7 t% R9 f1 ^ end;. H h' `8 Y+ S
end; -- of the method
# j1 h! E- X' O; @) e" }: z |