/* called by: entrance ctrl of the object 'track'
- [, e' K6 k1 [5 D, K% Y* D) A, Z*/
; y$ X4 e$ @9 C6 u$ {; F+ tis7 d* @5 j' F, C# |! I% X! M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 W- Y5 u1 M: r9 V l- g& V1 v8 Mdo
1 e0 _. c" s7 E, a Lan := rootfolder.Internal.Tools.AOLlanguage;5 o- c d9 @( M6 {- K
if current = @.Destination -- else return* J* d% Q. X4 M/ R
then
! q: V1 | {4 C( q6 V4 c6 m/ ]/ b$ T. _ @.Destination := void; X8 \) ]+ I9 I; n
if @.occupied then
% j+ `" P% |, Z2 P+ ]% h6 l% r part := @.cont;% n9 L5 V. W3 ?( E4 N l3 y+ ?1 M' c2 H
@.transpOrder := void;. ~8 z m$ V7 s0 H. h: n0 l3 _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# v9 }& z& X& Z8 ?
@,root.eventcontroller.simTime);
8 i$ X$ ~9 f' s# y @.HasOrder := false;
1 j; b. w- k+ V1 ?* b' x0 s5 k1 j @.DrivingHome := true;2 M# f* E+ |4 S4 f
rgManager.tryToStartTransOrder;
# V, ?3 K5 @/ L z if @.Destination = void
s: S1 Z) [* [8 i; o then -- no transport order for vehicle @
4 h+ ]( ]( z: V8 [: g; C @.Destination :=
' Z5 R6 [1 c! o3 a8 R5 Y- F rgManager.nearestFreeStation(@,track.~);
7 b/ \& N" t9 q8 M! O1 X$ c& x' u newDirection(@);
R9 W3 t, `. i8 ]- R! |' S if @.Destination /= void then
h% R5 W, L' r) q6 M @.Destination.NumReservation :=
+ Q/ M1 i/ W* y0 }5 C6 h! _ @.Destination.NumReservation + 1;3 ]: l( F6 m5 }6 f! `% {7 E
end;
6 g9 N- x- W) X; {- Q! i% U' G @.CurrIcon := "drivingHome";
# @0 ]# m3 L0 ?" S6 ?/ o/ T5 D @.DrivingHome := true;
- r: V) t* o9 ~7 \! ?1 ^ end;/ H8 M3 P) R/ X& ^: u0 ~7 W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) O5 r7 p" n: d9 G2 T% V part := @.transpOrder;( l* s, G5 q' W' S1 Q' d, Z
part.move(@);-- load part6 ?' M W9 J& r5 Y
@.CurrIcon := "load";
8 i6 E8 h$ t) h" Q `5 o0 \ GlobalDistObj := part.globDestination;
9 s/ u& [7 F6 C3 o6 @5 g assignLObj := rgmanager.rgAssignL;
# g3 q$ }0 q, l) ]* e3 K row := assignLObj.getRowNo(GlobalDistObj);
6 m* |) ~2 L( O' A6 H1 u if Row = -1 then -- since 705 P- H9 |# `1 k4 P9 l f, P
if lan=1 then
. {, J4 e {8 x3 _0 f' N ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
_0 M U- \- A# z$ H to_str("in der Andockstation: \"",?.~.name,"\""));4 H# W( p3 u# V
else
! W1 L, @& H2 R/ M4 v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 m$ P w9 ^/ o' G" W; N to_str("in docking station: \"",?.~.name,"\"")); & |# a# X& Z& s& O; ]& J- @
end;
7 l' E" r& x# Y+ N8 M9 o6 U else
6 Z7 X, s. ~3 Y2 N& C7 m, i$ N6 z @.Destination := assignLObj[1,row];
& c3 F9 M" \( u& I6 B end;
( ?: S* v4 p/ x7 r. @% G newDirection(@);- X6 `: \6 { q) Y! A
@.HasOrder := true;* J+ S) {, g: \' ?3 f
end;
$ j2 x# K( v% q0 h! u5 p# x end;
; H& F2 K) X) @9 X L5 }: ]1 [1 mend; -- of the method
+ X1 R1 z; q* N |