/* called by: entrance ctrl of the object 'track'
# O& Z6 J/ n1 z6 P$ Z8 I*/
# |8 N8 J& }- k! m+ C2 o9 ]* @is
+ M4 x5 q3 K8 X4 f. N" F; h/ F9 _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 ~3 E# h9 s# }0 t- k1 S: H
do
6 x( ^+ b( M* ]- A; u- ^ Lan := rootfolder.Internal.Tools.AOLlanguage;
9 a( t: J8 ^: s6 U4 S; { if current = @.Destination -- else return/ |5 N+ D# h! C9 a, z
then0 a1 T" u, c5 M A# P
@.Destination := void;
# j$ q( E* A! X; V$ m" b if @.occupied then
! R, x( j; [) }2 c part := @.cont;9 g) X" W# {: p
@.transpOrder := void;
0 b; S8 n- s" |, J- ]9 p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* t, _; e% i5 A9 [9 W* | @,root.eventcontroller.simTime);. w m5 D0 @7 z; d5 ~
@.HasOrder := false;
1 X/ e" {: [/ h( `5 f% s. s @.DrivingHome := true;
: _# i5 s3 U6 a& o& k- F3 a rgManager.tryToStartTransOrder;
" k3 V2 }& j& o+ k if @.Destination = void4 ^4 d4 h' W9 m+ Y! n& \4 i
then -- no transport order for vehicle @
: T0 W6 t1 E$ p* z( l1 {! n @.Destination :=: d7 _+ {! K; y& Z I1 Y
rgManager.nearestFreeStation(@,track.~);2 a4 r5 |& r+ x* G" u5 L
newDirection(@); * Q8 b/ c g# E- U) N! j9 W
if @.Destination /= void then( e* v6 C2 H5 |9 s) P
@.Destination.NumReservation :=
+ y: C" K% J* S8 F @.Destination.NumReservation + 1;0 ]' w6 h1 a; h( I& C( n4 }
end;
6 p. `; u& \ H* A$ m8 ^' a @.CurrIcon := "drivingHome";: C6 G. Q7 F' Y) H
@.DrivingHome := true;8 S& D5 I4 }0 `- F; q0 D$ M
end;% b8 w1 }# @+ B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 {; z' U- g8 c, w' ?& X! T part := @.transpOrder;$ o6 E: g+ j2 b4 F
part.move(@);-- load part( k- b# Y/ n, q
@.CurrIcon := "load";
0 M6 ~9 S8 x* m' W Z1 x: F GlobalDistObj := part.globDestination;4 A, N$ ^& k* W9 h1 `+ U
assignLObj := rgmanager.rgAssignL;/ @! J3 j- O7 u5 H# T: f7 i
row := assignLObj.getRowNo(GlobalDistObj);' f0 ]0 u9 `" w/ n
if Row = -1 then -- since 70
; j! z9 W+ R) q" O# }! p+ z& [ if lan=1 then5 I' r6 r [6 _, \! D! Y+ I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# h5 N( ~* L6 J7 ?, K to_str("in der Andockstation: \"",?.~.name,"\""));: L, m4 v: w; o8 R; i d& {' n
else
4 I; N! e/ Y1 L) l- e7 n& @ n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
c5 |! h( c6 P, M8 E8 P; s6 X' j) H# } to_str("in docking station: \"",?.~.name,"\""));
1 X+ d+ _2 }. Y. w3 U end;
) t' q9 g8 n5 T# Z else8 \( f4 G$ F3 T! b3 `, g
@.Destination := assignLObj[1,row];
7 K+ ]- z; G! ^ end; + z/ J7 K& K" S8 ]! T( v
newDirection(@);5 j7 R' a$ _$ a; p9 `
@.HasOrder := true;0 X6 P6 r6 C& z R4 Z
end;% ^; b$ z3 L" ^6 h
end;/ d2 W7 G9 ~5 }
end; -- of the method- d' h$ k% P# K$ k
|