/* called by: entrance ctrl of the object 'track'5 A9 D/ F0 f0 S2 X! u
*/
$ c h t7 q% D' t) h) C& {is
7 c( Q- X9 k0 P- j" V, N part, GlobalDistObj, assignLObj:object;row,Lan:integer; S5 M. E' h/ P- h' k0 u
do
. J }: T2 n& Q( W3 Y Lan := rootfolder.Internal.Tools.AOLlanguage;
- M; }6 m% W6 \$ t if current = @.Destination -- else return- J. t m+ _/ Y3 \! r# u1 s. Z/ M% z
then
N2 z* ~9 r1 g' u* u- y/ m @.Destination := void;# s9 ^! ^8 g h& U
if @.occupied then* k* @( ?. m ?% C/ m/ \5 v2 h' E
part := @.cont;8 _6 H9 ^. B3 y# ~3 \
@.transpOrder := void;
# r0 [1 b' K$ V3 q4 q! B% w1 V: n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& h1 {7 i' {% j) C- |$ f @,root.eventcontroller.simTime);
q8 y% j+ U' k7 p M0 I; j @.HasOrder := false;
7 [ B d( f: J5 q @.DrivingHome := true;; F) O. Q% P# Y5 R6 s M6 h
rgManager.tryToStartTransOrder;
9 G y8 I9 ? k) I) g! k if @.Destination = void
1 f+ @- J9 D( x f then -- no transport order for vehicle @0 ^- b- c- z1 U
@.Destination :=
* n9 V3 F# M- ]9 A8 Q q rgManager.nearestFreeStation(@,track.~);3 x8 s5 f& b3 ?( A0 O$ {0 M. d
newDirection(@);
# F! z8 ~. w U3 R if @.Destination /= void then
& i% j0 D( u3 Z% ~' E @.Destination.NumReservation :=
6 T3 i" G/ L/ u1 v4 | @.Destination.NumReservation + 1;8 o( w& T7 }: K% `6 z
end;% p5 [/ L6 K7 m: c2 n
@.CurrIcon := "drivingHome";+ {& U6 h! u. G- L- u! I
@.DrivingHome := true;
2 C9 H* P3 V+ t# n9 V end;. t9 n+ L4 v P4 C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 Y$ G# x3 _' V. W" T- ~
part := @.transpOrder;
, h0 F' K4 L- B% @9 X' | part.move(@);-- load part7 N+ w4 t- s% T$ N
@.CurrIcon := "load";
' x& u9 x# D+ O. Y8 T& f% U2 S- D1 k3 \ GlobalDistObj := part.globDestination;
7 X* @3 t- [' \" n ]8 T assignLObj := rgmanager.rgAssignL;
& R1 y2 K2 c( s. G9 r row := assignLObj.getRowNo(GlobalDistObj);
6 F" c, X7 V" n3 m if Row = -1 then -- since 70
! v" h4 o/ |5 m! l8 H! w if lan=1 then
1 d5 H% D* h( {/ Y0 H+ Z, R: ^$ Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ R8 p* c. `5 F9 n, P0 G to_str("in der Andockstation: \"",?.~.name,"\""));
% B, X6 z- q4 d' y( X) o else7 R( q" v# ^ P T, V, g: \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, W7 {- D S" m y
to_str("in docking station: \"",?.~.name,"\""));
1 d6 M% i9 _) b9 g6 r9 a end;
6 p2 G* b" e4 Q6 v else2 s) e1 I' y& w3 k+ V
@.Destination := assignLObj[1,row];
0 c C1 ]; a7 }% X+ @ end;
+ L/ }: _6 Z% `6 O6 G& B newDirection(@);, M+ X. v, n3 r" m, O$ k0 ^/ p1 c
@.HasOrder := true;2 Q. B9 ^ X5 P! P c: O% A
end;" _% B- T. ?8 `2 N, b/ M ^
end;
& j0 [' @: d( S3 W+ qend; -- of the method3 E% |( j8 Q2 V+ K9 Y+ Y2 c
|