/* called by: entrance ctrl of the object 'track'4 M" [2 h6 G# c: v% e* m
*/
: F: j3 |$ D4 S7 ~/ zis
% ~! V/ v, L6 g4 L* ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ E+ e$ i3 u0 [, f
do7 \$ X1 `2 D& w; \+ |1 F5 @
Lan := rootfolder.Internal.Tools.AOLlanguage;
! w& O" C1 f. Q* j4 ]! p9 P if current = @.Destination -- else return& f/ ^8 }+ B" b" c! u& v; E- B
then* j6 B& B0 v$ G9 l) ?9 x
@.Destination := void;
7 a% N5 Q9 A" J q0 B% @ if @.occupied then
( h+ k$ ?* R9 I; Y% P4 A part := @.cont;% {- d4 C9 T5 k( W( n2 `- l
@.transpOrder := void;
& E+ X, A4 P0 V' f# { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 \$ m* _. a9 X+ R3 T3 i/ f9 |8 ~
@,root.eventcontroller.simTime);
; X* B* j( Q! c+ E. u) Y0 e @.HasOrder := false;
, U4 R: A! n2 R/ A @.DrivingHome := true;
9 b6 X& E! z; w' I: ^3 @ D rgManager.tryToStartTransOrder;, J' G) X' a5 R3 {; p# C: s% Z
if @.Destination = void
2 `- S- B* t+ C/ _: ] then -- no transport order for vehicle @
. J7 ^! U1 @8 ^0 t# w8 ` @.Destination :=
7 C( K' X& V' x3 e2 l8 o rgManager.nearestFreeStation(@,track.~);
( J, r. W" D: f+ V newDirection(@);
+ H( s& j% P/ c, N4 e5 Y5 W if @.Destination /= void then0 M4 p/ M& v8 f X. a) H2 q' y
@.Destination.NumReservation :=0 `2 B0 ^' L* U
@.Destination.NumReservation + 1;' F9 l, u$ S) b
end;
( G& E/ q5 l5 l) h @.CurrIcon := "drivingHome";
) h1 u8 e/ G' T O8 ^ @.DrivingHome := true;
: I) g* B& s' M4 I3 ` end;4 J/ K' E7 P& u, Z' a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 M! E, g( w# E
part := @.transpOrder;
8 ]( J& _. B; j' Z part.move(@);-- load part
5 L; p3 b0 [* \( |- f @.CurrIcon := "load";
, {0 m- _4 D, _+ S3 I8 Z( m GlobalDistObj := part.globDestination;0 B; }' w5 Y/ z2 \2 ]/ M
assignLObj := rgmanager.rgAssignL;4 a. O8 G) p5 s# p% `1 X: d
row := assignLObj.getRowNo(GlobalDistObj);
; ?" @9 p7 e2 H% j( W if Row = -1 then -- since 70
; d* W% l }6 T( m) A if lan=1 then
' a- ?- t8 A2 G+ v$ A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: _. V$ `% D$ ]; X. B" m to_str("in der Andockstation: \"",?.~.name,"\""));
1 t. l; ~% H' b8 }1 n. } else: X; s& s( x# x o& V' }+ i3 `- w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ v! |- [7 c& s( `* I
to_str("in docking station: \"",?.~.name,"\""));
6 T1 X! m p1 H) ~ end;
* @/ a4 h0 }3 { E; n else
+ W( W1 _7 x7 o- ^9 j3 q, n9 ` @.Destination := assignLObj[1,row];0 e! u- U" g3 K* P
end;
% C8 V; e- d; t, B. h- s P5 f newDirection(@);$ o- L( G# [' |% w
@.HasOrder := true;" Q9 w) h+ B* O# b; f5 }; d4 j
end;/ ?, _. O3 [2 b- o( g, Y0 k( M" V
end;
% I) k; j( S4 T4 N6 dend; -- of the method
} C. h& j5 X# y) g. ? |