/* called by: entrance ctrl of the object 'track': D# H# u9 }7 A L3 n. N
*/
6 [! K: L7 |* Y8 His
# x( l# d5 g8 i2 n) ^, q+ Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# O+ B4 l* N F t7 O2 edo# Q! o7 y% \' o$ S
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 R% ?/ |# K2 z0 m$ R if current = @.Destination -- else return& `5 {- ?; y) B/ g1 c
then+ \& z' \ W! \! v. {4 y% k! l( h- p
@.Destination := void;& A/ m' t' n+ y/ c3 j* q" i: {
if @.occupied then
( u0 {- \6 U6 |; G part := @.cont;
, U( ~& |# c1 x0 E1 Q @.transpOrder := void;$ x0 O2 v- d9 N9 e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# Q# f' ^, }; z; z- G; I, ^4 E, O4 F) W @,root.eventcontroller.simTime);! |& q( ? c4 B0 M
@.HasOrder := false;
3 A) `( S) d4 }# x! z6 l @.DrivingHome := true;* Z8 O$ P/ w& O) F$ H% v
rgManager.tryToStartTransOrder;
7 L& p: `$ X! ^8 G0 o: ^ if @.Destination = void
6 p ?' b3 j" h6 T then -- no transport order for vehicle @
- w: x/ Y, N' u/ I- h# m z$ S @.Destination :=
! h+ F1 E1 V3 V, B+ x' G rgManager.nearestFreeStation(@,track.~);" f1 [0 }, b2 x1 l
newDirection(@);
2 l) e2 ?; ^2 K! n3 m% g if @.Destination /= void then' x" U- U* f# D, A2 R9 t4 }
@.Destination.NumReservation :=7 N4 V* g, } T$ D$ q' `
@.Destination.NumReservation + 1;
" Z) ~3 b; ~ l+ R" y end;
9 ?1 [* K/ Q1 T2 |. |1 M5 V4 r @.CurrIcon := "drivingHome";1 T* o4 U4 w; t- ~
@.DrivingHome := true;, E. Q- a* e! O
end;
$ q) Z1 p3 i1 ~- q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 K C6 x1 Z4 g$ y. X0 H( x part := @.transpOrder;
) U$ u h. G# y* _ part.move(@);-- load part% t7 S+ A6 B9 y' J
@.CurrIcon := "load"; M; m! N: @" h0 T5 O5 A5 X5 ~
GlobalDistObj := part.globDestination;0 p5 w. m9 ]) T, r; G, ~$ J$ C0 Q
assignLObj := rgmanager.rgAssignL;
- M8 w% J) _. u! b# X0 @# F row := assignLObj.getRowNo(GlobalDistObj);6 O; n! t; l3 T; W6 J7 C+ j
if Row = -1 then -- since 70
: ]. Q( K* `! W6 x4 r4 B if lan=1 then& t) g. R8 s9 [5 C3 O: @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 c. i/ [/ c4 x! |+ l" b" D C to_str("in der Andockstation: \"",?.~.name,"\""));( h6 s# p2 |3 n' |# E, P; i+ @
else
* E6 l7 B \0 G v. M, K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 } B' Z3 A H. a9 l to_str("in docking station: \"",?.~.name,"\""));
8 ?; h, e/ H, L end;
$ @3 F9 M/ W! n8 F) X7 Y8 W else
# O8 A \% O s' V/ V @.Destination := assignLObj[1,row];; b' P( P6 l5 V7 p4 L" D8 |
end; 6 O! L- Y' |+ u" }) m
newDirection(@);
" q) k. x3 k* F) k5 n+ r# y @.HasOrder := true;
. Z' I' R; g3 @$ u$ i) B5 S end;, K3 g8 A. z& N" F+ c, e. O
end;* u C- [0 E" i) a
end; -- of the method
+ p( d9 u3 D& z) V7 z* n1 T |