/* called by: entrance ctrl of the object 'track'* S& R U1 ]: y. ^* e8 m8 \4 C
*/
0 N7 `$ H, M& h& A8 A- [9 b& p+ `2 ais
: H$ @0 P+ q9 V, P6 a' k( W9 _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& N; H+ Q C1 Gdo
8 r4 w# @/ X1 L+ D2 X' F Lan := rootfolder.Internal.Tools.AOLlanguage;* c# b9 H: h- G! r* i; j6 k
if current = @.Destination -- else return, J1 r) V* R5 I# Y
then1 s# }2 q( {8 K, D; C
@.Destination := void;
% C+ @% o4 G# k# I! X if @.occupied then
x, m+ ^$ B. A& B+ r* u( m" Z9 ] part := @.cont;
; {3 H& e0 R, |) h @.transpOrder := void;1 `* ?5 `% t1 ]. @* Y2 Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ z. ^, ~6 y& x A$ [8 r, K, p# M7 F3 Y @,root.eventcontroller.simTime);
4 r, J4 u& V& C @.HasOrder := false;* F2 [4 p0 N8 S# I
@.DrivingHome := true;% s( Q& v: t# D# e3 t
rgManager.tryToStartTransOrder;
7 |: u; U( r) X9 r/ M- N" J5 M if @.Destination = void: n+ A( w3 E) O( H" I
then -- no transport order for vehicle @
( I$ y+ ]* A$ Z, Q ] @.Destination :=
+ b1 @1 J! @4 \! q7 ?7 m1 k, J rgManager.nearestFreeStation(@,track.~);
+ u5 v' V2 @5 P0 L newDirection(@); V. t- x- C& u- d
if @.Destination /= void then
% D2 |& P" x7 }# n5 v8 K' } @.Destination.NumReservation :=. B* t8 f0 L& g5 b5 ~, Y+ @3 Y" i
@.Destination.NumReservation + 1;
$ @. }4 [ n \ end;3 A! p& L+ `) p$ V% l/ L
@.CurrIcon := "drivingHome";1 ?! ^2 C( t) L4 K; e) `
@.DrivingHome := true;, i' \0 r" E; t# b0 v6 J
end;
" e. k& q0 _4 i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' c2 B* ^8 P/ J: E" i* n part := @.transpOrder;; F) g/ k6 U! j/ e+ p3 ^
part.move(@);-- load part
' h1 |6 V. g9 L- ^3 v! h @.CurrIcon := "load";
0 \$ I% q3 O @$ M8 `# I/ { GlobalDistObj := part.globDestination;
' g# L& z6 e4 O$ B assignLObj := rgmanager.rgAssignL;
& N6 o% n" W$ i. w row := assignLObj.getRowNo(GlobalDistObj);2 X" u9 ]/ ]. w0 c/ K
if Row = -1 then -- since 70
# n/ K) ^& h+ n& I K- w- y if lan=1 then
0 o9 U* \( k. B" k$ x U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 z! ~2 f2 [4 T3 m5 D to_str("in der Andockstation: \"",?.~.name,"\""));- g Z6 ?; V: q. ~
else$ @2 E) S$ b" i4 k6 Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' s& K0 M6 {; N T& m1 [0 c
to_str("in docking station: \"",?.~.name,"\"")); % f; Q: t* R; Y+ {" r# N; Z* S+ }
end;; Y" C# k, n" n3 n6 D5 N
else- p- b+ ^6 \) }+ L a0 k
@.Destination := assignLObj[1,row];
. Z( U0 P+ H1 r) c6 D end;
7 H5 n3 Z& b, y& K- l newDirection(@);& U6 X* C0 g) {: ~& K2 W8 L" D
@.HasOrder := true;
8 k- x) v( t8 `! B* b end;2 X6 e1 \6 a. v1 q0 s
end;
2 h2 A7 P7 |2 _$ S6 v2 Hend; -- of the method! K* T5 {7 o! b% ^% S5 E
|