/* called by: entrance ctrl of the object 'track'
6 e8 h% o; M3 `) u |*/; n% [# C7 R% E! Z3 B" P
is9 D) |( N/ j5 }$ m9 f* S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% w: e8 t. Z# u. u* o% Udo' V7 o- u5 h1 L' A4 @
Lan := rootfolder.Internal.Tools.AOLlanguage;
* l; T6 F+ z/ Y3 h2 w/ E. B if current = @.Destination -- else return: A) _% r# o* j0 X0 l0 J
then: a% Y3 r1 i2 d* }4 |
@.Destination := void;
+ `! C4 N8 ~( a) n6 G6 ~ if @.occupied then
$ [- i4 I2 z) w# w part := @.cont;
" d$ y# N" p2 _ @.transpOrder := void;4 d; z+ i; l- l/ m+ U" V8 ]7 Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ e8 T1 B& s! `3 X* S1 ~1 N @,root.eventcontroller.simTime);: S8 V4 v6 v+ T# g; g' _4 X
@.HasOrder := false;% H+ i; a3 J3 L* A0 Q) O: ]* t3 v
@.DrivingHome := true;8 n( c i2 S7 l! j& G7 z& o
rgManager.tryToStartTransOrder;
) W1 M) d3 O9 p* @' ?1 _ if @.Destination = void5 h, {$ E& v: k
then -- no transport order for vehicle @
0 a L4 {3 N6 r. o# V @.Destination :=* }1 P$ l! o' {) E @3 V! L1 T$ P
rgManager.nearestFreeStation(@,track.~);
3 {1 S! [% K4 I9 y newDirection(@); 6 n% P( h1 w# T
if @.Destination /= void then
. r. J% ]9 I, f0 H @.Destination.NumReservation :=
/ o; @& p0 {2 b @.Destination.NumReservation + 1;
4 x. @9 n7 D/ C) k+ E5 ?6 } end;
% p! I' \$ w3 N3 A @.CurrIcon := "drivingHome";
& W" x0 e2 v" ~8 R: |! Z @.DrivingHome := true;* ?- ^3 i1 P+ j/ {2 N j `7 A. T
end;
u, q' }# R1 ?0 D1 c' R else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 H' P) p. h$ H& J6 G" J/ h( t
part := @.transpOrder;" x! J K& B6 k
part.move(@);-- load part; d( [, x8 n8 c0 R
@.CurrIcon := "load";2 a! D+ W7 ]* T. k( K
GlobalDistObj := part.globDestination;/ S. O r/ I" n( M
assignLObj := rgmanager.rgAssignL;0 r8 {) n6 z& H/ d
row := assignLObj.getRowNo(GlobalDistObj);6 w) W; q" f$ ~# p7 G* N5 L
if Row = -1 then -- since 70) O4 D% y6 m3 t: `; _ x( y
if lan=1 then4 `. p1 N4 o" F! K2 p4 v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: ? g" q3 r: r8 G to_str("in der Andockstation: \"",?.~.name,"\""));; v# ]$ L8 g: V
else4 {8 U- F7 |! |) j2 j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. s5 N8 d Z5 M to_str("in docking station: \"",?.~.name,"\""));
( E$ Q; G; k, u% Z end;' E/ Q9 u' Z) J) M6 ?
else6 j! h% n8 A4 L
@.Destination := assignLObj[1,row];
1 V- X" X+ D6 Y& I: h' p) }( w end; + y0 q1 ?( x) C+ D0 W& m
newDirection(@);: _( I8 ]6 ^1 V
@.HasOrder := true;
. Z* }" c" A: I6 M0 n end;
& Y' o2 n5 }* `2 a# g1 l end;
+ n- A# N( f9 ?7 W8 Xend; -- of the method: F# Y: t D j3 _; h' L5 R$ _4 G
|