/* called by: entrance ctrl of the object 'track'8 c' M: {5 ^' k9 `6 e+ K( e+ M
*/
" D6 C9 ?! |5 L+ fis' V7 h6 H# N/ W, P4 A! J ? ~6 T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 K$ t% D6 z o1 |
do
' m$ T; p9 x7 z/ l: A3 }! \ Lan := rootfolder.Internal.Tools.AOLlanguage;+ z! ~- y1 _8 p: G. o" w
if current = @.Destination -- else return' N# }' k/ t' j3 `$ G# m1 @
then/ `9 ~ B! c [( I7 M1 ]
@.Destination := void;
7 Y' x( R0 p) v7 E if @.occupied then
7 V( e* }9 s: V/ s6 [( l part := @.cont;: \, p% g8 N# g9 J) E, e+ @2 O
@.transpOrder := void;
) h. j+ M) |/ w/ A; ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: u+ F" D0 C& `+ I! P
@,root.eventcontroller.simTime);
8 }+ j: d* K, T$ X4 G% u& b @.HasOrder := false;. v2 Q# x/ R! v+ A1 d" {
@.DrivingHome := true;9 L1 A% v( {" H: B
rgManager.tryToStartTransOrder;
4 c% M, y. `3 W* R# ~# M* V if @.Destination = void' y* ^7 _+ f& E6 t
then -- no transport order for vehicle @
! f u/ N/ m2 i3 _0 b Y @.Destination :=. u; b' g1 }$ r& S6 w
rgManager.nearestFreeStation(@,track.~);$ k0 w6 J- c6 j1 W7 r# R( a4 c+ L) P
newDirection(@); ' I0 B7 s" J2 H) N2 l$ T9 O# V
if @.Destination /= void then
8 [3 z* p/ E3 l7 E+ [8 A' A8 T @.Destination.NumReservation :=
$ o& T$ Z& E/ M. D! ^ @.Destination.NumReservation + 1;, w$ Y8 A7 m% W. n. G1 }
end;
5 y9 {: {% s& a) x2 V @.CurrIcon := "drivingHome";
0 y9 w4 F @: N' f. _$ ^ @.DrivingHome := true;2 m( k" m2 V& c; S0 ]
end;
- K; M: } _) |: E L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 k- p& o. z9 A part := @.transpOrder;1 |( z1 @: i: x$ O! w
part.move(@);-- load part
7 l; m0 V `- ?! @ b5 M @.CurrIcon := "load";
# m4 Q3 e- o' c+ S9 N GlobalDistObj := part.globDestination;; k7 e2 f* M! o, P: M
assignLObj := rgmanager.rgAssignL;* q# X; A- {' V c
row := assignLObj.getRowNo(GlobalDistObj);
1 O* y* n; d' u if Row = -1 then -- since 70# ?0 n1 A1 R3 l8 {/ b! A
if lan=1 then3 \. g4 \, ?) `6 h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' y( C: c4 [* q. N) s% G
to_str("in der Andockstation: \"",?.~.name,"\""));
' O2 V; V9 f0 q2 t ] else
6 S& F/ h0 T% A* w L% \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% m# A; b, y$ s' E4 G5 F to_str("in docking station: \"",?.~.name,"\""));
; l9 C" @( k& I* Q# y, Z end;! G" s# {2 B+ `$ [% [" e; P
else1 U- ~/ p8 n! ^+ V5 |5 w
@.Destination := assignLObj[1,row];
8 J+ a5 ~0 [9 g end; 6 |+ o+ u& g8 |0 ~
newDirection(@);
0 [. }% N5 C$ b% w8 M" x H @.HasOrder := true;
+ y" g- E$ R6 C end;
+ a% j: X- _. C' ^5 P1 ~& a end;5 w6 q+ K+ d( O9 u$ i, g
end; -- of the method
$ Q$ t% P+ {3 k |