/* called by: entrance ctrl of the object 'track'( U, M9 G4 i' y6 e
*/1 q* z* M9 _" D; Y* @ r/ m4 g4 x
is
9 c6 @9 k* R. @# c; A part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% B$ A% V# e9 ndo( H* P. ~4 ]- {! w* }
Lan := rootfolder.Internal.Tools.AOLlanguage;
! ?3 ]& f5 F0 U if current = @.Destination -- else return
. {0 Y3 E) h) G9 g# {( Q4 e then
6 D/ k9 [& \( Z0 y$ G0 L! B* k @.Destination := void;
( J# }8 o2 I0 t if @.occupied then
# h+ p8 f4 K/ I { part := @.cont;
" q; V( ]( M# l2 p* L( T$ a @.transpOrder := void;
7 C. \4 _. U+ e. r/ E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ V. [, {) N( [5 i( _8 F+ |1 R @,root.eventcontroller.simTime);% s. S% t# W$ Y+ Q/ J+ f$ P$ X
@.HasOrder := false;; N; Z' b3 ^ V1 c
@.DrivingHome := true;: R% b' F5 M5 R* d/ z- D
rgManager.tryToStartTransOrder;
- T* T. ~6 i/ M$ H. u if @.Destination = void* p/ Z8 A$ Y0 Q
then -- no transport order for vehicle @1 R# i q \' |/ f' `
@.Destination :=1 v% i5 Z! C/ [# @2 n0 `% c
rgManager.nearestFreeStation(@,track.~);6 i' U- _2 \$ m0 Y' q
newDirection(@);
, s: k; `% x6 t if @.Destination /= void then3 [! u# I4 m0 o1 x: o/ Z
@.Destination.NumReservation :=2 o4 R) I8 i1 e L0 ^! k
@.Destination.NumReservation + 1;
* W; ^. m- u3 H; x! t' t$ t end;
+ Y5 q Q+ X& y& C- a' \ y8 V B4 F @.CurrIcon := "drivingHome";
* F2 m3 @0 X0 N7 J) F1 t; u @.DrivingHome := true;! b$ W* Y" L0 M) m4 N% s; t& H
end;5 A" a# n2 v% @1 }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ v# x" W" N7 |& r9 O: j( n
part := @.transpOrder;0 l5 T( S7 G9 s5 y, [
part.move(@);-- load part
7 ~" {4 j) z0 J, U+ L @.CurrIcon := "load";
# B( P' |* f, Y: n- A2 T GlobalDistObj := part.globDestination;
' H3 u6 P, C' o+ ~ assignLObj := rgmanager.rgAssignL;6 s- Z! w$ d- I9 I0 [7 c! N7 o
row := assignLObj.getRowNo(GlobalDistObj);
7 K; m O% \5 V8 { if Row = -1 then -- since 70* y1 S, Y: ^8 C3 j. k9 H
if lan=1 then9 V* F3 S4 O) F/ |7 I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 |# j; r; ~" Z- P* ?7 n to_str("in der Andockstation: \"",?.~.name,"\""));
" U9 s3 O V+ T6 }) A, ^# c else
7 i, ~; m8 T0 ^& Z8 I; D* Y. l3 h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: x+ O) F3 V6 g* n& Q
to_str("in docking station: \"",?.~.name,"\""));
) A3 _/ Q% J$ G4 Y end;
5 Y0 J9 p& X a else
1 p0 R% B! S. P3 S( O. d9 x @.Destination := assignLObj[1,row];7 f0 v& m- O T% ^& ]( c- Q- z
end; 3 d# O% c2 O+ z0 {$ p" b: s7 @
newDirection(@);
9 ~0 @, L7 X* n" u% w1 F! N( i% G @.HasOrder := true;$ i2 r; Y- [! L# P' d5 N
end;3 Q" T: o/ X. @# h/ D
end;
' r: S$ Y1 w3 u7 t% p9 u' Vend; -- of the method
$ q4 N( E7 R( j0 k% u8 W |