/* called by: entrance ctrl of the object 'track'! G9 D8 n5 ?8 d. ]" A7 J
*/, {5 a* N8 ^6 V# K
is5 `+ t+ p) v, h5 _8 B$ V6 h' q0 K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) g, z0 r6 @& l {do: P# G( L9 o0 o& d5 T2 A' {
Lan := rootfolder.Internal.Tools.AOLlanguage;) Y" K- {# m, i, l% ]
if current = @.Destination -- else return* l ^4 C3 S, n+ Z1 U& ~& H3 z. C7 J
then
6 {( l7 V. o/ W" t' o) n( \ @.Destination := void;
6 i* t4 Y2 Y2 d1 {7 `# d& c+ T if @.occupied then1 F4 [( |. T; q$ I5 c
part := @.cont;
/ F8 C( ]) j7 g% U$ i @.transpOrder := void;
# Y" ^; c; ]0 N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; [2 P5 r* \3 m- Q+ x/ V$ q0 A @,root.eventcontroller.simTime);! |/ V7 V8 l# Z
@.HasOrder := false;
: L9 m( f. Q; X @.DrivingHome := true;
) Q6 k9 G7 d6 W& `3 f2 f rgManager.tryToStartTransOrder;, f0 Q) U+ M& R: d- [
if @.Destination = void3 W) u% b2 A/ _8 D
then -- no transport order for vehicle @
5 a$ d' b/ ^6 J2 R @.Destination :=
7 ~$ M4 ]( V8 W/ H: l A) G' j" |* w3 B rgManager.nearestFreeStation(@,track.~);
4 X$ o& {9 x! ]/ ?1 J) s9 g newDirection(@);
! J' I$ c3 t0 t$ k if @.Destination /= void then# T6 A4 r& V/ b- b
@.Destination.NumReservation :=+ \- J+ W) K+ \. w
@.Destination.NumReservation + 1;7 c/ Q' p* B+ s q$ h
end;
0 @/ W8 V/ z! c9 k2 j* z# | @.CurrIcon := "drivingHome";; ~# ^ F+ P& _" [# d
@.DrivingHome := true;
' j% m3 P/ ^$ s3 f5 j end;
) ]+ F. r, x" U7 L else -- the vehicle @ is empty, both vehicle and part are in the same dock station k/ X6 h% E" g: _/ ?. E6 g
part := @.transpOrder;
$ o I8 t. i, u. [; v part.move(@);-- load part
, H7 \6 m5 w$ F3 n5 C @.CurrIcon := "load";
! n+ D. P/ L7 w; f* I) w& W& v( Z+ Z GlobalDistObj := part.globDestination;
- `6 H1 L& h4 D" V2 I* O! n8 A/ L assignLObj := rgmanager.rgAssignL;+ \+ U" m$ z/ O4 d3 {! M% I! |
row := assignLObj.getRowNo(GlobalDistObj);/ e: Z5 D8 c d0 a6 C5 [" W6 I
if Row = -1 then -- since 70
) L! R! V# N! A( \$ ?( a* p if lan=1 then
4 B2 x' | l: i/ \4 ~ g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! K8 o2 D# i; S! Q- g' G& b0 l/ R to_str("in der Andockstation: \"",?.~.name,"\""));0 |, Z# d, w2 U' w" I% x0 H. ^/ f) T
else2 {6 d4 T1 `3 F4 n( {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# Q5 ?" U! R. {2 G( W% W to_str("in docking station: \"",?.~.name,"\"")); - m" k: ]% l! |% O
end;
( o: v% N9 [, @. W! v& r5 t8 a else. \+ U; h0 M1 @) I6 j2 x7 M
@.Destination := assignLObj[1,row];
' { C9 P# A* I7 b# x end; 0 q0 n1 e5 l% z2 ?
newDirection(@);
|* I+ M2 W+ T5 S @.HasOrder := true;
# Y5 o" z+ d& U3 C end;
, I, N: g0 `7 p% e$ z/ }: J end;
, Z4 ~( K/ L( D9 }2 I6 n1 W9 Gend; -- of the method
' g# e0 X( P% d7 ]) r |