/* called by: entrance ctrl of the object 'track'
5 v9 g8 {; m' P( u*/! E' _0 t2 P% w9 B& C! q$ j8 X: D
is
0 [" H* C& P( x0 D3 _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- C7 r; d8 r7 n* g/ \2 x4 ?5 ido
9 ]: \! `1 h& w# @1 E0 O Lan := rootfolder.Internal.Tools.AOLlanguage;) }+ i7 _* ~ J, E3 |, `1 w, w
if current = @.Destination -- else return, s) V( E; X& S3 Q
then
: @7 j8 x5 F8 L5 |0 A @.Destination := void;1 ^( C- |/ a) \
if @.occupied then$ ?& h3 G; \' j; C! k8 B2 {
part := @.cont;
8 I' H2 E; o! h1 V" J @.transpOrder := void;
8 U& v" r& l$ ~4 f) Y9 { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, p0 r, N- b1 D% ? @,root.eventcontroller.simTime);
& Z) H6 D- ?' B1 g4 ~; P$ ~" J @.HasOrder := false;( W$ ~3 X+ C. w( z9 B0 L" R
@.DrivingHome := true;4 t" l6 L3 r% o* r: v
rgManager.tryToStartTransOrder;
+ d& V6 ^- } H if @.Destination = void
]% i7 K) g* U then -- no transport order for vehicle @
# n+ _# e; n1 [1 g. m @.Destination :=
9 _/ ^/ X7 U* G4 H rgManager.nearestFreeStation(@,track.~);
! k5 g* a0 F3 O2 i- [- S# X newDirection(@); ; x) G: f: Q& |* W% y, `4 x
if @.Destination /= void then- r. C) F* w4 d- J- i: o
@.Destination.NumReservation :=
' w9 _0 X1 k- [' b; @ @.Destination.NumReservation + 1;: P% S9 C; ^- D: c: I9 A' _
end;
+ b" k9 b5 r2 M3 C8 {7 Q, ? @.CurrIcon := "drivingHome";
/ T2 g5 Q% g. u/ }+ B8 X @.DrivingHome := true;1 O% l! A- k- G7 X
end;
/ t9 J# e1 C! x0 Y/ G% g/ O; c1 v else -- the vehicle @ is empty, both vehicle and part are in the same dock station! z4 y5 K% K1 C. r3 m% j+ ~" T
part := @.transpOrder;3 f1 z' |4 T v4 ^
part.move(@);-- load part
! J( G; k- V/ v8 m @.CurrIcon := "load";( ~; j+ _7 q, L# x
GlobalDistObj := part.globDestination;
5 R: P/ O7 v6 [$ Q1 r5 @, Q assignLObj := rgmanager.rgAssignL;' d5 u( W; m3 A5 @9 l
row := assignLObj.getRowNo(GlobalDistObj);
# {% d ~! I5 u* I& o l3 }% O if Row = -1 then -- since 70
1 e1 p+ D! h" j0 J0 ]- T9 {# a& z$ b. D if lan=1 then
0 E( ~ O/ w# n7 s1 o- U; P4 _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- e3 V: V, _* f) \- w$ Q, ^
to_str("in der Andockstation: \"",?.~.name,"\""));
! m s+ T! O! v else
4 n5 `% }. [' `+ ^+ Q' x3 Q7 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, r) ^% |1 ~8 ^4 d9 |' p to_str("in docking station: \"",?.~.name,"\""));
2 ^. ^, M$ @! g$ O1 O end;0 _' j' ]& _% Y: |6 O
else9 h* \2 `! \" b7 T) s+ T! _: U1 z
@.Destination := assignLObj[1,row];
+ z6 j; V0 v* [+ q, }$ U' Y Q end; ) e: G- e: C- [* P( Y) e/ l0 N, I) X
newDirection(@);4 b! r" g8 n9 K% h1 w( R
@.HasOrder := true;
9 N$ |2 b- ~( E% C end;& b( V O3 z1 [! R7 e6 O
end;
$ ~# Q: ?! E, D/ i/ Fend; -- of the method
& i) v5 D4 c# `* |( @ |