/* called by: entrance ctrl of the object 'track'
- N- q. J- g/ v, b# ^% K*/
$ ~% a) h$ p) ]2 ^! q7 ais
# n: n' x' M# D/ z4 f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 P; ?4 k7 f. v- L( j0 Ddo: ?' v: i+ C) o8 J- [) v7 X6 A; m* I
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 L% W$ l& F2 h7 z if current = @.Destination -- else return, C1 }/ u" Y6 I: l' r
then
: j6 W8 x4 g) O2 X/ h @.Destination := void;
$ E1 X5 B5 {1 l: A if @.occupied then2 g' H: R' Y" J( F# J. B' H
part := @.cont;; L9 ]+ Y0 M5 W1 t) F: p
@.transpOrder := void;
/ \" G) r0 p0 s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. M) O5 ~: |6 ^2 Y3 z @,root.eventcontroller.simTime);+ A* _2 [9 }. h' b. ]% D
@.HasOrder := false; D- G% I: g' V6 p0 k' ^5 Y- l
@.DrivingHome := true;
7 W: B+ m( I9 v% e; w0 {) a1 U rgManager.tryToStartTransOrder;
6 f# G/ w# T9 Z" t6 A if @.Destination = void
. x) I3 }: ?& c% d4 X2 \ then -- no transport order for vehicle @1 I' K9 w# W `1 t5 b6 {
@.Destination :=- m2 o; A+ f2 @6 `+ B' P7 Y1 g
rgManager.nearestFreeStation(@,track.~);
2 Y- S/ I: L# t9 Z/ A$ r& A newDirection(@); 7 Q' y- ?3 i, @/ A* \
if @.Destination /= void then% @# r1 ]$ w1 l* h
@.Destination.NumReservation :=
& U) n7 B8 w1 [0 |7 d/ V @.Destination.NumReservation + 1;; A M/ V$ [8 m& p5 o
end;9 n; F d# c. S( v% q
@.CurrIcon := "drivingHome";
/ O+ W/ V' u3 S: P0 P @.DrivingHome := true;- i* Y, a1 `8 ~% v* Z( |) a3 J
end;
+ w6 a$ h! Z. t. u6 W: X else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& L. n0 s: ^7 Z, W, B part := @.transpOrder;8 U; ]0 b" W1 I' z+ y! l
part.move(@);-- load part2 j1 ^% L7 o$ f; F) D9 J
@.CurrIcon := "load";
' K6 g& ?5 }+ Z! j: g" q/ t GlobalDistObj := part.globDestination; y* ?0 c2 l$ v
assignLObj := rgmanager.rgAssignL;
! E6 S, e2 \, | row := assignLObj.getRowNo(GlobalDistObj);
+ C" e/ S( r; ?: e0 b4 W1 j if Row = -1 then -- since 70
U9 j( G3 d" ~5 ]6 {: @8 o if lan=1 then
: p0 \; V. X4 z3 k! R3 U" e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
m, c; |* [/ N to_str("in der Andockstation: \"",?.~.name,"\""));
0 {. L% }; k2 J- |+ ] else2 V7 r7 P! ^0 Q* |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ W6 ^* N, ^6 B6 b to_str("in docking station: \"",?.~.name,"\""));
P0 |- f2 [7 J5 c9 d6 b" \ end;/ b/ y( E- U* T' m& M9 ^. N( `2 T" X
else O+ ]4 \* U; a7 k4 Z; B) D
@.Destination := assignLObj[1,row];
0 }6 H) x1 a+ u) `# l end;
; Q9 K7 j% D; _: Y+ S: G' \ newDirection(@);' v4 l* n {: H
@.HasOrder := true;
) K1 x& F1 M" |5 v& F& Y3 { end;
0 x" W- ?) }3 U1 {0 Q8 O0 F end;
7 X8 |9 D3 F1 j k5 P2 F% _2 Bend; -- of the method6 h+ ^' O8 |/ }1 ~
|