/* called by: entrance ctrl of the object 'track'
! V' o2 A, q2 ]7 x x*/
& b- C# l7 v% g- Q' fis* W+ C; k& p2 Z" q" \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: Y: r$ r$ W' kdo
- q7 n5 e6 H( k% M$ s Lan := rootfolder.Internal.Tools.AOLlanguage;
c% r* h6 a4 \' b: t# F if current = @.Destination -- else return
@) D0 E& |9 }8 A- M2 ? then+ Z, w2 [# Q% m
@.Destination := void; a+ l4 T9 l. x; \8 _6 X* n
if @.occupied then
$ w, k: ]0 ]) O7 D/ S0 ?( I3 t) K part := @.cont;# _& {6 [ k. Y- i/ H- k! e& u8 \
@.transpOrder := void;, L" _: d+ d* H; i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' G a# n1 U$ X& @ @,root.eventcontroller.simTime);; r! \9 F% q% C- I0 m
@.HasOrder := false;; m. H0 K7 e* k! w6 C J+ o
@.DrivingHome := true;
! P- D8 W/ W4 T/ D r rgManager.tryToStartTransOrder;: d7 ]+ m! v$ p- D
if @.Destination = void4 r( c$ ?! ?, O2 P
then -- no transport order for vehicle @5 l) C# I6 g0 f8 K5 u M: j8 d3 n
@.Destination :=( s& H: t* v, i ~/ ^
rgManager.nearestFreeStation(@,track.~);
; [/ N$ ^0 U3 W' [+ ^+ ]# b! A' e' W( \ newDirection(@); / E% H" A* U; ~+ U
if @.Destination /= void then
8 e- D6 a6 V4 p+ ~$ Y @.Destination.NumReservation :=
% u4 B" F( ^* e, l* c7 |* c @.Destination.NumReservation + 1;
) ^! }; G7 \ V! ~- T' S6 Q end;
, R# P) r. e `7 i @.CurrIcon := "drivingHome";
9 R! W+ V) L; T6 c; X @.DrivingHome := true;6 y3 g. P! q6 ^0 T
end;, S3 ^' q) x7 X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* o/ c' b' C& f part := @.transpOrder;
2 S- m! [: d, h* U+ e4 ? part.move(@);-- load part$ h; M M! @1 c- L7 `! d0 c
@.CurrIcon := "load";( B+ {( q) D) l* E6 }' z6 w' n
GlobalDistObj := part.globDestination;
$ ~' R; X* |* Q9 w+ B* D- W0 o/ L assignLObj := rgmanager.rgAssignL;
% p: C. x9 v* `0 |+ i3 H; J row := assignLObj.getRowNo(GlobalDistObj);
E1 r d0 {' c if Row = -1 then -- since 70
4 n+ H3 @$ ^" B# x if lan=1 then, ?# H) O" W# e: w q9 n$ s0 g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 S' {' j* W+ J9 K
to_str("in der Andockstation: \"",?.~.name,"\""));
1 i6 ^9 p/ H: q$ r1 r+ L else
+ A4 B/ _& i1 c X8 g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), t8 z; O& Y; @2 k1 g+ P" k
to_str("in docking station: \"",?.~.name,"\"")); / L% U, x6 N& L! _; [
end;7 c4 Q' S L5 u! ^5 p
else! K# ?* I9 _( q& a
@.Destination := assignLObj[1,row];/ J; L2 d- V6 Y! G9 B3 V7 a( S
end; ; h* a# u! ]6 X+ j4 e
newDirection(@);
3 i4 U1 }- `3 X2 _. e @.HasOrder := true;) R! ]) \( ^, P7 G
end;7 b5 @% ?/ w0 e- E4 M
end;6 W( ~# Z3 c3 `7 x9 J6 b
end; -- of the method9 ]! E% x* |7 p1 A" B
|