/* called by: entrance ctrl of the object 'track'
7 w5 q1 }. h5 Y, @1 x8 j*/
' B: r) |% `3 c1 P* e3 [is
& u: r. b! W! r0 y o part, GlobalDistObj, assignLObj:object;row,Lan:integer;" e3 P# J3 N) R. F/ }
do
$ l |: n) j6 b$ f+ }( K Lan := rootfolder.Internal.Tools.AOLlanguage;
3 V4 L2 m+ k* S+ }8 d' q V if current = @.Destination -- else return
! `( Z6 g9 u( a* F& u( } then3 z( M2 \2 I" u" {/ r* e
@.Destination := void;
# T8 r* E2 ?7 C9 E8 F, _$ y if @.occupied then- @0 [9 o7 U- k) w& S7 Z
part := @.cont;
) b& z" o( t4 s$ [, T, w1 `- [. \" ] @.transpOrder := void;
! ]5 ]: E/ `. ^) _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' V& W& G" n. m" A9 U* A. t& J% \ @,root.eventcontroller.simTime);
6 b4 z/ R6 T$ c# t, W1 Z3 Z @.HasOrder := false;' z" N8 [3 C1 ~, K% i5 g/ F
@.DrivingHome := true;
) d+ A/ H( E3 v rgManager.tryToStartTransOrder;
/ z0 x0 o0 S7 S& W N if @.Destination = void
! @* k* W" v% I# w$ @; N& U# _ then -- no transport order for vehicle @( h4 J2 p( w& a/ I# `! z L/ P
@.Destination :=
4 w& d4 k1 T" z& s9 ?& G# Z rgManager.nearestFreeStation(@,track.~);& h" V. \4 e1 D" e7 e2 z( T# o
newDirection(@);
, Q: y8 {7 \: E7 l0 y9 x3 j+ {" ~ if @.Destination /= void then3 K. x+ ~! w+ R0 s2 b5 W
@.Destination.NumReservation :=
# z0 S* }. p! z, `, Z @.Destination.NumReservation + 1;
& \* o w& E" x4 ?# p4 I% G end;0 b# b' W' Y/ j3 l4 u1 |
@.CurrIcon := "drivingHome";
+ G* `- X* m! A! z) w; }6 w) s @.DrivingHome := true;
3 J1 d! r# s- t; q end;
: p( T: [# b, \& z& z% |. N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ L6 v9 B7 ~. G8 w: V9 V- ^ part := @.transpOrder;" P. Y/ x9 |: p/ v$ l j3 r4 s
part.move(@);-- load part
( R) j1 w- v4 z- r7 j* ^6 O* r7 ] @.CurrIcon := "load";) B8 X7 ]) Q) b- q8 u5 |
GlobalDistObj := part.globDestination;
4 M; y" c- j! F: c6 g assignLObj := rgmanager.rgAssignL;$ r3 {7 s8 ]/ M. ]
row := assignLObj.getRowNo(GlobalDistObj);& U: n! G$ s! b W) [4 O
if Row = -1 then -- since 70
; b% P p# s1 M if lan=1 then% p; a2 J$ W# @; Z' H2 K1 A: @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: f7 `7 m5 w0 h- b. t0 x1 X
to_str("in der Andockstation: \"",?.~.name,"\""));' g+ I2 m A; t1 p/ h
else
# ^, V: G' A5 v2 Y, l9 {+ \& _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 Y$ q( ]6 L5 o3 k+ h7 D3 o* M to_str("in docking station: \"",?.~.name,"\"")); ! x8 Q" X* T1 I% ~
end;
5 B R, [3 o: d+ ]7 ^ else, g$ Q* ?2 t) a# b$ x6 Y% u! _
@.Destination := assignLObj[1,row];" `9 k3 x7 M8 h. B* L
end; 5 D5 \- I( t0 M* h2 u* L8 u! l
newDirection(@);
9 M: M/ M4 F& r. A& a4 C @.HasOrder := true;
0 ?5 d0 @. J( }. D0 ?% g2 F7 u# c0 R end;
) D0 }" h# {& j% H end;$ t# Z5 X+ c6 z) [3 W9 K: N; k4 ?8 g& A
end; -- of the method& i# {: X5 |3 B9 v3 z9 I2 E
|