/* called by: entrance ctrl of the object 'track'! L5 ~4 ^, m0 ?* B3 W; C
*/
- p3 o- X: u3 X9 cis3 [7 I: \" S- ^( @( j/ i" f5 P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
[% B, i) H9 [# G2 }/ Zdo. l$ U. e6 }, x
Lan := rootfolder.Internal.Tools.AOLlanguage;
. ~: J; {; Z5 G% | V2 U- e if current = @.Destination -- else return
* h/ z% }/ c. D: { then
8 q7 T- e& d, t# D @.Destination := void;2 j8 e' M' T" C- l' ^' \6 v
if @.occupied then
; F# v# S& D0 w1 ^- W# l8 g* ^, G3 ? part := @.cont;
0 S- ?0 W! p* q6 G @.transpOrder := void;5 `. L- H5 {! h% Q. W! V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 i3 m9 H$ I* x3 x9 W @,root.eventcontroller.simTime);2 H/ h8 C" s$ h# ]* g
@.HasOrder := false;9 G1 n% b, T( U) o4 [0 V
@.DrivingHome := true;
7 X( S4 x b/ ~3 W rgManager.tryToStartTransOrder;- F& n8 `( h2 o P8 J* `( e# M ~
if @.Destination = void% {4 m- R0 Z% i4 u7 Z' v6 k7 x( ^6 G
then -- no transport order for vehicle @6 \( J5 `; P& C4 w; E; g
@.Destination :=
) S s/ U# F/ `- Z" b/ r6 Z9 w rgManager.nearestFreeStation(@,track.~);
- y* P5 S8 X& t( x1 ~0 L) _ newDirection(@); ! L2 D. A! R0 R9 K" g. a" d4 ^
if @.Destination /= void then
) w+ C; |/ N' O) L @.Destination.NumReservation :=
x* Z. j, T+ M2 @9 Z @.Destination.NumReservation + 1;
# B* C4 J1 J2 _: U, ^. r* L" m end;
* x. ?* C8 U. T8 Q' g5 P @.CurrIcon := "drivingHome";
1 _8 t( b0 o7 h2 b& X1 [8 B" N @.DrivingHome := true;! u- K' a$ K& f% N/ q# v0 x, o
end;
* |7 @! h( I5 g' a' h! Z9 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ F/ D) S, k* H" C$ }) y; N/ h part := @.transpOrder;1 y) C' w& ], `8 r9 y
part.move(@);-- load part9 f8 `/ F. t* a+ r
@.CurrIcon := "load";$ ~/ V5 o8 L9 t3 J# C/ ~2 Y- h3 q
GlobalDistObj := part.globDestination;5 Q( m( M9 }. S
assignLObj := rgmanager.rgAssignL;
2 s: `! X7 r6 h" \ row := assignLObj.getRowNo(GlobalDistObj);
9 |) v4 g; K$ A0 ^+ |8 l) A if Row = -1 then -- since 70& j6 ]6 s! x$ s) \: l! h/ d& b1 ?5 m
if lan=1 then
+ R4 L& k m7 G2 V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), f% s7 U* V2 }* n
to_str("in der Andockstation: \"",?.~.name,"\""));3 q: y, y7 W% T3 J* e
else
' t; g" @: N: ~) _- C" ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 @2 M" w" r& x0 ?" S. N* i* F9 \
to_str("in docking station: \"",?.~.name,"\"")); 2 Q9 G2 |: B2 s! c. P
end;
: ]. m% h' J5 a/ |$ A4 i else
8 b( `/ h; U" ^. I$ }0 [ @.Destination := assignLObj[1,row];
8 `" i7 ]' w( G* g/ Q* t8 M end; . B4 W! n! {: }6 d+ O- k
newDirection(@);5 E( C; O% D% m+ x
@.HasOrder := true;5 L( ?) Y/ P: [! f2 _9 G d
end;( c: ^: l3 f7 t2 o, l" l
end;! o- _1 N- ~/ H2 ^5 S% \' T i
end; -- of the method; R- I0 ~, l# h6 [2 b, k/ _
|