/* called by: entrance ctrl of the object 'track' N m, T1 M- z! S$ G; @
*/
# P9 y7 T$ C. c) J( lis
* Q' L& [2 p& O3 e5 [+ m' }' f* M part, GlobalDistObj, assignLObj:object;row,Lan:integer;% U. u3 ?% ^6 F3 R% B% c8 s. G5 ?
do
, ?0 K9 O, |& U, t Lan := rootfolder.Internal.Tools.AOLlanguage;/ X; s& r: f( w+ n; ]. s
if current = @.Destination -- else return% i* }; c7 X! ]: P3 Y/ H' c
then
, `' I; S* Z+ o9 P @.Destination := void;
3 u/ t( A, _+ F. U if @.occupied then0 J( x" Z! L) H4 F$ C
part := @.cont;
$ P5 F; d& d- h% s/ F4 m @.transpOrder := void;% T% O' M( O5 F/ A0 L+ D. ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 [' p% b* a1 A$ s* o
@,root.eventcontroller.simTime);
. n/ A9 g$ C' }& L6 a9 f @.HasOrder := false;
& b# [+ w4 L, @4 J @.DrivingHome := true;
) M5 v, |4 Q4 k4 k0 b t5 Y5 L& D% _ rgManager.tryToStartTransOrder;
3 g. \ u% v. X" M! r if @.Destination = void
, z6 ? _) l, z. C7 A& v then -- no transport order for vehicle @
6 B A; F! f. W0 f; j- }! e: _ @.Destination :=" T$ _, D- H7 ?. y
rgManager.nearestFreeStation(@,track.~);
; B5 d! @: B9 l$ h& F newDirection(@);
4 p; S1 A1 o$ {. l/ `. K if @.Destination /= void then# O+ j3 j! \6 R' V: ]0 i+ j) W% n
@.Destination.NumReservation :=
3 ^9 l7 V( b5 M& O0 H0 A# H @.Destination.NumReservation + 1;
( @) x" p7 y. Y: [9 f end;& Y5 [; a- T( q
@.CurrIcon := "drivingHome";
( B8 E' `+ u& n" G q @.DrivingHome := true;/ \' e- f+ e$ ?" T
end;
$ n9 r% D3 J8 K# o- H' Z! f7 k+ \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 P4 ?4 F( C# K& W. [
part := @.transpOrder;
$ O3 d$ z+ e& ?# Y$ ~! _ part.move(@);-- load part) u( u8 y( k' d; U% T" f8 E' v) S
@.CurrIcon := "load";
3 u5 S& n4 q+ Q3 `5 e GlobalDistObj := part.globDestination;3 T5 `; q5 {8 W
assignLObj := rgmanager.rgAssignL;
k) x0 W( U' ^9 D. t+ Z- O' K% r row := assignLObj.getRowNo(GlobalDistObj);
) ?7 u- z8 `1 Y: d if Row = -1 then -- since 70' R$ i4 X9 \! K2 w9 ?0 t" A
if lan=1 then
0 m* X- K3 o( s2 p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 x8 \# ]% u8 N- q" g/ F! _ P to_str("in der Andockstation: \"",?.~.name,"\""));4 [$ _3 B* |6 {9 q
else
1 s2 I+ I: f1 p9 q( C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 h: t6 T0 M+ F5 Y8 s to_str("in docking station: \"",?.~.name,"\""));
6 m; X$ _: m* Y0 Z4 m$ g end;) A2 l0 @7 ~- G# H: Z6 \
else; P( W/ H% o2 e3 l! n
@.Destination := assignLObj[1,row];6 D+ Z4 g# F. E! v4 s
end;
1 h4 u F% T5 S+ W- I9 Q, N newDirection(@);' F' k+ a5 r& E4 W) P
@.HasOrder := true;& i" V1 k0 D }) ?
end;
8 m6 Q2 _ i8 L2 A8 O8 ^% s end;- F- j# h( C' A( g0 L( a
end; -- of the method
3 P# X, f9 X" Y- u |