/* called by: entrance ctrl of the object 'track'. C" m% ~/ L8 @3 O0 [+ A
*/
# z2 J8 M7 N8 |8 ~$ i5 H7 ]is
! s1 [" f" A7 u3 M% R, z% n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! \0 b" Q8 Q* }! o- O) Hdo7 g' S- R3 z2 |8 h s v4 `/ f
Lan := rootfolder.Internal.Tools.AOLlanguage;
" [3 B# E5 e0 L U if current = @.Destination -- else return$ q1 P) h+ j6 {( q+ }! {0 V" U
then
+ t7 e1 f/ \* h" v6 C @.Destination := void;0 D8 p" q( U2 ]4 v: d! F0 j0 ]+ e- y% B
if @.occupied then" @( g" e% L: z$ _, Z3 h- W
part := @.cont;
/ n7 Y4 r. ]! s# }8 K% N0 w @.transpOrder := void;
6 {% C. G5 Y& Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% r+ }' \4 G( m( u& ^, @ @,root.eventcontroller.simTime);
+ X0 A& M" H" J6 Q @.HasOrder := false;
0 }5 l1 x1 a; ] @.DrivingHome := true;
6 ]; S0 F( P1 `+ g0 X rgManager.tryToStartTransOrder;
J- N4 n' f# v: K3 C4 B' x7 ? if @.Destination = void+ V2 O! E- J7 T {% H7 T5 P
then -- no transport order for vehicle @
" ~) N/ |3 W. x; c: L @.Destination :=, X1 _0 F/ r) S( c |
rgManager.nearestFreeStation(@,track.~);
/ G* B( q' k! L* k8 y5 _" z, E newDirection(@);
- D% S+ Y- n6 P% N if @.Destination /= void then6 U' S* u/ L5 B; l# B
@.Destination.NumReservation :=$ J4 h& T/ u; {3 p+ a( X8 e
@.Destination.NumReservation + 1;
' z; J( z. O& @5 B" u end;1 ^3 L2 B, L3 a7 S2 q4 `; n, U6 W
@.CurrIcon := "drivingHome";7 V' t' ^# i8 m5 N" ~
@.DrivingHome := true;
: w/ |$ k. D: T) @, b! R end;( n u& b1 ~8 c5 K4 A+ S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 c( D+ ?" S) D5 |/ [2 I+ d part := @.transpOrder;
. |2 q0 k( w. `& M/ g ] part.move(@);-- load part
/ Z c" U4 I. _$ r" E7 m @.CurrIcon := "load";
4 P( _- O% P0 L5 U7 M% c2 _/ F0 p GlobalDistObj := part.globDestination;
: q. U4 H8 W9 z% X5 k/ O/ z7 @ assignLObj := rgmanager.rgAssignL;: q3 U# L5 V3 d) ?! g+ E0 R. [ n
row := assignLObj.getRowNo(GlobalDistObj);
4 V0 ?* y& w6 s# L if Row = -1 then -- since 70# E! G! S" k' H! c
if lan=1 then$ v" d1 G( h0 ` n* c# [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 L1 a& s# i6 C9 H% t# i
to_str("in der Andockstation: \"",?.~.name,"\""));% J! K9 z N4 I% C, U
else- p! W- h4 G1 t* ?1 L4 }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 @# t6 P) x M to_str("in docking station: \"",?.~.name,"\"")); ! w/ V% y) \, j% u! n: S1 x
end;+ F2 J5 g7 G8 O3 ^2 x; B
else
1 T' `, i+ b( {5 D" `5 b) W @.Destination := assignLObj[1,row];0 A, {) \% t" y- ?$ c
end; - D( \, K- A0 j8 [1 T) z) X
newDirection(@);/ I2 Q6 Z3 u/ \6 a, Y4 I3 o
@.HasOrder := true;4 j7 L% h3 V& `0 ]; G
end;5 A6 `) P) ~9 M4 |8 B! ]
end;8 G' z' ]' l, o
end; -- of the method5 ?; k. r/ W, ~+ y) r
|