/* called by: entrance ctrl of the object 'track'
* S# k- C3 h0 F) f& `*/. s7 W5 L# S3 x
is
8 D7 h& ]* n v6 O% w, X! v part, GlobalDistObj, assignLObj:object;row,Lan:integer;' y4 G& \1 k0 ^# p" R. l V
do& x" \2 E3 i+ m4 E- l& q9 i
Lan := rootfolder.Internal.Tools.AOLlanguage;
; p' g( r! {$ x" q7 B/ { if current = @.Destination -- else return* x0 F L) N0 }; J$ G n
then3 F: j7 E# ?6 v$ A' N
@.Destination := void;
) p8 _/ B7 @" X$ {: v1 c s! D: V if @.occupied then$ M) l/ z; P" G4 r# G5 t) e: p& K7 `
part := @.cont;* z: k, H. ?$ e% R
@.transpOrder := void;
' u1 I3 y# K. ~/ t% i A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: W3 ?, @/ K9 s6 w' @& I8 Y
@,root.eventcontroller.simTime);9 \* a2 ]: g ~) O$ f3 O, `
@.HasOrder := false;$ G8 {' n* a9 T5 g" u$ o) v, g
@.DrivingHome := true;; s8 ~- r$ m0 D
rgManager.tryToStartTransOrder;
- T- R ?$ Z- P6 r if @.Destination = void
2 l4 E( R H0 l9 `. i { then -- no transport order for vehicle @4 H! x1 N9 _5 ?5 O, }) J
@.Destination :=
* O5 w1 S+ r$ ?) S rgManager.nearestFreeStation(@,track.~);& K, I: Q& P0 X- N4 A" J5 {& A
newDirection(@); ; J5 I+ ?# i9 T$ }& Z
if @.Destination /= void then7 U* x8 i+ m8 K, J
@.Destination.NumReservation :=
. H6 F" t2 i8 f1 r @.Destination.NumReservation + 1;
* X$ S4 m) i! t- r( P% @/ [ end;
, } q5 b9 T+ `# i& G @.CurrIcon := "drivingHome";* z0 D( o a+ Y' I. x
@.DrivingHome := true;
; R' c) ^/ s3 p0 v* ?+ Z7 n end;6 s# Y4 J! R3 t0 w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 j. \( v4 S2 V part := @.transpOrder;
0 l; T+ e1 `" Z! K part.move(@);-- load part4 p4 ?' n. R7 C; |' [
@.CurrIcon := "load";& h9 |6 y% F, b0 g0 c
GlobalDistObj := part.globDestination;
1 U: u# N9 k h; f) K. C$ C0 U assignLObj := rgmanager.rgAssignL;, z" t2 D% B# A+ m* l. E
row := assignLObj.getRowNo(GlobalDistObj);
7 f+ B7 p: c3 M if Row = -1 then -- since 70
- g* q- X* l0 \9 m if lan=1 then
$ M. r& g5 V8 W5 k# J, v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' {7 O: y2 n# ]3 m; P+ J
to_str("in der Andockstation: \"",?.~.name,"\""));
# L2 ^, H t; { else0 X; `3 g* f2 P Z( m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# G4 h6 i# [5 M; ]! O! Z
to_str("in docking station: \"",?.~.name,"\""));
/ p' g7 B9 X- J( V end;& l, a2 v+ T5 o
else" M7 G( h# u o! Z c# k) t5 w
@.Destination := assignLObj[1,row];; m# g5 T8 |0 L1 D. t1 Z9 @
end; : e& U' Y+ r$ `& ~0 w* {
newDirection(@);
0 d) H n/ d/ [! p7 C: v @.HasOrder := true;
. a( ?6 C, r+ W+ c end;
+ Z |0 a o6 S8 j* i: k! Q" G end;, W5 T7 b8 v3 D" _' R
end; -- of the method
8 F. h# X! A% n0 p5 m8 N |