/* called by: entrance ctrl of the object 'track'6 j; K% P( `# e6 G
*/2 ]: O* W+ g9 R( {4 \
is
1 `- ]( W' [4 ]; U6 @$ C0 _0 l part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" A& I, ~& r: S8 [7 Y6 Gdo* b B4 L; }6 i f; m C
Lan := rootfolder.Internal.Tools.AOLlanguage;8 X; D/ ?+ s- b, s. X
if current = @.Destination -- else return
0 d! K& L1 z$ }6 z/ i then/ v" f/ n ~8 @$ C5 D
@.Destination := void;1 k3 B, K0 ?7 S e; H- K( A, k( i# d
if @.occupied then8 I, k3 @7 O: X& m
part := @.cont;! O1 z; E j3 b8 b( a* J, ^
@.transpOrder := void;% ]/ s6 a7 `. s3 Z x0 I- }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 o) h! _5 p3 ?8 d" K* J: b# n
@,root.eventcontroller.simTime);6 U. v/ J( x/ Q( d. e2 ^
@.HasOrder := false;2 ~# E: `8 h6 p& u! D
@.DrivingHome := true;; j. K9 P' \8 k5 ~
rgManager.tryToStartTransOrder;
' F4 M2 E/ v0 b if @.Destination = void
& q& k8 W# v8 o; q then -- no transport order for vehicle @' f9 L- R$ [& H/ o* g
@.Destination :=
9 B1 g! P/ ]. D8 u. T rgManager.nearestFreeStation(@,track.~);
8 p, e% Z8 P# Y+ C; k5 l A; o& B newDirection(@); F& O, P% D$ e: [+ L
if @.Destination /= void then3 k: L& T$ Q, D) k
@.Destination.NumReservation :=
6 R9 w9 c1 U* _3 j1 j. G5 ~ @.Destination.NumReservation + 1;
) E |) H4 _- @+ j# f% S1 \ end;
3 N/ k* H5 b1 E: s, a" }: h @.CurrIcon := "drivingHome";
/ m+ a6 A8 N/ Y1 ~3 Z @.DrivingHome := true;7 ~ m/ v+ b# s+ [1 t: z1 { O' R% a% Y
end;
% p* d; F5 @6 Q P3 [% z6 Y* [" m else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% W( o! T- O" g3 F+ O part := @.transpOrder;
" x3 _/ g3 o0 x& R4 B, w part.move(@);-- load part
7 d$ x. }3 T- \" h- E @.CurrIcon := "load";; a2 W" l& b* `% H& E
GlobalDistObj := part.globDestination;
! M9 I3 \9 I) J7 }) r, P assignLObj := rgmanager.rgAssignL;* T4 c% ^/ x' p
row := assignLObj.getRowNo(GlobalDistObj);0 O% X' p0 m% Q5 H
if Row = -1 then -- since 708 D. p7 D' C. [
if lan=1 then* K: E* w/ T6 m8 H D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- s: {0 q2 U/ T; o to_str("in der Andockstation: \"",?.~.name,"\""));* @7 d. w% h6 U" c( g5 k6 H* g
else
' k7 I% `( N6 o* n6 G/ y) h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 Y" Q- T6 M1 n* S' _6 y
to_str("in docking station: \"",?.~.name,"\"")); $ \! @3 v# s( f) Q* n, u
end;
# [) R" {# `3 |9 [9 ?+ @ else
7 F- ^9 V% z2 f0 P3 r$ E! X @.Destination := assignLObj[1,row];8 S. `3 B' ^& @1 o
end; 5 x2 b& j/ T& ~( g- S5 a
newDirection(@);
5 r; a' {% F& \* q6 e0 w: m) B @.HasOrder := true;
2 f* G: U5 O6 N1 g, q end;
2 Z) Z$ f% P2 X& | end;
5 @$ X2 v' h$ M6 Bend; -- of the method1 n$ O1 M2 U- q- g& _
|