/* called by: entrance ctrl of the object 'track'( h% B; T0 a( |
*/
& {! o4 Y/ C% W2 V& p# wis4 x# R# T2 U% Q/ Z2 E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 R4 X8 `6 I) y% ddo' Q0 y1 C' M( W$ D f# W9 B9 J
Lan := rootfolder.Internal.Tools.AOLlanguage;
! ~( r! }; @( b$ g- u# F. [" {( ] if current = @.Destination -- else return/ B& S' U% N6 E9 i% W
then
2 i; d2 {! O6 k2 r8 L7 L @.Destination := void;
" Y, \1 {9 D+ y# a/ ^ if @.occupied then
9 K% \7 t# j4 \ part := @.cont;
+ G2 r' A' r# |* X* D7 r! u6 m* q @.transpOrder := void;
5 V7 b* I" I. `2 K4 k" r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' `8 A+ |- a! c
@,root.eventcontroller.simTime);( ?$ [" M6 }! K. c! B J
@.HasOrder := false;# W8 C" d4 B0 @! w) n
@.DrivingHome := true;* H# T" N- o$ V; l! Z9 n
rgManager.tryToStartTransOrder;
# m3 z0 W8 D* N: t1 Y7 g if @.Destination = void# o9 h& i/ W) \1 X% f+ e4 Z( ?
then -- no transport order for vehicle @
! F0 v% W6 i2 D9 H" h @.Destination :=
% ^$ C. a2 L( a+ x# A rgManager.nearestFreeStation(@,track.~);/ n" Y$ B) `5 d' j7 g% y! }
newDirection(@);
( P$ Q/ h' d) M3 l if @.Destination /= void then
/ w* b" D3 F2 g1 X9 }/ X; E& a @.Destination.NumReservation :=
3 V: E/ t! T0 s7 N- C- V; W @.Destination.NumReservation + 1;
& l3 R- z/ D8 v1 u end;5 ]! C" m" I3 K+ e( Y7 u0 g
@.CurrIcon := "drivingHome";
3 T2 @+ X* D! G" ?' `# q/ v @.DrivingHome := true;4 A. \* c6 Q2 d* F7 D# B$ W, v
end;
" G' ]4 X$ ]+ Q3 P3 l- T% u else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 i, P% e) {4 V5 x) F8 I0 I
part := @.transpOrder;8 Z) e' n' A: Y$ h9 ]
part.move(@);-- load part
2 m4 d+ k: H( x" q @.CurrIcon := "load";
, g4 |7 L* Z7 t+ I$ i GlobalDistObj := part.globDestination;
9 G7 g% \! a, E% x/ K" ` assignLObj := rgmanager.rgAssignL;. m' O0 M' n) v n
row := assignLObj.getRowNo(GlobalDistObj);
1 \% {( a- [: R$ k6 s e if Row = -1 then -- since 70
! ~5 J/ R7 v2 f9 i7 N if lan=1 then
3 ~1 P% [0 t/ c2 _7 W3 t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% o+ B5 |/ a& |. k# ? to_str("in der Andockstation: \"",?.~.name,"\""));3 J+ V+ j0 s. c
else8 x" g5 w/ P8 n# n# o- P, N* c+ ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 g3 X7 B- g6 y* q4 l8 b4 v8 d+ O
to_str("in docking station: \"",?.~.name,"\"")); ! A6 A! N: B& B8 @
end;6 V P+ V/ B: `
else
1 N, p5 N% g2 B @.Destination := assignLObj[1,row];) I# L8 I! q9 [& r6 z' ~5 _* K ]
end; 3 l3 E3 E7 J1 X9 N
newDirection(@);& ^* Y2 R. e5 X; A( P/ d# U! p
@.HasOrder := true;
+ |( V$ q) U: U8 C( b% \ end;
9 h' l& y0 u$ ?8 u; q, n+ d/ N end;
# k9 D5 c. U9 h8 I5 O" {end; -- of the method! z: s2 {1 o9 r' V3 ^
|