/* called by: entrance ctrl of the object 'track': n1 [+ Y% g$ l" t+ M. b
*/$ |6 j# m; \/ g- _- x1 F
is
+ ?0 f T- I2 ?, D* K part, GlobalDistObj, assignLObj:object;row,Lan:integer;% z" ^/ k( s2 C# C4 Y8 h8 K
do* Q1 r: `) G1 _
Lan := rootfolder.Internal.Tools.AOLlanguage;! N' X9 @9 q/ N B5 y
if current = @.Destination -- else return
7 h" R/ M- \- v# Z2 G then0 d$ A) s3 g1 n! I( S
@.Destination := void;
) t! [5 z2 A# @+ G% q% a if @.occupied then
5 y( d+ E4 J' Q4 ?. h; B part := @.cont;
+ S$ u5 o. S) e f0 N4 ?# _ @.transpOrder := void;
O6 {8 T4 i* H' G, V1 P% c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 Y+ {( _( V& |6 t; z @,root.eventcontroller.simTime);6 |) @! P# N/ W, `
@.HasOrder := false;2 D& }) Q& y& _+ }! F2 m
@.DrivingHome := true;* t0 X& n: z/ F: G
rgManager.tryToStartTransOrder;
: N+ S9 n9 q/ j' `$ U if @.Destination = void
. S8 q7 |+ U; X9 C2 f5 x% C then -- no transport order for vehicle @
. E9 K# L- f0 W, ` @.Destination :=
" U/ w8 M9 ~# Y! @ rgManager.nearestFreeStation(@,track.~);
0 o. t; z# a8 T) [) ^ newDirection(@);
. X7 q" r) ^: B w if @.Destination /= void then; M/ r) i- |0 _5 k K+ l& O
@.Destination.NumReservation :=: H4 V, D8 p- I1 s! F( ]; U
@.Destination.NumReservation + 1;
! o- p9 v# y$ \" m end;8 q- M& d5 K5 _) x1 `2 S. g
@.CurrIcon := "drivingHome";
& g% l+ ~# Q" d5 ]$ y! G2 B+ d% y @.DrivingHome := true;6 D, K/ i* m+ H$ g2 V) c$ l: |' Z
end;# K6 Z0 C$ |( A* e" |1 I8 H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 {0 {7 ^: ]( `! \$ V* Y part := @.transpOrder;1 Q/ c6 |' B7 y2 u! ?
part.move(@);-- load part7 \6 o* @0 ^5 V3 T
@.CurrIcon := "load";0 m' {+ w" S+ \0 V; k G8 D a7 l
GlobalDistObj := part.globDestination;4 F8 E8 E# ]- ^4 Z( W2 I
assignLObj := rgmanager.rgAssignL;
* v1 L9 G6 D( h, e/ p+ z, L row := assignLObj.getRowNo(GlobalDistObj);3 K A. b' e# S
if Row = -1 then -- since 70* T" T x- Z9 \, q0 h; v, x0 H
if lan=1 then6 v4 H6 x2 j/ ]% g- d
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ k" R1 K6 W; _2 l* ^3 Y: r% n to_str("in der Andockstation: \"",?.~.name,"\""));
- a$ S3 o) @( \6 a else' [1 _' J: d% t% ]5 n- b; m% x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& c( k; p5 B% ` to_str("in docking station: \"",?.~.name,"\""));
! {) C& G2 `/ e end;
3 l4 o- k) Y! z7 _# `7 S* } else3 a- H0 T. w/ j! `, a
@.Destination := assignLObj[1,row];
- g- E& Q$ Y3 j$ ], U, Z* H/ G end; , r- Q( H p; H0 T7 A+ u0 C
newDirection(@);5 R& G% M- X: [- e
@.HasOrder := true;
% X& ^, {1 I& {, E) R* ] end;4 V- x2 Y& J2 b# C3 e6 F" h4 j6 @) w9 w$ K
end;
+ p9 J$ e% [" u, F- Zend; -- of the method. W/ ~" t6 y# c0 ^1 G7 n
|