/* called by: entrance ctrl of the object 'track'
$ n9 O" q# [2 D- [ Y*/
5 G3 r3 s& n t$ Yis
! D4 g, l+ ?7 l/ R part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 f' B3 |& E. a/ r% n5 B
do
1 k. H( k" e1 s% P5 G4 }7 } u Lan := rootfolder.Internal.Tools.AOLlanguage;
9 S( @% M1 z5 u* i if current = @.Destination -- else return
D% q2 \5 V) f then+ y! c9 {: M# a; \
@.Destination := void;0 X# l2 |1 d4 [5 t0 ?6 a
if @.occupied then
' q5 R4 `5 }2 x- s part := @.cont;
) `+ r% a/ k W# H @.transpOrder := void;; ]& a' W# i$ y5 N& T1 _- E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% @5 K7 A0 A! p/ j) G2 S" v/ r$ l @,root.eventcontroller.simTime); B% X e; k3 Q' Q( ], S* C( r
@.HasOrder := false; \+ |6 x0 | M2 z( Q4 v# z
@.DrivingHome := true;- U- Q) d0 m; g) U
rgManager.tryToStartTransOrder;( J% h5 q0 j3 f; ^7 v
if @.Destination = void! I' R1 ] M# e: T
then -- no transport order for vehicle @# W( W3 u! Y9 R% [0 E a5 w6 v
@.Destination :=- B( _" Q% N: |" J1 K" b8 }! ^
rgManager.nearestFreeStation(@,track.~);5 [/ F) Y# m) V8 @+ f0 l8 K3 V( q
newDirection(@); 5 z$ r5 W- g/ z* F% z B
if @.Destination /= void then
+ M: ? t6 ^- b7 |% O5 T @.Destination.NumReservation :=
3 x1 W, k9 B: p( D8 w! Z @.Destination.NumReservation + 1;
# _7 O# t. U/ P( T( B7 B end;
' p5 P4 a8 W( R; M7 i @.CurrIcon := "drivingHome";
$ J* n" C" F( [% ~. C; y; p @.DrivingHome := true;
$ @+ ]- ?& D7 F L6 D/ a end;
$ ]( [# ~% ~4 |) | else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 Z( m- ]6 ^' c- J5 P
part := @.transpOrder;( w" q2 h/ ~+ Y+ J' T1 ?* m( ]
part.move(@);-- load part: A( ^! x( F8 a Z, L0 f( t
@.CurrIcon := "load";! c5 z+ i/ t( ]- O
GlobalDistObj := part.globDestination;
& G/ L( U$ w' [4 a assignLObj := rgmanager.rgAssignL;
, Y- O! `8 |+ ?2 G row := assignLObj.getRowNo(GlobalDistObj);
& Y- }- R7 }4 z1 b! G if Row = -1 then -- since 70
% n, U" R7 f( l! }2 G' J& m if lan=1 then3 A4 g, h, M4 j" W) Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; t, m0 h/ S* H/ q. Y
to_str("in der Andockstation: \"",?.~.name,"\""));# k& M# a6 ~6 g1 B! [7 e; q
else. w) G+ l& w% D& R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 Y8 N7 i; J* ?+ Z to_str("in docking station: \"",?.~.name,"\""));
. g v# {( ^ r" y end;
$ T4 X2 w+ u- u- d; E else
. O" u: ^+ q" _1 G; S: U% ~ @.Destination := assignLObj[1,row];3 ~- D, g4 p Z6 ~) t
end; . l- h c9 w @
newDirection(@);# q& o6 l. C' b6 j7 E& {7 C) M
@.HasOrder := true;
8 V# a1 ^9 R" e7 X# ^* Y* V end;
$ G- M& ]: m; K& A/ Y" A' W end;
! g- B9 Z& c9 [& b0 h) |2 C! Pend; -- of the method
/ K) \3 K* k3 X6 P |