/* called by: entrance ctrl of the object 'track'9 N7 K: E* G0 G2 }
*/% b& b8 k! D. L0 H
is6 w$ c& F/ g4 u' k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 F% q1 k! z( ]! [* _7 fdo: R* X- M8 n2 u) i+ U9 M
Lan := rootfolder.Internal.Tools.AOLlanguage;7 M9 R% ^, M/ P- {% m. I
if current = @.Destination -- else return
+ Q/ {0 m& }4 q/ V6 J) l+ M then
$ V( e% c5 _6 l4 m! ? @.Destination := void;4 z5 x$ @0 L/ O; K1 d5 N; T& M
if @.occupied then$ d/ k8 [$ I$ } W
part := @.cont;; U; H3 g+ u: p5 e* Y
@.transpOrder := void;
5 P, N* I% P2 H/ n2 x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 B9 o, k$ H, w8 b: s
@,root.eventcontroller.simTime);
6 w& _1 U+ M9 `: w, N- v1 u" ^ @.HasOrder := false;2 G6 `: h) T5 }; {
@.DrivingHome := true;% a. n4 f5 e$ W$ \& [2 j" j- G4 F' ?
rgManager.tryToStartTransOrder;# G9 ?& G6 @4 W' T+ K# _
if @.Destination = void- `( N9 \9 N) A0 ^2 V) a" o! l+ c
then -- no transport order for vehicle @
/ L: A" L, u+ k" x- ]+ i0 { @.Destination :=0 o( g9 E1 S8 Y G
rgManager.nearestFreeStation(@,track.~);
! w4 i5 z2 V! P% i$ S newDirection(@);
4 `+ ^" M3 f+ K; T9 ^0 G+ [' p9 ?) A if @.Destination /= void then7 \6 L6 ^' z% _. N& E, l
@.Destination.NumReservation :=
( U! w, ?; s, H2 N @.Destination.NumReservation + 1;
. y9 p# B; L7 D2 g; q8 m end;
# w9 z3 i* N' D @.CurrIcon := "drivingHome";
9 V. u4 Z+ v* Q* h @.DrivingHome := true;- q( C& L y' s& L F
end;
( e) K, L1 n5 y3 Z; h5 Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 B0 e+ n/ Y3 P1 K4 R" o
part := @.transpOrder;! E7 R* B2 H4 L' P. E; T4 b7 P
part.move(@);-- load part; H: V. \0 H" b" N4 n! {
@.CurrIcon := "load";
0 g" I: k! S& o( {6 [ GlobalDistObj := part.globDestination;1 Z! }* d3 S7 p) w/ [
assignLObj := rgmanager.rgAssignL;0 f- ]; ]6 P: |. I2 `& `
row := assignLObj.getRowNo(GlobalDistObj);
7 w6 \6 ^# G" z4 K( d- B: t if Row = -1 then -- since 70
1 S: @: W# j; m( T' ~1 a if lan=1 then
& e. c/ |! Q- | n4 j8 k M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# B* P& ?7 g, D( ^) t3 B to_str("in der Andockstation: \"",?.~.name,"\""));
, v7 J* c" ^* S' D! P( ~# q8 C; Y+ ` else
6 `6 j) L; h% \+ j% e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% A3 t. f( b/ R7 w" R. f* @ to_str("in docking station: \"",?.~.name,"\"")); ' e5 f0 L6 X' F" J, q+ x7 E
end;7 V" T. r2 k1 v! z- h1 {; D+ [
else3 T/ h: }5 a* K0 I# ~
@.Destination := assignLObj[1,row];0 [( t, A, Q+ [' I3 g- c8 C
end; / [( ~. }+ W" d$ i- L
newDirection(@);
0 [! t3 }3 m& @, u6 O$ X @.HasOrder := true;
- L) w! ]+ x+ |& [- Z. m end;$ {7 h9 F" F8 D2 i' K
end;
) g i. M) a. T6 H3 h$ Gend; -- of the method
: j; c) _/ c8 Z/ J( l2 E" ^ |