/* called by: entrance ctrl of the object 'track'
9 Y: A; C+ b7 d' H+ m% e+ B*/
6 M$ ~, j. ~, b* ]) |1 O% ais
$ y* i% {2 H0 |. f4 C$ } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 _ `9 V+ U9 S v& \0 tdo
/ R4 ^: S" \! I- J$ F7 s Lan := rootfolder.Internal.Tools.AOLlanguage;4 w: c8 Z# _5 k4 c' Y
if current = @.Destination -- else return8 |7 p% b2 J! @+ _5 }
then
4 f n2 i( s; S4 C @.Destination := void;
8 X# I( F( S# H if @.occupied then8 x) Q/ _6 O6 ?3 W% m0 I6 Y
part := @.cont;
/ j7 @/ Z& u4 R/ g* l @.transpOrder := void;
5 ]9 T2 Y8 P/ z- \) i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: @6 e' ^3 ~% f. E5 S
@,root.eventcontroller.simTime);
" V$ o n- m0 l$ F* c @.HasOrder := false;
2 p1 w0 A( z& |7 T. E ~, u @.DrivingHome := true;1 ?. M7 z3 V- C8 o
rgManager.tryToStartTransOrder;
1 T/ @( h) q+ O% p9 T* }. s if @.Destination = void. e2 o7 y) }* P1 [8 I' Z
then -- no transport order for vehicle @
/ [$ b# i2 n& k2 [+ S @.Destination :=
" Q A! l; H& C rgManager.nearestFreeStation(@,track.~);
- k0 F6 l, d1 O8 n. A: E newDirection(@);
5 M' h3 {6 `) w' y if @.Destination /= void then
- h1 J" G: b$ l$ `5 g% C @.Destination.NumReservation :=
# C5 l' u6 C- G/ d. w& C @.Destination.NumReservation + 1;
" H! o7 w4 Z( @) C. S end;/ u' w* L. o {
@.CurrIcon := "drivingHome";
- h8 K3 c2 O6 g- |6 k @.DrivingHome := true;
* _5 X0 y! P& W+ ]3 B/ ]& R end;
. ~* |$ L5 \9 P9 z; D else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 t- k* e& `0 l( F8 u4 ~1 ?* Z part := @.transpOrder;6 X2 ]7 }! V& p( f' G
part.move(@);-- load part0 T$ q: {7 i2 X
@.CurrIcon := "load";8 |; k* s" U% c2 r. b
GlobalDistObj := part.globDestination;! z6 V# D3 X( K8 j" x& T4 K' _
assignLObj := rgmanager.rgAssignL;
/ r7 D9 Z0 p- g' M6 I# d row := assignLObj.getRowNo(GlobalDistObj);
# j" ]) m3 q; z! b( @) e: { if Row = -1 then -- since 70
6 H6 X1 _5 E' g+ I, S if lan=1 then
- M1 ?! `2 [$ ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 y5 r7 h/ s1 J
to_str("in der Andockstation: \"",?.~.name,"\""));# r( H8 u! o( z9 d
else
% A" [( _$ S+ a, l! q& N" a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ ?! U, D/ H9 I to_str("in docking station: \"",?.~.name,"\"")); * |6 C! f4 [3 ~9 n# v
end;: K2 D) X0 [% t+ u; \
else J" ^+ g/ ~+ w5 O1 |% D
@.Destination := assignLObj[1,row];
. T% o0 J* {& a' s end; 5 q x, U! C8 d" H1 \/ o
newDirection(@);
M; n5 P4 L# m+ R9 Q: { @.HasOrder := true;& ?8 D. m$ u( O8 p. A* G: |, E
end;" E2 M/ Y- G! x" o" O+ O
end;( G6 {6 D& z" a
end; -- of the method
1 n+ z8 P+ y" h( c/ `# l$ r |