/* called by: entrance ctrl of the object 'track'0 {( @: t2 R1 ]. _# ^( M
*/. c" x8 u- Y+ I5 |$ D
is) X; `4 b; R5 s6 y3 `8 O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ c! k1 H' v" p3 a
do
( R. j& @+ v3 A Lan := rootfolder.Internal.Tools.AOLlanguage;) D. ]4 k0 `3 ?( T) j- ^# p) F9 z0 Z/ K
if current = @.Destination -- else return
# L) ^% T) ]( ]- S( |0 b% j then
# V& R0 b* K3 [ @.Destination := void;
; _& I, \, B5 U" f0 \ if @.occupied then
5 w7 I3 S! h2 M$ z! t/ O6 \ part := @.cont;
6 b) K) C* |" E- K- l @.transpOrder := void;9 L$ T2 o0 Q5 b* u' @9 O) S" L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 n. a% }8 W. r z/ Q* i& ~ @,root.eventcontroller.simTime);
5 l2 |# f$ v3 B$ A @.HasOrder := false;$ s& D, e l( c# z
@.DrivingHome := true;" g/ S: z& F; I
rgManager.tryToStartTransOrder;: X/ P/ s3 H# Z/ e {
if @.Destination = void
% k7 K2 [5 ~3 {" I5 l7 { then -- no transport order for vehicle @
- {: @2 J6 e4 l1 m! Z, `- C @.Destination :=2 H" q5 E- r- r4 ]+ T
rgManager.nearestFreeStation(@,track.~);
+ ~ L' ^$ W( | newDirection(@);
; h/ s/ {# p, P5 L if @.Destination /= void then. e6 B. ]5 B S! @8 S( r
@.Destination.NumReservation :=/ N8 p! Z: X2 W6 i( b( ^
@.Destination.NumReservation + 1;
4 ?+ Z- t- E/ g+ E end;; r/ s' {3 B5 M5 d" P, j" N
@.CurrIcon := "drivingHome";
3 ^1 q4 a ?( I5 G. e/ c. ` @.DrivingHome := true;
6 i& K7 H7 {& p3 C end;
0 x" P* b1 v9 _3 G3 ?1 ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* E4 H7 m; V- y5 n7 m part := @.transpOrder;
8 @* e9 g7 t/ k part.move(@);-- load part8 i/ B) p6 e! m) h0 h% K/ B
@.CurrIcon := "load";0 w; F/ Z P% A
GlobalDistObj := part.globDestination;, }' r% x+ C5 e- P. F
assignLObj := rgmanager.rgAssignL;
! \+ i2 d$ B! H- W9 k row := assignLObj.getRowNo(GlobalDistObj);
0 [+ K R' x7 y4 Y5 s9 f5 K9 Y if Row = -1 then -- since 70
% B7 E) L# m5 |3 Q2 V if lan=1 then6 w6 ~1 q- C x8 Z! G x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 b% p' z# w, [. r( \$ y to_str("in der Andockstation: \"",?.~.name,"\""));7 o9 Y. ^1 v, Y2 v D6 O
else6 p4 U2 x0 e* @# ]8 Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 c9 Y. @0 b) T" t* k9 `
to_str("in docking station: \"",?.~.name,"\""));
& s6 H) A& l6 ` end;
' i7 K! [* ?+ B, ^ I, q2 I else t) l3 {7 L( }: `+ i
@.Destination := assignLObj[1,row];! z7 b3 {7 Q C J# ^2 A& u- T& O; V
end;
- S F+ D% X; F, q" ] n# X( ] newDirection(@);
" ?6 p: f* C7 J: S- t) g, p @.HasOrder := true;, g4 a0 S8 o# w. q& {$ }
end;
5 v+ V' y: o0 O# s; _: e0 R5 r: h0 K end;+ H! s6 o- s8 m* {$ b d* S
end; -- of the method
1 O( w1 `4 J) T) p% } |