/* called by: entrance ctrl of the object 'track'! @- C9 A$ ~: Q4 [1 k4 q
*/9 I6 ]9 }- A: C, w& X
is
: I$ N' W9 o5 T! J part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' J% R7 A8 y' C# Odo
( `% A4 A; o0 \; X( {9 C Lan := rootfolder.Internal.Tools.AOLlanguage;
& p9 j. m9 _6 l, ]' s6 s if current = @.Destination -- else return: k! L# ~2 j$ E
then8 a' A/ }: \/ B7 _; w$ o
@.Destination := void;8 R/ d( @$ f( c3 j
if @.occupied then* @& ~' F# R9 J, n' |. v
part := @.cont;, R6 D. U) H2 m/ l. p5 _0 O4 J+ d, P
@.transpOrder := void;
* j/ z6 U2 v- @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( o; v/ f4 z' _! ^0 j1 h @,root.eventcontroller.simTime);$ `, c& r- o" r+ U# N/ k& a
@.HasOrder := false;
4 V% S; l1 _0 |" T @.DrivingHome := true;2 g8 r- O, x. J0 k+ k$ O5 J* J
rgManager.tryToStartTransOrder;+ R+ |7 H4 q" |; Z& e4 t* m
if @.Destination = void
+ r7 ~6 o8 Y7 s then -- no transport order for vehicle @& _3 _3 C1 ^+ Z1 @
@.Destination :=
$ b* a* y6 v- J0 N6 ~' q9 C rgManager.nearestFreeStation(@,track.~);" a" N1 u) w- c8 Y- X" y
newDirection(@); - c4 V- l$ h1 g b( L& o% ?3 K
if @.Destination /= void then2 x7 M/ x! B4 g. N t+ u: s- b9 r
@.Destination.NumReservation :=
! n. `- X; W8 O' F @.Destination.NumReservation + 1;
! x" U* Y' t7 o$ \ end;# i) \8 }$ |, L7 J
@.CurrIcon := "drivingHome";
3 K" P' {0 _: e0 H/ D9 Q X @.DrivingHome := true;
1 ?) q; d% U0 [1 n# P$ u# s z end;* s7 H9 B$ D4 E' r' K. W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) a+ K& ]$ @: g7 ~7 m part := @.transpOrder;
4 F1 |* l* o* D. Q$ u' g9 I( b part.move(@);-- load part4 ^6 \+ \, F5 B8 D8 ?
@.CurrIcon := "load";
7 T! }. e! c5 e) T" z( Z# j j GlobalDistObj := part.globDestination;
6 B& h( v, D7 v0 j* C$ o assignLObj := rgmanager.rgAssignL; X0 C( Y7 z* N- {
row := assignLObj.getRowNo(GlobalDistObj);6 ^3 L8 X3 j, S) u, f" n
if Row = -1 then -- since 70
+ f7 @2 M# z( R" @ if lan=1 then
, F" C/ b, x: `( R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! C& ^4 \4 R2 j1 Y3 D( K: F to_str("in der Andockstation: \"",?.~.name,"\""));
/ [, R' ]! z: m% a9 j else
/ u( ~0 k1 h! q- E; K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 u5 E# F& [! T- t
to_str("in docking station: \"",?.~.name,"\"")); . N( b+ ]* Q/ y3 D$ J2 _
end;; x3 [1 v3 b b7 v5 {- B$ z0 d" k, z
else
! e# n( {* |, g* O2 X$ E @.Destination := assignLObj[1,row];
5 e9 ^. n% w. e5 t end; 9 m/ J& n8 i3 {( I' I3 g, U& l+ t
newDirection(@);
6 t4 H1 w# B+ _$ ]4 u @.HasOrder := true;
5 ]$ q* P: H$ a; L7 ^5 t/ |* h end;6 [4 l/ R: L4 @8 {) g
end;
" q! h$ h, B, y% ^6 t; z% qend; -- of the method
5 }% J" B. y$ x' j% y. {3 P |