/* called by: entrance ctrl of the object 'track'
, d7 P: `, w1 O9 N# x( |*/
* q( J6 V6 _$ s0 b# T; L- Xis: P$ r# w+ f/ [5 d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 D% Z3 q3 O2 g# z9 ~( n% O
do9 @# q( |4 v2 g6 b! F: G- p7 V
Lan := rootfolder.Internal.Tools.AOLlanguage;6 Z' q! F8 i3 f; ^
if current = @.Destination -- else return
! A- g0 F8 c5 A; Z9 k8 ^. C' D2 w% h then0 I+ v# ]% w; t' |- d) ?% o
@.Destination := void;; N) H, U: ~2 _9 ~& y7 e
if @.occupied then6 r7 t' X+ _& K0 [
part := @.cont;
! ]+ D5 W0 i2 z8 J$ t8 ? @.transpOrder := void;
7 O( A2 y, M; A( F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 R/ I* \8 i2 W1 @3 P2 Q @,root.eventcontroller.simTime);* \! X# [& L3 f/ R$ L- Z" J
@.HasOrder := false;
: [* i& b8 d4 D4 T6 }! `3 D @.DrivingHome := true;) U( m( Y D5 y- ~9 T' O
rgManager.tryToStartTransOrder;
/ |4 T ~+ n1 W0 ] if @.Destination = void5 c- d+ I1 E* R& o* |
then -- no transport order for vehicle @+ K5 L. O1 t' J! H
@.Destination :=
% C. T; [1 V/ a) r% o5 `; y* _* L, b. k rgManager.nearestFreeStation(@,track.~);
( A* O' v7 t# ]6 w' E) j4 F newDirection(@);
0 u! v2 S) _7 D. a/ J if @.Destination /= void then/ m- ]* _/ i7 U0 n5 P0 g
@.Destination.NumReservation :=
* z0 v" S# q" j" {4 v( y @.Destination.NumReservation + 1;( ?; O& z% x5 ?) H3 u# I* ?. } D
end;
6 I0 Y% f' [4 ]) r* O9 {5 [ @.CurrIcon := "drivingHome";
& X- C' j' z! s4 J @.DrivingHome := true;# V% K0 V' I& C' ]! i9 t6 \; n
end;
% S3 K+ ], Z( U! S& m else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: U7 w6 w& K6 ^5 X; Q2 f part := @.transpOrder;
1 U1 K, t8 n; s( ?8 t; F part.move(@);-- load part
& n4 P$ U) p& s. y8 U: D( Q! z @.CurrIcon := "load";* M8 r! ^( i q2 B
GlobalDistObj := part.globDestination;
/ A* T- M+ [2 B+ f assignLObj := rgmanager.rgAssignL;
! l% i P) ]$ ^! I. S2 f; v row := assignLObj.getRowNo(GlobalDistObj);
# a ~4 P* v! d- x6 K" n( w if Row = -1 then -- since 70
8 t: \9 Y6 ?+ p* q$ c8 U# `9 d, I if lan=1 then; @7 t2 h C( B: w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' B; g9 N8 j' ]% d6 R* c to_str("in der Andockstation: \"",?.~.name,"\""));
$ S9 h- U2 q0 Y& @0 y8 p) q else
2 h& V& B, V/ e3 {( J# v p' o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 R! w5 Q) j% |1 r( G
to_str("in docking station: \"",?.~.name,"\""));
2 y, S3 t2 M1 S8 U" U end;
3 q% k4 T: [8 n( J; O else
+ ]: ]3 e# s- h5 [9 l! B- D! B @.Destination := assignLObj[1,row];: r' R; [( F+ u* i
end; 8 w; x7 P. e% C- A, c2 H# Y
newDirection(@);
3 r0 S; x( C5 `2 |3 P8 Q( c# f @.HasOrder := true;
- h6 G. F0 x- Z+ b7 N0 E" I end;
. s) w) x3 }9 \. _ end;
" F# h9 c7 ]; b# Z( o6 Y uend; -- of the method
. f+ V" }* K! o+ B U* i |