/* called by: entrance ctrl of the object 'track'. R. v- f3 W8 l f% b# H% w t
*/: p% [* A9 \4 f2 {8 D7 L
is Z E/ }; U0 r, V, N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 ^* _- G/ Y! G% m+ e5 I# m$ [. c
do' p2 X+ X" |& b9 |: Z5 s
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 W O& A$ V5 y" a5 L+ g5 } if current = @.Destination -- else return
- m- W: w* U2 @/ S7 x2 W8 @ then
5 U- h4 L5 q( Y+ D @.Destination := void;
. @+ `2 n: ~) |) p# q( W if @.occupied then/ y% Q! T( s( j2 j5 `2 a+ L
part := @.cont;& A. A2 j' ], Q& W+ J' Y0 I- [
@.transpOrder := void;" y+ i: |/ b/ s y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 L6 f0 O8 I! ]8 l! W
@,root.eventcontroller.simTime);3 W! R& _- g. o. V1 u7 z
@.HasOrder := false;
$ o! x# l9 }+ a" N7 }6 Y @.DrivingHome := true;
5 P! e. k4 _9 U. }$ j rgManager.tryToStartTransOrder;2 }( y$ N' n. B X
if @.Destination = void6 `7 G' A) I2 m* K
then -- no transport order for vehicle @
: l0 i3 F9 A* ~. o( ]/ E' X! M! T0 ? @.Destination :=$ w8 a) [, w- ^6 _
rgManager.nearestFreeStation(@,track.~);0 ]5 q. A; D$ m; Q# i
newDirection(@);
6 {/ N; B: F. K! u* h+ R4 X6 F; B4 w+ o if @.Destination /= void then2 C, F0 g0 k- h6 _
@.Destination.NumReservation :=
7 O. G. W, |4 _) N% W5 C @.Destination.NumReservation + 1;" g- M5 C8 {$ U( g2 T! O
end;
0 Z9 k( a& g. j( w6 E @.CurrIcon := "drivingHome";
! s9 Q# U5 \3 w% O3 k! S3 K2 i3 c6 { @.DrivingHome := true;
& V1 S- ]* ?* N: K end;
* I: j. ^0 x- X else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# s8 f3 h+ d+ b! \ part := @.transpOrder;
$ [2 F. \! ~1 C! Q part.move(@);-- load part0 y K6 \9 g# M7 {' P: M' H
@.CurrIcon := "load";4 H% c5 q+ x0 X5 w
GlobalDistObj := part.globDestination;- K7 }% N, G2 `% i; `4 p! E' u; ?7 N
assignLObj := rgmanager.rgAssignL;
' x8 ]: }- H X1 S row := assignLObj.getRowNo(GlobalDistObj);
4 @ }2 H9 C9 Q e/ ^; Q' o6 l5 I( f. o if Row = -1 then -- since 70' {9 f8 S/ S5 d3 ~7 ?$ C9 I% {
if lan=1 then
, R& ^# L3 u. s# y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: F& l( |, w a5 T, h to_str("in der Andockstation: \"",?.~.name,"\""));6 @8 `- u# @% B+ F: M( c
else _. V/ @* |- H8 |9 v4 k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 ^3 y2 T% u& C9 M t4 E
to_str("in docking station: \"",?.~.name,"\""));
1 H, t, e- {/ }& A6 ~/ b( h end;
/ R5 P, U9 x; \" N7 E. o else
5 z8 K1 _; `1 @ @.Destination := assignLObj[1,row];" p0 z3 p' Z" k$ u) e% }
end; & ~7 z6 F0 i, o8 S& g. G' z+ z
newDirection(@);
$ W( {+ n$ W7 ]0 D @.HasOrder := true;: I% K' |3 G: G/ m1 a& ~
end;
4 |8 T9 B6 v% S/ A, Q end;4 T) p0 F/ d4 s+ ~+ d$ A3 U
end; -- of the method' Q6 y }/ K# E
|