/* called by: entrance ctrl of the object 'track' h/ g: g6 n3 e% I4 Y
*/ E5 K, W9 X: @0 P
is7 O+ u, E+ g. G( a B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 }9 r0 x# m! F5 x& Ndo# w) H" ], K+ w& v: l7 a
Lan := rootfolder.Internal.Tools.AOLlanguage;
- \4 ?7 I: U" i. y if current = @.Destination -- else return4 b! w; O# r6 |/ }- U6 {0 N
then4 E- W+ A1 ?9 t% X+ F# ]' S, G
@.Destination := void;
* F, B8 D7 [& D5 V+ ]1 O: {# L4 u if @.occupied then: u5 M. U( {! S% a/ y. b$ @, @
part := @.cont;7 m* K" r4 G# q" T) A
@.transpOrder := void;5 a8 y6 f" m, E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% s, z& _. |5 _/ }; i# E
@,root.eventcontroller.simTime);* s) T- d0 w; Q
@.HasOrder := false;
& N6 T, c$ S3 h' Q7 J9 r- j0 M @.DrivingHome := true;% Y( X, w% f5 w
rgManager.tryToStartTransOrder;
! h$ L# V8 t3 N) j6 d if @.Destination = void
; W( H1 Q6 ]8 q1 ?* v/ ^) M7 ]8 f then -- no transport order for vehicle @6 u1 c4 d) x' r4 p8 G2 o% W6 o
@.Destination :=+ N& n1 }+ @& l) i* ^8 K9 f( ^
rgManager.nearestFreeStation(@,track.~);' o$ H7 G0 C4 Y3 {+ `3 z
newDirection(@); 4 h5 p( g# }( ^ Q
if @.Destination /= void then! r& J$ @4 Y$ ~$ E# x; b
@.Destination.NumReservation :=1 {. h# Q g& l6 Q; `
@.Destination.NumReservation + 1;9 y5 s6 L K/ v) D) a' q8 {
end;7 f2 N0 ^( J) W
@.CurrIcon := "drivingHome";4 }% u2 K! q5 d2 \( u
@.DrivingHome := true;
6 x# e. Z' a' W+ J end;3 U& l; l! w. T$ ^, M( X% F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) T5 a6 f1 F" n8 y: ]
part := @.transpOrder;7 D9 z; d6 x p" K; T5 S
part.move(@);-- load part
! Z4 Q% v$ \$ e @.CurrIcon := "load";6 r% Z1 h$ ~% t7 m- R K! D M; N
GlobalDistObj := part.globDestination;
- M( }8 c1 i- _8 _ assignLObj := rgmanager.rgAssignL;
! B( Y K, s7 [9 b7 L& U: ] row := assignLObj.getRowNo(GlobalDistObj);5 ]: k5 `0 V. E! I( o
if Row = -1 then -- since 709 Q! C% x: D* W+ ]9 l/ c
if lan=1 then2 A( `" U* y( Z$ K- K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! B! `9 \ `0 B8 F! _8 a& Y. ^
to_str("in der Andockstation: \"",?.~.name,"\""));5 v4 ?( p, }( T" n' e
else9 [" p/ v9 X2 J) d: V5 N8 n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! S! r: B* j9 P
to_str("in docking station: \"",?.~.name,"\"")); 2 e$ f* E' T' H! A/ O. ^
end;( ]7 ^) j8 E" |2 I' j ]/ T( x
else
# ~6 _+ z; I1 F3 f- V! V @.Destination := assignLObj[1,row];
2 g$ Z7 u3 t% L/ e D end; 9 W3 s0 m. h w
newDirection(@);/ ]+ e z9 w7 q9 J& \ G3 o( c7 q
@.HasOrder := true;* L) K4 q. Y/ L/ R0 [6 O
end;+ \- H3 |" q& m$ ?
end;- a' h# J0 J" q
end; -- of the method
& m+ T- e& h i _$ K' c- [2 n* s/ d |