/* called by: entrance ctrl of the object 'track'% M; c$ t! n+ Y9 D0 l: N; `
*/
6 N4 B0 \8 H, Y& I. n. U' K6 Y3 uis
6 C5 m" |8 n9 n# j* W3 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ @* {" s# }( p; t X
do2 J- Y8 V# e C0 s; b0 ]
Lan := rootfolder.Internal.Tools.AOLlanguage;6 z1 U W/ H" t) c0 r8 Z7 Z& k: q: x
if current = @.Destination -- else return# x2 O2 s2 {/ q- R6 F
then* r7 f a5 l) S
@.Destination := void;
/ {+ c/ T6 `5 X: Z) l8 f2 [ if @.occupied then. W7 U$ n# S1 K; b* Z. z* ?% V
part := @.cont;: d5 ]3 M! N7 [
@.transpOrder := void;
9 `' Q% z9 H$ v, q. a% v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 F1 h0 W5 d! C5 F& \ @,root.eventcontroller.simTime);2 S4 S$ Y7 ? q# J
@.HasOrder := false;( x Z. z# b, }% E
@.DrivingHome := true;9 t2 c9 f6 }( L( E6 [& p2 T
rgManager.tryToStartTransOrder;
" T1 K. P; `; A) |( K' q if @.Destination = void; E8 m# l8 }* d4 Y5 |
then -- no transport order for vehicle @
' @* F( L; `/ i' L% g @.Destination :=
8 Y7 \7 |! t4 G1 F6 a- k rgManager.nearestFreeStation(@,track.~);# Z4 m. X( x$ T3 X1 K# i) t
newDirection(@);
K& u% J/ F! Z1 X2 { if @.Destination /= void then
( h* r. Z K% y, ` @.Destination.NumReservation :=
1 o% y/ P/ n* r- T8 |7 U! f& f @.Destination.NumReservation + 1;
7 v% ?2 S; D% E) H end;
+ Z# X, d$ b3 i A$ t9 N J2 `% v3 H @.CurrIcon := "drivingHome";9 O. g7 w$ ]0 j2 [! W
@.DrivingHome := true;
0 M8 v1 _, e& r- C3 d end;
_' ?6 G! g/ q# r else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; r, O, d5 S& w: i% r7 C part := @.transpOrder;( h' T' i& B3 `3 L/ o( I
part.move(@);-- load part
+ k7 l% z; e3 r7 y R% z u @.CurrIcon := "load";
6 d) G" G; N5 S GlobalDistObj := part.globDestination;
6 b. F: W3 W; @" e assignLObj := rgmanager.rgAssignL;2 E. l; V% n. U8 x, [" j4 Y
row := assignLObj.getRowNo(GlobalDistObj);
2 i6 s3 a1 u9 v/ _( ?5 W if Row = -1 then -- since 700 c, L0 b! n8 o d9 \
if lan=1 then8 c- s/ k& Z4 J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ ], Y/ C5 ?5 ]3 u( g# i
to_str("in der Andockstation: \"",?.~.name,"\""));/ h: U: m0 z, |' u3 Y
else
2 _% V3 e' S5 R0 G3 j: b7 P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), o0 g# [3 ~1 E$ \" F$ m
to_str("in docking station: \"",?.~.name,"\"")); ; M0 N) ~' z' P* E- c E; J' N3 i
end;$ u* V8 G) J; {+ i7 \0 J; \
else
9 p/ x2 x' |6 |" N! I3 L @.Destination := assignLObj[1,row];1 e! f4 o% A8 R5 z# E \3 p
end;
' y: r- V9 q9 z newDirection(@);
$ _$ \6 }7 f l5 a6 R8 V @.HasOrder := true;% I+ P& t. W6 v
end;
; ^! _- g+ Y M2 r% Q3 m end;
; F: i% C& T% s, Tend; -- of the method
' r3 B0 e C- Z' r, k |