/* called by: entrance ctrl of the object 'track'8 G. e# r. J, D8 e0 C
*/
* u6 W6 y& \: @0 x( ?$ W$ U; vis" R$ k' q/ a4 I+ r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 x9 K; [& U: X
do
$ H/ c8 o# t' J Lan := rootfolder.Internal.Tools.AOLlanguage;
5 `4 Q R. x4 W, t2 W. {; ` if current = @.Destination -- else return
" C% \$ D* m1 `! h1 @$ ^4 [5 n then
* |8 I% B& h+ Z1 g @.Destination := void;- K! C: \& \5 I
if @.occupied then% ~2 j* z- X8 k( F: }
part := @.cont;
" V6 U# J1 v* ]( W( G* n @.transpOrder := void;8 `! A. E2 [ M8 v" a- c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 k" H/ O, S6 i4 w o2 x& a
@,root.eventcontroller.simTime);
3 w) K3 p, U+ m% z/ l @.HasOrder := false;: L. f& m/ @9 Q2 C0 N
@.DrivingHome := true;
2 O/ Q1 S) h5 o+ V: g0 W" o, y rgManager.tryToStartTransOrder;' F& c6 D3 J w
if @.Destination = void
4 H/ V8 a' ] a2 | then -- no transport order for vehicle @4 V8 J. T, |. B4 \ f7 G
@.Destination :=0 T) Y% N( @' W2 H9 {# m
rgManager.nearestFreeStation(@,track.~);6 r. Z0 A& w- _+ D3 F# b# ?
newDirection(@); 3 m! n- i2 F% y0 g, R8 b
if @.Destination /= void then
/ Z; c/ o7 `6 `) {; R @.Destination.NumReservation :=
9 M* t2 r5 X" P% _1 m @.Destination.NumReservation + 1;
, e( x! a4 Z. t6 S& s end;' y* l/ N6 q0 `1 ~! X+ A
@.CurrIcon := "drivingHome";
/ w6 Q2 ~" A# M }" D1 `0 c6 C$ S @.DrivingHome := true;% ?8 }' Z# Z; K4 |* o5 t k$ r
end;* ?* D% o! u0 `% m; r7 `0 i5 E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' m# L* J% u* u1 y) M1 O
part := @.transpOrder;1 X0 }2 R: X- b, G
part.move(@);-- load part, U- T0 V: }, s; p" p
@.CurrIcon := "load";4 w1 p- C% C) V# N2 l1 [& E$ @7 S
GlobalDistObj := part.globDestination;5 r* d3 P+ _1 F! U: L+ S, w* C
assignLObj := rgmanager.rgAssignL;3 M- v. b7 F+ }. F/ G
row := assignLObj.getRowNo(GlobalDistObj);9 I1 H# Z8 G; A0 I a5 q. g
if Row = -1 then -- since 70# d0 B6 S# B2 K: h/ W
if lan=1 then2 r; Q$ J1 R5 Z4 d1 U5 A n& a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 t/ A3 `4 c. z' Y; _
to_str("in der Andockstation: \"",?.~.name,"\""));
( y( I& U4 s- W" S) O6 W& S else N4 z7 P& w9 T0 ^5 m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- M9 r* e$ A8 O+ {6 F- B6 a
to_str("in docking station: \"",?.~.name,"\"")); 5 U) i9 R- n! q- s
end;* d/ y3 |/ a! ^2 \
else1 P0 a- {+ ?# x
@.Destination := assignLObj[1,row];
+ o; B: m, M- S+ _+ V& e. y I" B end;
/ J7 u: u, J- D% B8 J newDirection(@);
p3 w1 O1 M! L# Y& y @.HasOrder := true;5 C2 _2 J2 T+ c$ W
end;1 Z/ P5 c( R8 S
end;
: c2 I- {$ J! I3 lend; -- of the method4 `" K* m/ s$ c2 y5 V
|