/* called by: entrance ctrl of the object 'track'2 j5 v. g5 y) F- O c6 F
*/
$ F7 y2 I0 Q% E0 y$ @( pis! v, h9 T4 d8 J6 t* K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" \. k" T% R" {7 U
do
! y% O& E6 T- N, s Lan := rootfolder.Internal.Tools.AOLlanguage;
( B- z6 D+ {; \* W0 x if current = @.Destination -- else return
. H$ ~( T5 M8 Y$ K( u1 V8 J1 b3 q then) U) q2 l9 d' l& z8 _0 b$ J% Q
@.Destination := void;* W5 ]2 T) T6 R6 q
if @.occupied then1 ]9 j. g: i: ?9 R* \( v) d
part := @.cont;
9 z& C3 n5 B) v. K- X% ? @.transpOrder := void;
1 V+ {" F7 Q( c$ T8 t. Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( \5 Z: g; {$ r o/ s @,root.eventcontroller.simTime);
8 Y: {& V' k( A @.HasOrder := false;. F+ t( J7 G* D
@.DrivingHome := true;% ~3 m% f5 k- |6 z+ `9 {
rgManager.tryToStartTransOrder;
8 _- I H6 [6 F" g0 H0 E, \ if @.Destination = void
3 g( Y9 A, ^0 a) u then -- no transport order for vehicle @4 k: i8 F, m) G
@.Destination :=
$ A5 }4 l+ ]9 P rgManager.nearestFreeStation(@,track.~);9 \0 d1 t/ g- t, g2 `7 p
newDirection(@);
0 [0 Z( W* a( D6 g, T( e if @.Destination /= void then
7 x' k0 l4 ]4 q( w, u& t- D @.Destination.NumReservation :=
1 H8 @- e, c* Q3 A3 E2 ^% w- T) y! V @.Destination.NumReservation + 1;
4 n& F; p5 o- j$ ~" z: q; K end;
" X: _$ R7 T5 X! r2 v7 K2 \ @.CurrIcon := "drivingHome";# X$ R% e1 ~" b7 }+ z7 y
@.DrivingHome := true;% x/ t, B8 H( ]9 T) [
end;6 n) X- t! d, ~3 |5 z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' M2 d% ?7 }. l3 ]1 I
part := @.transpOrder;
5 t; y9 v9 [6 X; F: l ^ part.move(@);-- load part
c! [$ p& S2 ^7 }, ^3 u @.CurrIcon := "load";7 A4 N3 ?1 r! j; D6 v2 s0 R0 s& J c4 H
GlobalDistObj := part.globDestination;# { S* l6 g3 u0 d9 m
assignLObj := rgmanager.rgAssignL;
1 ~% P6 Q( N8 n0 z% G% E1 f0 \, ` row := assignLObj.getRowNo(GlobalDistObj);
" ?2 V( `1 L* G7 {- Y- h/ r( e if Row = -1 then -- since 703 Y9 M; h) ?2 A0 ^& W( b3 h3 F, ~
if lan=1 then! ~5 b6 T- Y/ l( {0 @, X: v: m4 S& u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," M+ f; H/ I2 x- c/ x2 d( W
to_str("in der Andockstation: \"",?.~.name,"\""));$ g5 b4 `3 _, a/ O6 r0 j
else
- a8 ~* A8 j( n6 q2 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 ~! v$ s: S9 @ to_str("in docking station: \"",?.~.name,"\""));
0 v5 Z6 I3 r% c! N9 \ end;
7 S( B; i4 `8 P1 y else
; g6 G S @6 Y1 z t1 D' {: b @.Destination := assignLObj[1,row];
3 A7 G, ~) R& L. q7 v end;
: c) W& `, a% P# v newDirection(@);
' M% U. e) f+ Q; J, ^ @.HasOrder := true;1 W& Z4 Q* p' A* |7 K; i) U
end;" e+ ^7 m+ Z0 u/ S: k
end;
% `3 _, I% J/ Y) Bend; -- of the method
! t0 H8 N3 C- ]& ^. o% v |