/* called by: entrance ctrl of the object 'track'
- B& _2 N* [! t5 R*/1 R2 x7 \! g g, u
is
9 H2 t6 [% W9 J" J part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! L$ F1 |! O# mdo
, |( ?2 A, A0 w/ R; c' @* ~, a Lan := rootfolder.Internal.Tools.AOLlanguage;& N! ?$ _" R& Q, W+ o
if current = @.Destination -- else return4 ?2 a% p: ~- P5 n: ^$ H
then
. y' P1 o% D6 r0 J* w @.Destination := void;
! H7 P: \! O- X if @.occupied then. o) [7 N- T6 }* D1 q" Q$ A+ K; z
part := @.cont;
; V$ ~. q- \0 M @.transpOrder := void;" R' n* L8 X$ Q! w: A, |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: R/ y; M- y) P/ } @,root.eventcontroller.simTime);
5 n. T8 l9 j7 B. i/ B @.HasOrder := false;
2 a1 i4 }$ `, K/ i, n' p4 t( H+ S @.DrivingHome := true;
p* M9 q* d6 R6 `. R rgManager.tryToStartTransOrder;" h* {( t% M }3 n3 C" N
if @.Destination = void3 C6 e& i3 L& Q4 N1 c' k
then -- no transport order for vehicle @9 C% F0 }2 P7 P3 j
@.Destination :=4 K, G+ Z: Y7 ?8 y# n: z
rgManager.nearestFreeStation(@,track.~);/ V `8 W& H/ F: H- \6 I2 e( {
newDirection(@); K" K( J7 W1 ~* X5 b
if @.Destination /= void then
! `* i- m& i; o- P7 n6 Q* O% G @.Destination.NumReservation :=
2 F' \4 ]& S/ e$ K1 a5 T# i1 _ @.Destination.NumReservation + 1;# K8 Y; ?4 [' B' V5 i
end;, \% L1 N2 z, l* H$ e t
@.CurrIcon := "drivingHome";6 n8 F! y" y3 j( R: |
@.DrivingHome := true;1 H! h0 S. [% E' f% {
end;
, A- c- d) h( } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 R4 T1 a5 u5 g+ I. Y2 J+ B part := @.transpOrder;, Z5 u' R! x6 p& o4 f" Z
part.move(@);-- load part
$ I% G8 z4 k2 H0 h; y7 n q @.CurrIcon := "load";
, r: Q/ \" ]. R5 r( D( ]7 P2 w GlobalDistObj := part.globDestination;
9 u, x3 D* V& i; p( d0 ^ assignLObj := rgmanager.rgAssignL;
( C. B. p4 C# L4 E row := assignLObj.getRowNo(GlobalDistObj);
0 K Y) ~$ v) z) O- `- B7 ^ if Row = -1 then -- since 70, }: W# F# ]% S
if lan=1 then3 M# o/ K! P4 J. i/ O4 g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. B0 P! j; u8 K' v
to_str("in der Andockstation: \"",?.~.name,"\""));
6 Q9 F7 N3 B, }2 H D7 o l1 [ else; Z( H7 a6 b2 F$ C) S2 p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( A$ p h1 X [ `$ Q to_str("in docking station: \"",?.~.name,"\"")); 0 }7 d% {. G" ~5 u! C. p
end;- ^' l9 M' T1 |2 I
else( j8 `+ R$ `' N- u2 l
@.Destination := assignLObj[1,row];
; N0 ^6 c/ m; h$ w end;
. u7 ?& d! }4 a+ ]) I5 g% ]' u newDirection(@);6 w4 c1 X$ a1 y; w% W
@.HasOrder := true;
# v" C$ l+ N! v end;5 D2 g- k+ q: _9 B" h
end;( \* F6 H# G: @9 z. J- P' o, C/ _1 ~
end; -- of the method& u# C1 z8 X: w. D$ T/ s
|