/* called by: entrance ctrl of the object 'track'
* G. ~& H1 _' u9 @3 Q*/. W% r1 B' T* V5 y$ w$ |- D+ k8 z2 n
is( _1 K! l$ p5 E: r/ M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ Q4 T ~- `% e% p; J( ^do
0 r+ M6 g' M8 ^ q Lan := rootfolder.Internal.Tools.AOLlanguage;* L1 e: x: {& w1 l6 l1 H
if current = @.Destination -- else return7 v- y- ]2 I9 A
then2 x5 z0 h2 c7 p3 A2 |! |
@.Destination := void;6 |9 o( S7 U. M8 b# t
if @.occupied then$ G0 i, Z8 S+ T8 D% I$ W6 V0 a
part := @.cont;4 d' S; B! N' D: E F
@.transpOrder := void;
6 s& M! V! p1 d; H* [( k6 W& y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- H A" d' \, D' n1 m7 e @,root.eventcontroller.simTime);
" b* q; P! R9 ~/ O) P7 y5 g @.HasOrder := false;
p7 N, s+ v) f" } d @.DrivingHome := true;+ n0 @0 r7 i# l9 n+ H1 [+ Z' T3 u
rgManager.tryToStartTransOrder;
% u8 j N4 |3 r) t: N$ x% l0 Z if @.Destination = void
( B: H/ ~! f! R, o1 z then -- no transport order for vehicle @& q. X d! C- |, U* Q
@.Destination :=; M, E- a: y0 b1 ]
rgManager.nearestFreeStation(@,track.~);
. ^+ @3 x/ ~, y+ j/ v5 v9 ~& c newDirection(@);
' A" N+ Q) u9 R% ^+ b if @.Destination /= void then
& |6 V: N" ~- t @.Destination.NumReservation :=
5 c* b( G# A+ n u @.Destination.NumReservation + 1;
. ]0 j6 a' ?2 Q end;
5 m: C% G& U( \9 P @.CurrIcon := "drivingHome";
% E% K# a) i+ I/ i @.DrivingHome := true;
2 ]1 y. M* |! C: H+ y f6 e) u end;9 \1 e! R& b* Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* B6 P( d% a7 q' z* N
part := @.transpOrder;
- ^: n' B$ R6 I part.move(@);-- load part
+ M- a- ^1 R+ i5 r @.CurrIcon := "load";
5 ~- f* e" p; ]; F# u GlobalDistObj := part.globDestination;
* n) t# J. w7 C# `% h4 y+ y assignLObj := rgmanager.rgAssignL;8 E* h) ^3 Y# X0 }
row := assignLObj.getRowNo(GlobalDistObj);
) p) W& _7 l# ?" ? if Row = -1 then -- since 70
6 ?$ o# p* Z( ?5 [. Y: P9 J, ^ if lan=1 then
, Q( c G+ _3 V1 y( h& ~- V3 [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 |) Z2 C# \2 p$ M
to_str("in der Andockstation: \"",?.~.name,"\""));6 @( I2 a1 h& _/ N0 X
else( g9 z% x; q) W) A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: x8 a6 M3 c0 z+ J( o+ H- N
to_str("in docking station: \"",?.~.name,"\"")); p! @( V! D' x3 j5 ]4 F F4 t) ^
end;+ K) g. z. n6 U# o
else3 N: c" P5 O* g6 t7 g# F
@.Destination := assignLObj[1,row];7 f! ~$ H$ {" G5 U4 }
end; * ]) A4 s$ v% N0 d
newDirection(@);1 O: Y# h) j# Y" V. a% | f4 h) [
@.HasOrder := true;
C% f% Q$ u7 a* ^ end;
$ D2 W" t$ Z2 y t: A end;# T4 `3 a- P! |- n! r; C
end; -- of the method
E/ A+ S! i; {, T5 m$ f- _ |