/* called by: entrance ctrl of the object 'track'
P9 M. ^9 z! L) z; |/ Z: O, {$ r*/* l) L, _1 p2 z& @
is
1 m! `4 M* G( \9 I/ n) P1 ~/ P part, GlobalDistObj, assignLObj:object;row,Lan:integer;, B# \2 Z6 x9 c, j+ x' ]
do
# o6 `- c8 `( ^7 ?4 u7 [ Lan := rootfolder.Internal.Tools.AOLlanguage;
9 x' k& q7 \* M& x* g/ t1 l if current = @.Destination -- else return2 @) ~9 n0 \4 `' L& h" u
then! b H( r- V" H+ V
@.Destination := void;; x- z( G7 L# R) ?! [
if @.occupied then1 B. K. t T \3 y
part := @.cont;
/ g7 D5 [+ a. M; z2 v @.transpOrder := void;! _# {0 X, M: S. Z3 {+ v/ A0 n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 e3 h$ V0 G) h' j& _1 L% a @,root.eventcontroller.simTime);
9 {8 i Q# p' N5 H4 H# U @.HasOrder := false;
; x1 H& b2 }: e/ w6 B- C } @.DrivingHome := true;4 u7 w/ u5 H( I# U9 M" W
rgManager.tryToStartTransOrder;
. f% k0 O2 ]9 m' V" X" h if @.Destination = void
4 J( z3 B$ S6 `" s! a* U2 Y' W6 s4 y then -- no transport order for vehicle @1 G2 S1 d6 W' [) Y, ~1 [
@.Destination :=" t9 a0 D& f( U7 G
rgManager.nearestFreeStation(@,track.~);
0 J+ J5 R9 {" _, ?+ K newDirection(@);
1 ~0 s/ Y6 @( P2 k: @; I if @.Destination /= void then- i* R4 ?' E3 p
@.Destination.NumReservation :=" Y6 F5 G( J! q0 @& k5 s- y
@.Destination.NumReservation + 1;
- h2 J- _1 h* _6 ~ end;
/ Z/ o8 N9 ?1 J @.CurrIcon := "drivingHome";
- a; J; ?4 o2 Z @.DrivingHome := true;
9 t8 [! ^! [; M% m8 S end;' X s0 b* G% f8 s; |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& m9 c8 s; l; q/ J part := @.transpOrder;; f- H6 K+ L1 e0 o0 @
part.move(@);-- load part) K$ ]( m4 @7 V/ S' q" M; i( u
@.CurrIcon := "load";
1 d9 c( w/ o! ]! N0 T: |( ?/ _ GlobalDistObj := part.globDestination;
( Q9 s) |0 }! x0 s: u2 I$ J1 g assignLObj := rgmanager.rgAssignL;
* T, w+ s+ w E% h) I row := assignLObj.getRowNo(GlobalDistObj);% h4 `5 c# \0 [. @& u
if Row = -1 then -- since 70 H1 N; x$ w& U/ m/ {- q( }
if lan=1 then+ n" O0 Z- ?$ J0 P$ v& h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ w# f# Y8 l) @2 @" p to_str("in der Andockstation: \"",?.~.name,"\""));9 S5 `& N. x2 d8 g
else+ w- y8 [4 ^- y% d; J8 ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) T+ D7 d3 ^! J8 B3 i
to_str("in docking station: \"",?.~.name,"\"")); - v4 p j7 p: \* U+ m
end;
8 i) s+ f2 f1 x" l; D# P else9 M8 }1 E8 ]2 [ `
@.Destination := assignLObj[1,row];$ R5 [- |8 @ W* O* ?
end; 1 Z, Y5 v8 F8 L6 W5 t+ A9 R
newDirection(@);
6 k( I `0 G7 D) o( W. i7 ? @.HasOrder := true;; v- Q) J& m( S" Z {# ^
end;
# G X+ P# n$ V end;
" c+ ]/ b4 F6 M+ L, qend; -- of the method
$ e" Q6 m8 ?; C8 E7 \. S7 v |