/* called by: entrance ctrl of the object 'track': v* I; Q1 r0 t* s/ s
*/
0 L, I% c. q0 F% l7 ^5 z7 L( P6 sis
! ^$ ~, G% r, j- f part, GlobalDistObj, assignLObj:object;row,Lan:integer;) G$ q* A8 W" d( @! \" d
do- b& I9 A& Z$ M/ R# \
Lan := rootfolder.Internal.Tools.AOLlanguage;
( M4 V3 N4 }! m0 c$ z5 D) @ if current = @.Destination -- else return/ |& R" o( D" J, B+ S, s- U" E/ Y& ^
then" d% l) D5 d1 o% U# N
@.Destination := void;
) h& v0 N$ w; B9 O+ j5 P; S: M5 ^+ a if @.occupied then1 L$ U4 X7 X% d2 B& C; q) X
part := @.cont;. d+ M. k' b( v0 y- O; l& u$ e8 L
@.transpOrder := void;
( x, N; A! ]! V. l1 p* H+ e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, L3 l3 `' _$ F# [7 H
@,root.eventcontroller.simTime); A$ q% z3 X4 O( _
@.HasOrder := false;
; i# }. l) M& L+ j @.DrivingHome := true;5 ~) J2 O' a" z1 S: h' W
rgManager.tryToStartTransOrder;; l: x0 r9 M- N3 e8 c4 {3 g# E
if @.Destination = void* O- r/ [, X: L" E* v2 S9 D
then -- no transport order for vehicle @7 N/ b' M8 Z' H/ h6 i$ @* H
@.Destination :=
' T; V* E0 O/ J ^) [0 P rgManager.nearestFreeStation(@,track.~);
' U+ o; m& |4 ^. G' l) A newDirection(@);
6 _5 A, M) M, M% I2 v( p- X3 q if @.Destination /= void then) A' _9 @& C. u
@.Destination.NumReservation :=
9 Y7 c! P' M" |( N: D2 \ @.Destination.NumReservation + 1;
) z! i+ Q# e: ^- {" c end;
/ j- k" z4 v6 C3 G+ s @.CurrIcon := "drivingHome";) d- F z' j9 Q! F
@.DrivingHome := true;
0 L8 `1 y" G, C: N/ s end;
* f) v8 f+ P E) Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- r* k3 u* ^' Q- p& \4 q part := @.transpOrder;
2 U( _2 H6 Q: ~- s9 z part.move(@);-- load part
7 {1 J- y7 M A2 r @.CurrIcon := "load";
$ o! M4 \- B. _; o- b7 B GlobalDistObj := part.globDestination;4 X9 q7 Y( }& u4 A5 u9 b) |
assignLObj := rgmanager.rgAssignL;
4 ]2 Y+ | C9 }- E row := assignLObj.getRowNo(GlobalDistObj);3 G5 R- V. W" S9 p
if Row = -1 then -- since 70+ Y! y4 S$ u7 q( P' A' c) p
if lan=1 then
8 o! x* ^6 _: m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( y" O& s! Z7 l- S2 R; K: T
to_str("in der Andockstation: \"",?.~.name,"\""));3 s" ~- O. T) H" J2 t
else! C# c H" r N- q( M3 J, H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ X! G! Q! t0 y* F* O2 s to_str("in docking station: \"",?.~.name,"\"")); : r3 K7 S9 K$ B8 M% D
end;
. g2 [- B }$ w. Q else- L% N D4 i; R$ k! U
@.Destination := assignLObj[1,row];
, |. h: u g4 V3 x% ~ end; 4 E8 D2 [, t/ T. R) M9 q: S6 G7 X
newDirection(@);
* q8 z: q# o( M& k) X) C @.HasOrder := true;
+ p7 G4 a" Y: u+ s end;: h o6 k3 N% [( ?; f/ [
end;3 {& S3 h$ [ K y( m" G' F
end; -- of the method
! H! k' h- k$ i( U5 N, @* S |