/* called by: entrance ctrl of the object 'track'
2 n( A7 V* I8 |; k+ F*/" r: a) g5 M7 J2 U) d
is) s3 q1 p; q, o6 `% S5 D1 ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ e, ~, t$ j3 G2 u2 G3 _3 Z6 ~+ G. ~" fdo% x4 V: |" A1 O0 Q
Lan := rootfolder.Internal.Tools.AOLlanguage;* I4 l8 M0 ?1 i5 G# S* p6 O
if current = @.Destination -- else return) A) P1 P: B, C7 @% }5 N. W5 B# U
then# K* X: t8 a/ Q0 a) Q
@.Destination := void;3 u* u1 D+ {4 o( \9 w0 {8 m
if @.occupied then; N# ~4 B1 L+ g& P# c7 ^
part := @.cont;
- |# e, q$ p0 T+ K @.transpOrder := void;$ T1 b) p7 b8 e0 c6 P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 U6 w. t9 |- E" R$ o; f% l+ A
@,root.eventcontroller.simTime);5 k9 P+ G2 |4 C1 K3 g# L
@.HasOrder := false;. W1 f' b4 y, z) d4 G& y
@.DrivingHome := true;
# E$ E! t$ }- g3 {* h: o' t rgManager.tryToStartTransOrder; \1 v& X5 A4 ~& |
if @.Destination = void6 M$ j4 l5 f: Q! i2 Z$ }/ B: R9 w
then -- no transport order for vehicle @
2 V! ]# Z( |' [* r/ t8 \3 F @.Destination :=) V1 G5 Q! ~6 B+ W& P& S# L5 W% a9 v9 t
rgManager.nearestFreeStation(@,track.~);
4 t8 j0 n& P& J' Z1 Q! z# f newDirection(@); 2 k4 \) o9 h" ^2 V% V
if @.Destination /= void then' o8 ]% Q7 C& c6 h6 y+ B2 y* `" |
@.Destination.NumReservation :=
; V7 U2 d7 l: Z9 K5 z @.Destination.NumReservation + 1;1 K; S6 Q: j- B8 @0 T7 x
end;
& ^- R9 |( O; B1 N @.CurrIcon := "drivingHome";8 ? ]% M5 v+ G7 c1 s( g
@.DrivingHome := true;) ]: q3 P$ H8 A( H
end;5 G2 o1 h* x8 b: o6 o7 m5 L1 I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" A" U/ O& l8 G
part := @.transpOrder;
/ C4 X D+ s' w% G part.move(@);-- load part7 j$ w, `' {, K, Y! o" P \
@.CurrIcon := "load";* }* r$ \! x: ~/ H5 ^: i. X
GlobalDistObj := part.globDestination;
. Y& v1 V) N3 e assignLObj := rgmanager.rgAssignL;
( y7 ] c# y; U$ o! ^ row := assignLObj.getRowNo(GlobalDistObj);
) z2 i& C1 Q( ^& ~8 H! h if Row = -1 then -- since 70! {8 K* j( Y- C0 @4 t% u/ i
if lan=1 then2 O6 U2 G* o* o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 s+ `" _" b Z
to_str("in der Andockstation: \"",?.~.name,"\""));
3 o" @& B: Q/ A2 X N9 s& x8 o else
+ d0 o0 `' l# c( c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ j3 N: W* }) M# G2 t+ l3 f% \* q
to_str("in docking station: \"",?.~.name,"\"")); 9 Y# p; o- C0 z$ e
end;% G9 D( v! G3 O
else+ c/ s( B+ G3 W) B0 v
@.Destination := assignLObj[1,row];
) D+ e+ |+ i& {- B c" ^ end; 1 [8 [ H( _- f3 f W, G [
newDirection(@);
6 w7 P# j3 c' t' |5 I- ~/ P% T @.HasOrder := true;
- o9 K$ |2 c, O; B2 w9 j end;
8 P( ]# y# ]/ d! y8 f: a* A7 G- P end;
5 P; O) r4 A- ~4 w* f9 Yend; -- of the method
9 j8 m8 K6 [, i: x) Z& j0 K3 Q |