/* called by: entrance ctrl of the object 'track'
: X8 S& U" w- z) R2 B" A*/
9 o6 `! j5 q7 X; H6 eis
, | ?( V. d- w k1 b part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' B: I$ ?1 o) P& Y- V* _4 g5 ?do0 v9 i1 X7 U# e; X- I$ M
Lan := rootfolder.Internal.Tools.AOLlanguage;; y/ w3 O! }9 c3 m" |) A& L
if current = @.Destination -- else return
$ b+ [) u7 D% B, i then
, h" f# W" X( E. R0 u( z7 Y @.Destination := void; T% c* ~ l1 H7 X9 @& q: K$ D
if @.occupied then0 s* L1 B; ] t' M) E" {% I
part := @.cont;
3 r; J; D) v2 H- l2 G5 h2 Z( P6 D @.transpOrder := void;
* `& G0 z. ~ x( { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; F' V" i: | T7 M% {# P8 X: z7 N: i @,root.eventcontroller.simTime);1 X3 Y) ~9 ^! v1 h6 L& u
@.HasOrder := false;
4 ~0 n5 C x6 f" A @.DrivingHome := true;; c* [; c3 e9 z H
rgManager.tryToStartTransOrder;. l Z, k& k& V' W- P1 x
if @.Destination = void
7 c5 ^) ~1 B0 h, P/ |1 ~$ [, | then -- no transport order for vehicle @
2 I) I8 ~9 h0 `0 u1 Q @.Destination :=
; b2 M4 u2 ]: q6 m rgManager.nearestFreeStation(@,track.~);
- q6 c# l# X) v! j5 B newDirection(@);
j# R! J) g* x# g7 h if @.Destination /= void then
+ W. a' ?2 z/ C! u* x+ i @.Destination.NumReservation :=
4 X, j, J& ], [/ a( |" I @.Destination.NumReservation + 1;
' Q" ^' J9 O M end;( c( S1 W, I8 \) [( C
@.CurrIcon := "drivingHome";& v$ W( T9 |/ ]) h9 s8 ]! H
@.DrivingHome := true;; g' s& F# H4 K4 p* z3 D! d
end;
* s7 ^) c( V) d) w9 R* y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 L8 \+ N: Y# u7 @ part := @.transpOrder;
+ t2 m/ j0 z! a& e. x part.move(@);-- load part' T" j0 e6 I( X( Q: D
@.CurrIcon := "load";: J- r' V8 b# s6 v. M+ U% y
GlobalDistObj := part.globDestination;9 p5 _! Y# Q3 V) y' Z$ C
assignLObj := rgmanager.rgAssignL;
6 H. P5 S$ E2 p5 s X8 K row := assignLObj.getRowNo(GlobalDistObj);
, [8 t$ e, y r7 n- P if Row = -1 then -- since 708 u% Q) i$ I9 E/ z' v( h
if lan=1 then$ P$ W6 N# T: d& l N$ R/ n" ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; v, z* p s" K! D) \8 F
to_str("in der Andockstation: \"",?.~.name,"\""));
! N% \& d( R _4 i9 C& l else
, _& H! }; W1 z" t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 x$ g" o- V6 b0 s8 v3 _, d/ Z, q
to_str("in docking station: \"",?.~.name,"\""));
* ?" ]) I' n7 d5 \3 _( i" J end;
' ~" \) O, s4 g% W else
! J/ N' ^* P6 j+ I @.Destination := assignLObj[1,row];4 T3 u4 F& \/ [, d% w( M
end;
& \6 S% D- x+ ]( \4 N/ n o newDirection(@);
G( n( Q4 ^' C( T @.HasOrder := true;+ }- G8 P$ s8 A Q) {/ K
end;' R, Y* B2 L2 Q* R# j' {! a0 r
end;% k+ ^7 u! J# R/ H, @- R H4 q
end; -- of the method
* _) }9 O+ r8 N' H7 w, } |