/* called by: entrance ctrl of the object 'track'
4 _ r0 P6 k$ R*/
. N+ v) l5 G% [2 Dis3 [% N: j. U& ]0 P+ J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ c4 g4 O) v9 J7 Q0 q; }0 d
do
8 ^: ^) n% z" L: o Lan := rootfolder.Internal.Tools.AOLlanguage;
1 X2 P0 X/ y# W; U$ s; S8 @6 t if current = @.Destination -- else return: S# N" ]1 D8 X8 X* R& |
then
}! m3 U" p- q" k j: p& q* Q @.Destination := void;5 ~1 |2 \! v, ?9 v; [1 k1 b, I
if @.occupied then3 w0 h* ^1 H3 @4 \6 U4 C8 Q' j8 f
part := @.cont;
3 N- q8 t6 ^* Q+ R/ Y3 T0 ~& a7 z @.transpOrder := void;! I! m! h! x c9 g0 y5 p* }% I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
f5 ^3 ^1 @$ |0 m; v @,root.eventcontroller.simTime);
* g$ W$ k2 V- ]$ Z @.HasOrder := false;( C/ C2 b5 _( i* }6 A, V7 P+ I2 Q2 B' F
@.DrivingHome := true;8 L* B9 y$ D# J( r6 o8 Z3 e7 ]
rgManager.tryToStartTransOrder;- z- \. `2 K8 i. f; u- b
if @.Destination = void
; S" I# ?2 _ L. l* h4 J then -- no transport order for vehicle @0 X" y3 u6 D2 E" ]8 W0 G
@.Destination :=
1 L# P R5 M( D0 {! k. y& G rgManager.nearestFreeStation(@,track.~);" i+ d p7 y# J* U
newDirection(@);
# c) m3 t( N; B9 a5 _ if @.Destination /= void then
9 c+ i3 L% u+ n @.Destination.NumReservation :=* t b9 i+ M) T" R/ T8 g/ F1 j
@.Destination.NumReservation + 1;7 p3 ], j3 h- T
end; w+ K: ^: }6 w
@.CurrIcon := "drivingHome";) y( v& y5 R* n! p( K" E8 r8 {; f
@.DrivingHome := true;/ N: f/ ?1 s* ^+ q
end;- d- t ]$ s5 ~" }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ H; _7 I4 t: M, ]" z7 x. a+ b, @* N part := @.transpOrder;7 G! k; i( n& x) |
part.move(@);-- load part
& X( @4 \3 D8 W @.CurrIcon := "load";1 I: {' S; [$ m5 T7 k2 }; ?
GlobalDistObj := part.globDestination;
3 V' G r" I+ J" T) d1 S$ O assignLObj := rgmanager.rgAssignL;
% B! t6 Y; d% _' g# S9 ^' A, c" [ i row := assignLObj.getRowNo(GlobalDistObj);
# h% A- M x) p1 m if Row = -1 then -- since 701 K4 j/ `5 J0 o- ^
if lan=1 then" j2 i0 E+ }% ~7 K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 j2 S k. p+ X8 _1 u, r2 D; Z to_str("in der Andockstation: \"",?.~.name,"\""));+ U G% o+ A/ e! D4 E
else
; f1 Q! P+ U9 O. n# J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' ]0 Q) h9 j$ T
to_str("in docking station: \"",?.~.name,"\"")); * d8 ^8 T4 [2 b! D7 o6 T( y5 B
end;
- _ S* v7 N7 f4 [2 k# q else
3 ]' o8 ^3 b N$ Z @.Destination := assignLObj[1,row];1 @8 L0 U1 S% L" y& Y
end; % r- ^+ T& ^4 H4 {- z; r
newDirection(@);
! h9 r% Z1 @. Q% ^. q @.HasOrder := true;
+ E8 S6 Y6 A' G' E- z" Z end;
0 Z: c0 h& K; G) Y end;
" S) m+ N N8 [9 Qend; -- of the method
9 F; y& U: C, j9 X+ _$ m |