/* called by: entrance ctrl of the object 'track'
+ W6 l& E! B, F9 s8 W9 x2 G A*/
, G2 S) e6 p$ ?- Qis3 p9 |2 Z" N b: m: y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* x/ G- ?* p3 ?* l
do$ H/ z9 G- j6 o
Lan := rootfolder.Internal.Tools.AOLlanguage;
( P0 \$ F* z. P. x if current = @.Destination -- else return
$ p; u" g, P3 Q then8 Q( E+ G# X- [0 ]0 N
@.Destination := void;
! t5 h9 X# _, ~& S if @.occupied then
: }9 O2 r) @. ^/ m part := @.cont;$ T: Y: g5 l: x+ r
@.transpOrder := void;( \1 l4 ]5 Z/ t {$ I. C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, x3 j# g2 ]) ?5 W
@,root.eventcontroller.simTime);3 L+ ~- h0 k( t- T# a5 V2 G
@.HasOrder := false;
2 I* ], s( Y; h: A. r' S @.DrivingHome := true;
+ E1 `6 x0 {) y" ? rgManager.tryToStartTransOrder;9 T# ~6 N7 |7 Z. I7 R
if @.Destination = void; R" E9 j, `) W7 T9 q0 u5 ?
then -- no transport order for vehicle @" q! V) J) t- y( o1 `3 D# k
@.Destination :=4 M6 w/ e/ x! W+ r& _
rgManager.nearestFreeStation(@,track.~);
0 J: a6 O# X8 b5 _2 ? newDirection(@);
+ r0 G4 F2 e& Y0 c- Q if @.Destination /= void then# y/ k: N+ g6 o6 K5 [6 x3 L% h
@.Destination.NumReservation :=; W4 j7 y; k2 S
@.Destination.NumReservation + 1; k: t- N& B4 c! t# A* A
end;
& u8 f0 a" X# v) i" S @.CurrIcon := "drivingHome";- E$ Y0 v8 T% c0 ^7 P4 a9 N$ ?
@.DrivingHome := true;
7 v* o( \1 c" V! C end;
; R' u7 P6 A' J( o& Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 }$ J" i0 B- P0 A8 w; {
part := @.transpOrder;
* E" p* L& y& `. x9 j part.move(@);-- load part( d' n$ E2 R* w5 ?: b
@.CurrIcon := "load";6 j! Y, M% U8 N8 u
GlobalDistObj := part.globDestination;
& A9 @' v/ x; l- h assignLObj := rgmanager.rgAssignL;5 Z7 H1 f9 l/ `+ w- O) P* `
row := assignLObj.getRowNo(GlobalDistObj);
2 W4 {8 W7 K( a9 z if Row = -1 then -- since 70
4 U' Z! H9 [: F% H- |% @ if lan=1 then0 a* Y+ I0 J" u% l% A* q5 x1 Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' K# \4 C# g) \ to_str("in der Andockstation: \"",?.~.name,"\""));6 s3 s0 g/ C* }( l; N
else& ]1 _/ n# _% \" Q8 t: X' |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, y4 m, I6 b4 `: \% t to_str("in docking station: \"",?.~.name,"\""));
% T6 s$ [6 b. r& H end;
; Y; [# A& z: q; V8 I else/ M6 {. ^, A- u$ z' Y- D C& T
@.Destination := assignLObj[1,row];
+ ~# ?5 P$ B2 e6 u end;
2 H v" ?5 o' V5 |$ L4 P+ F! t! d newDirection(@);
5 U7 s- f2 Z2 M y& V# u" }3 I @.HasOrder := true;8 X0 i7 L: _. y+ p
end;+ h6 i6 S% g1 w" o( _7 u. `
end;
8 u- X8 x1 l$ c) h6 u1 Cend; -- of the method
4 x4 p7 x/ `' S% c* k- [ |