/* called by: entrance ctrl of the object 'track'
% P" Z$ X, [; m. _0 y$ R% T*/* c& s! b: t' i- A
is( s T( e: p3 @& o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' J0 n e% Z5 C- m" Vdo
+ j# f! x& F" r' t k, Z6 F Lan := rootfolder.Internal.Tools.AOLlanguage;/ b/ y: Q% H! m% }$ B' c# S4 a
if current = @.Destination -- else return$ F! Q/ C% h+ ?, b1 z% Y, X2 W
then
2 C- R. J- v! Y+ `) I: b. A7 G: h( { @.Destination := void;) M9 G/ ^+ s* [ \! ]; x5 J' b
if @.occupied then
2 ]1 g+ Q2 y4 U" c! X% ] part := @.cont;
) w# k' p3 d" @' n @.transpOrder := void;* X) v( Z% n# I6 O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 M- N' N7 ^/ I: E4 ~ i6 I9 X" h
@,root.eventcontroller.simTime);
& u# O, c' A3 d( B, C @.HasOrder := false;: w) v2 L& }( g) [2 n- _8 N
@.DrivingHome := true;' K4 m% W, F1 r
rgManager.tryToStartTransOrder;, N9 h7 `- v+ ?/ A* ?
if @.Destination = void x% T7 Y" p5 K7 y4 J
then -- no transport order for vehicle @
$ P" M$ \) J/ x( K) k. } @.Destination :=
& e; J1 {" h+ r7 i+ R rgManager.nearestFreeStation(@,track.~);" N3 t: e; e+ k+ P% G
newDirection(@);
# V8 M& u# i( L8 M if @.Destination /= void then
& X% \' O& V& n1 ^& O @.Destination.NumReservation :=
9 z( k* ^# G+ h3 l% X- f) r9 m. \ @.Destination.NumReservation + 1;
7 f% l2 d6 _# S4 o9 @ end;
6 d* C/ ]/ r: C0 h @.CurrIcon := "drivingHome";. k4 x3 W' z" [, L* Y" S
@.DrivingHome := true;
4 G3 a' n( V! i# y) E7 f end;
6 s. D- ~' T7 x. J$ X' z! X else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 z9 E; |: v5 w part := @.transpOrder;
0 w0 |, Y/ f' E, @% m6 \ part.move(@);-- load part
8 q7 t3 d# U3 C @.CurrIcon := "load";
6 {3 V- E6 I$ M! M( l GlobalDistObj := part.globDestination;! J$ w1 f( j, K& t2 t" n
assignLObj := rgmanager.rgAssignL;( ~% T9 k, ]2 M [
row := assignLObj.getRowNo(GlobalDistObj);
: A- K, k3 r J, B# N6 s% C) `' V if Row = -1 then -- since 70
6 j2 D! w9 p, g7 x7 R1 U' i if lan=1 then v/ \( f2 e6 X2 |' C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) E5 O& f9 e# M3 K7 j
to_str("in der Andockstation: \"",?.~.name,"\""));, h5 Q5 G" `4 e, g7 B/ I. q, c
else
$ B- j, Z) Y: O% J& q1 Z# S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 b+ s- N8 L5 G( y( y8 t3 \. L
to_str("in docking station: \"",?.~.name,"\"")); 0 M- B" J+ j! N
end;
0 _ B9 b6 \( e% J8 |% O4 ? else: _* d6 H7 N; m% b( f7 Q: [6 H4 O
@.Destination := assignLObj[1,row];7 I- m& Z6 j! A( X
end;
; X0 Z- A2 p7 K- ? newDirection(@);
: l5 ?0 t2 U% x. S+ q: N @.HasOrder := true;1 H" \1 c! c: D2 B$ a) O: `3 m
end;
1 F6 K; Y5 A8 o8 m" l4 O( X end;
5 M- O! K' f! ^$ |+ n$ m* Y9 Z! v% yend; -- of the method
* M+ _0 ^8 ^# k2 v' f5 Y |