/* called by: entrance ctrl of the object 'track'
) D7 Z* k' r! f: s; d- P9 a*/9 `* w6 W3 d6 h" R4 s
is
4 k2 p9 U/ H x* a$ a+ t) |2 N part, GlobalDistObj, assignLObj:object;row,Lan:integer;) b+ f7 {5 B' x$ z
do5 v% H3 B! Y; U0 `4 L5 \/ x
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 g- b6 J) P+ W6 j- Q% R( H2 K if current = @.Destination -- else return9 w1 v: p. f* j% @
then
: n+ p9 ~9 c/ P) ^1 O3 A1 b$ h. f @.Destination := void;
5 `0 [" _& @ ]+ T) H if @.occupied then3 v/ Q3 s. s. Z* ?! O4 h. n! }
part := @.cont;- j+ @' M! ?4 W4 N0 `
@.transpOrder := void;) u1 o0 ]3 g5 F1 `7 _8 f, |; l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. o& S9 r0 q7 n0 q4 V K @,root.eventcontroller.simTime);4 |5 d9 q: C/ L# B- J$ p; t L @
@.HasOrder := false;
, w6 `- w2 o" @5 o. n9 c# ^/ r @.DrivingHome := true;
# W! w% ^* _- K! O7 i rgManager.tryToStartTransOrder;+ @& `* p( ^ E! o
if @.Destination = void( B/ b: q a1 z6 j" N% l
then -- no transport order for vehicle @
3 C$ D+ F% ^* G2 H, U& ^ @.Destination :=3 x, q. l0 T# y! [8 h' b6 m
rgManager.nearestFreeStation(@,track.~);
7 d7 Z. U2 `5 }5 {6 Q" {; t* s newDirection(@); 1 u, w' T/ t3 W8 E- N$ G- M
if @.Destination /= void then
( y+ h- y, p4 f5 ~4 s! [ @.Destination.NumReservation :=
/ _+ |' `/ z7 s( X, s# \* X @.Destination.NumReservation + 1;6 o' q7 q5 N+ S- Y
end;, A" _3 A ^3 c9 H
@.CurrIcon := "drivingHome"; i! E# e' \2 u6 [8 L* o3 N
@.DrivingHome := true;
6 |, ^' ~; |3 m Y& a8 r+ g, u end;, O( h/ \" }5 Z2 {" W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 b% \' E! p9 r6 m: Q part := @.transpOrder;
) E4 c6 s- |. ] part.move(@);-- load part/ `# E) }1 g9 m
@.CurrIcon := "load";1 B* ?( y# C) O5 B2 |7 T( r
GlobalDistObj := part.globDestination; F" P7 @5 C1 a3 h8 f
assignLObj := rgmanager.rgAssignL;
' K$ w; I$ b2 }1 [ row := assignLObj.getRowNo(GlobalDistObj);
; S! x% @6 ^. l. z if Row = -1 then -- since 701 M& k& e' @% k1 Q1 v9 L% }* a: c. _
if lan=1 then4 r3 Q* [) v% a& }3 v: M/ A5 U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 [7 l5 j% J' u2 J0 L0 x
to_str("in der Andockstation: \"",?.~.name,"\""));6 j. U- J0 j3 S m" C! }& m. H/ B
else- I1 O4 W, B8 }) Z) E0 D/ k/ ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 s) P6 D1 O& ~% l7 B
to_str("in docking station: \"",?.~.name,"\"")); * i3 h5 I; S" v# f2 {! Z6 a
end;
3 }* O D2 t" @+ C else
- o9 T9 O2 Y9 ]! { @.Destination := assignLObj[1,row];
9 G) i5 s8 x2 H% e) l) J2 l end;
$ Q; q e& ~/ [4 A5 \( f newDirection(@);9 x8 d& t ?6 |, U8 |
@.HasOrder := true;8 v4 m# [' r8 o1 `
end;7 T2 v& f/ z4 z, |1 ]9 V
end;
$ ^9 d3 t1 k* e3 Uend; -- of the method
7 N' O* S" ]1 C9 m5 w |