/* called by: entrance ctrl of the object 'track'' Z3 n( v! _$ N& T% U7 }5 Q
*/& T, m8 S3 E K; D8 T
is
5 `2 s9 l- X8 j/ x# D% {4 ]+ G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) Z; z: z P8 b( L$ p# X1 F4 q2 `do: K( w+ p6 ~) I; h& a8 Q: w% D1 q
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 b; ` K8 h/ i) B2 q- z if current = @.Destination -- else return
5 D4 R; y; u' y9 `2 I then
. k. d/ ^9 s/ q# r& f0 Y# @ @.Destination := void;) _8 U- f" h" c' H
if @.occupied then. h( D; k: L) q7 F& Y5 K l( |
part := @.cont;
# O6 ~4 E; k# e) H @.transpOrder := void;
; C; G! Q( z' [# v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& s( V$ Y/ n8 Z6 ]8 I1 ^+ ~ @,root.eventcontroller.simTime);, d; ]* Q) q/ B. l! {; A* T
@.HasOrder := false;7 x- Y: u9 h6 A0 j8 n( }* d4 z4 R; c
@.DrivingHome := true;
: L* y f% v! L# c; K3 l rgManager.tryToStartTransOrder; S. w# S6 ]% T" H
if @.Destination = void: A, e! @% ] N9 f
then -- no transport order for vehicle @
. [6 v1 ]1 P w @.Destination :=
, d/ V, Q7 n9 E$ b rgManager.nearestFreeStation(@,track.~);) H# i) X: W. u: n# ^6 N4 R; Q$ u' F
newDirection(@);
% J. |4 @! q1 }! n if @.Destination /= void then, q& R2 T) R1 O: Y) Q* ]+ [9 @
@.Destination.NumReservation :=
- {1 H+ Y; x9 y/ L2 g1 k( n @.Destination.NumReservation + 1;
, q# |: l5 j! x7 X end;7 l2 J9 k$ d) E. N Z1 S: v* l; E
@.CurrIcon := "drivingHome";
, v, l& @8 ^+ G7 @' m3 @: C @.DrivingHome := true;9 @2 i) U, b- K( }! u6 `2 r
end;
: N/ `1 V0 _/ k1 C0 K! N& ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 F& E7 C9 l3 [. H' {7 z% O& a
part := @.transpOrder;1 |; C& w$ a/ [. H8 l
part.move(@);-- load part3 }( o2 G1 I4 L/ ^
@.CurrIcon := "load";
# m" g" W Y: j# k' N GlobalDistObj := part.globDestination;
3 ?. n; M' R9 p assignLObj := rgmanager.rgAssignL;
6 B! l: q+ J) P2 ` row := assignLObj.getRowNo(GlobalDistObj);. K! |0 ~, n9 b0 |4 R
if Row = -1 then -- since 70
2 E2 o: {/ _2 {9 Q7 V if lan=1 then
+ ?3 J! T% [. C" J0 W7 V$ g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- Z7 b; N+ Y0 D to_str("in der Andockstation: \"",?.~.name,"\""));2 ]# t3 k1 R- K
else
0 @2 Z- p2 @/ y+ }" Z; w* @2 W/ t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. W9 D! M$ a4 p. I: }1 ^
to_str("in docking station: \"",?.~.name,"\""));
|, x- R$ M4 L; V+ a9 u end;
5 j9 t$ A9 F3 h( K3 ? else
/ W: p( J O( O @.Destination := assignLObj[1,row];- K, f) {% ^% v
end; - `2 a; g' D5 @: M2 i+ e- F
newDirection(@);1 B) x3 F0 q: x. g9 F# L U+ [1 r
@.HasOrder := true;
# M! d. M2 [0 ~4 S end;
/ X: z% g% Y( g; x: | end;
7 u0 {1 _7 @# g( Iend; -- of the method x) _& a1 l% i, b/ o% f6 M
|