/* called by: entrance ctrl of the object 'track'; O' T6 K& ^% H3 I
*/" b* c1 h$ C3 F" w
is7 N" Q7 Y% T$ k' u) r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ S! a9 a8 @; W) U- s, kdo
6 a: p9 {3 \" ~& n. j' G/ G8 [ Lan := rootfolder.Internal.Tools.AOLlanguage;# M$ J2 z6 J- i+ i( ?: q
if current = @.Destination -- else return
% w, ?* Y7 R- D% ^) P* l( ?5 c7 | then+ a- w8 L4 L+ j) h, K/ I8 N
@.Destination := void;
7 i& T1 z6 m! B& U if @.occupied then8 y: m" d$ P, J# u; m
part := @.cont;
0 c' S9 I# v1 n @.transpOrder := void;) @, A$ E& F4 c0 B9 Z; u1 F# b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% S3 t$ a% B r+ F
@,root.eventcontroller.simTime);- h, d, z" \$ g( V) m( j
@.HasOrder := false;
# C& B, _0 O' r0 n7 j @.DrivingHome := true;# d' [$ x3 ?" F! m9 v
rgManager.tryToStartTransOrder;
3 |1 c$ Y7 c) @6 l if @.Destination = void
/ V) c7 K. a# H7 l/ b then -- no transport order for vehicle @" y, k/ o9 x2 n6 W% V, B* q
@.Destination :=
* u: q& y) C \7 Q+ X* n! ` rgManager.nearestFreeStation(@,track.~);2 T4 B6 X/ ~& |9 T0 ~! ]4 @
newDirection(@); ' ?, l, A E9 i/ B3 Z- m
if @.Destination /= void then- A0 x& C# H$ V$ l; P9 X' A
@.Destination.NumReservation :=
& ]) D/ k1 {" ]8 G @.Destination.NumReservation + 1;
- S% u3 J4 h) D0 X) L9 ^& K$ i9 k5 } end;
2 I5 ]0 j3 Y+ s# X8 T @.CurrIcon := "drivingHome";& K0 `- I4 b0 _
@.DrivingHome := true;
* f* K4 a/ j0 C7 W5 S end;
' r. L0 }4 ~1 o9 c1 d% ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- x4 `3 B6 L+ h- X' ?- Z part := @.transpOrder;$ M1 J/ M" W; X, a9 d, K
part.move(@);-- load part- N2 V3 a" m( I
@.CurrIcon := "load";5 M: c6 v" N. J
GlobalDistObj := part.globDestination;
4 D8 r- V: p# v9 [% K assignLObj := rgmanager.rgAssignL;
) }& J" Q6 C8 y, L9 | row := assignLObj.getRowNo(GlobalDistObj);
# z! ?8 Z7 S! @+ [1 b9 H( d2 U0 |) g if Row = -1 then -- since 70# }4 m+ ?2 F2 c$ h
if lan=1 then
2 C0 T1 |5 Z3 D5 h1 J4 D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. }- w/ `! U! n7 ]
to_str("in der Andockstation: \"",?.~.name,"\""));3 U# J" ]8 s6 S# l5 E
else: X5 K& v0 H3 w7 R0 `) J3 _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ p. V& `% ~5 Z; |+ v3 L
to_str("in docking station: \"",?.~.name,"\"")); 1 }; X+ {2 v, @ r- [
end;
6 K4 }. M% W+ g6 V else4 A# f* S6 x- g, q* u
@.Destination := assignLObj[1,row];8 B6 ?7 `4 q6 a: e0 r/ F1 B1 s
end;
8 X2 b% U; Q |9 j1 o3 C0 _ newDirection(@);
" N e: C# N( [' q5 R9 W @.HasOrder := true;6 ?- p( E1 \0 |9 B$ l4 H
end;
# V! V6 Y6 S( X; b: P: i, S end;
9 y3 X3 ^" j# ]$ t* {% T0 Zend; -- of the method
* ^$ I/ P6 x) r$ P" [ |