/* called by: entrance ctrl of the object 'track'% v- ?+ n: n( \: A& Y6 P
*/
k* d; t& y! e# jis% t0 M. ~7 J8 ?0 K" J9 w/ C) X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& p% W/ F$ @( Ddo! u4 g7 J5 f+ d- V5 G o# G/ T" w
Lan := rootfolder.Internal.Tools.AOLlanguage;
W8 p. o. W8 M( {3 u if current = @.Destination -- else return
: w5 A% I) ~( A, m then7 M$ c: H0 Y2 |4 x7 z7 |
@.Destination := void;
5 y4 ]7 J3 ]- d5 a9 Y+ } if @.occupied then
7 A) K5 U+ e; ~4 A$ F/ }3 ?5 u part := @.cont;
@5 D! f# W7 f9 b* Y @.transpOrder := void;
3 p' h0 `, K7 ~( R# M+ f. ]9 P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 u7 I6 K7 ~1 O7 y @,root.eventcontroller.simTime);
9 ?) {5 T: S r9 Q( Y @.HasOrder := false;5 j5 Z9 e4 ^0 a8 B
@.DrivingHome := true;
" @" A6 V$ ^/ m K6 {0 o rgManager.tryToStartTransOrder;
0 E1 p8 R- @8 h$ h% Q if @.Destination = void8 n7 K" D/ {& n5 A
then -- no transport order for vehicle @: _$ u, I, m/ X6 h0 F7 v
@.Destination :=
: f! k" K' j% l0 s9 @* e rgManager.nearestFreeStation(@,track.~);
/ m: I3 J! `6 R9 b H5 p newDirection(@);
9 {# o, A) m$ x4 [# d1 m if @.Destination /= void then3 C9 B2 ?- Y: F! w1 {" O$ t
@.Destination.NumReservation :=
$ ?" ?. x+ r: P% W" Y! M8 A @.Destination.NumReservation + 1;
( u: w+ [1 {) b1 s: x4 E- P) s end;
0 L; e, J. s- \( P1 ^ @.CurrIcon := "drivingHome";! [. b0 z) W4 D+ ^4 X9 a
@.DrivingHome := true;% A, _6 x5 i2 }* t8 A% B
end;! d. [; @( r' X6 E$ n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 C$ p$ i8 f1 B* K" P
part := @.transpOrder;
& U1 z: ~$ i7 l& ~% T. d part.move(@);-- load part
8 g E0 V) x2 r/ v @.CurrIcon := "load";
. g( M4 v" {- J. m GlobalDistObj := part.globDestination;
' Y/ [2 ~# y# `; p assignLObj := rgmanager.rgAssignL;
& H2 A' B3 g9 ?3 A8 g+ y row := assignLObj.getRowNo(GlobalDistObj);
8 _1 R6 f8 I d8 ] if Row = -1 then -- since 703 t/ `2 \9 m: `! M, k
if lan=1 then1 }2 r: Q4 }2 T" s8 M* ?4 D) g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( w6 _( B5 R Z% u7 s% e& j7 d
to_str("in der Andockstation: \"",?.~.name,"\""));
6 x% S4 u7 a8 P S5 @4 o else
7 ?8 U8 q- l$ L( r% f' m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ X" `5 x# P6 \+ W' d' {
to_str("in docking station: \"",?.~.name,"\"")); : z5 s# r9 ~0 l/ x. q6 s
end;4 i5 X8 ]3 p ?" |& x( |0 O+ X
else
# L: q. X3 t! B s* B' S$ T' d @.Destination := assignLObj[1,row];
- m( ?1 g* Y. ?4 L/ { A) {; |& F8 h end; $ }* @: `4 Y" W9 s L1 D' b0 S6 P
newDirection(@);
: p" ^( a& X2 J @.HasOrder := true;
) |2 r2 _% {) T4 h" _5 E end;- {( ~1 n6 j( m
end;' O( Q5 B& m- Z# r/ w7 z ~! @
end; -- of the method/ }2 F- B1 k2 k. |8 E# D( o
|