/* called by: entrance ctrl of the object 'track', s0 F5 s3 ]) [. W- I+ M* }/ s
*/& R/ s3 O# ]# u! v, X7 _, S
is
0 a q9 m- H9 b# u; d2 R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, C j1 A H4 ~4 cdo) b6 E- G! ]0 S
Lan := rootfolder.Internal.Tools.AOLlanguage;/ z Z" J& A) {+ f* P9 o" V
if current = @.Destination -- else return6 p- H, A1 O0 Y, f! Y2 u
then9 Q7 {: {' N+ Q
@.Destination := void;. ? `) Z" C: W8 b1 f3 X6 l: V
if @.occupied then
+ g f/ t2 p Q2 }: P8 T7 J part := @.cont;4 E1 z! W) A7 H: O9 c7 j6 ~
@.transpOrder := void;1 W6 B7 x! d% G. [2 _4 p! x4 \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 @ i* R& F2 O- ~+ F7 ^
@,root.eventcontroller.simTime);
: a7 P) I& [) k, A @.HasOrder := false;
o! B; j7 e0 l N @.DrivingHome := true;
3 @* ~; }1 E% K( i; I rgManager.tryToStartTransOrder;+ q, p) b7 _0 w1 }( }
if @.Destination = void% \+ w; P9 L" ? k, i
then -- no transport order for vehicle @
r/ h5 Z! n" O @ @.Destination :=
* V- c2 k3 @# v# H- V rgManager.nearestFreeStation(@,track.~);
1 Y/ ~/ E7 J+ x: R* o1 N. ? newDirection(@); * j* s6 b7 k1 H3 ^6 N) ^
if @.Destination /= void then
/ R0 R' c) l1 |, d4 v @.Destination.NumReservation :=
0 r0 C& }, `3 t4 T+ y @.Destination.NumReservation + 1;1 D9 [# l2 x: z# ]. r. O
end;; ~/ _2 ]" z: e: K$ @
@.CurrIcon := "drivingHome";6 _1 s I0 Y% V1 `# \4 L% C! q
@.DrivingHome := true;
5 S( ]. N1 ^- S6 K: \% Y b end;
& g+ x& t0 o; P$ j else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# Y% C7 H# J4 G: \4 b2 _0 Q part := @.transpOrder;5 v4 D9 t5 }9 b8 u! j' d' K
part.move(@);-- load part F+ h) H y8 ~
@.CurrIcon := "load";
3 F/ A# X# W. R5 G* s, N/ Q GlobalDistObj := part.globDestination;/ `1 r# O7 x# M
assignLObj := rgmanager.rgAssignL;; O' i* L* I T/ f9 e% `6 ?7 x
row := assignLObj.getRowNo(GlobalDistObj);
/ Y s2 Z6 ~4 K1 d% i if Row = -1 then -- since 70
9 L2 E m, Z3 H if lan=1 then: t. S. S4 i; {0 |- {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 [. W1 B! h; Y
to_str("in der Andockstation: \"",?.~.name,"\""));
* y/ i) `7 Y* _) ?1 q else
: g7 }% n4 Y' a4 O% R1 d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 b8 j- O& Z* b- p8 |5 h9 l to_str("in docking station: \"",?.~.name,"\"")); 2 ~- F" v1 l1 E* e" P
end;, Y, _% U% [+ M4 N P' v; y& P
else
( \" B$ w: g. _# b @.Destination := assignLObj[1,row];6 @# ?1 q: x1 Q" z) T6 F: j2 E
end; 6 ?% ]1 P. y; X
newDirection(@);
; w+ j+ J/ n- | @.HasOrder := true;" F0 p3 {) K: i1 q @* f1 T
end;) J9 I1 i3 n- ^; Y5 b7 h8 D
end;
6 B, c# D0 \! j; ~) J; P* [* ^; Cend; -- of the method+ t! f! `# H. Y' Q& w) b4 p
|