/* called by: entrance ctrl of the object 'track'! g; P: X# z& o( ^
*/' l/ @- L, \6 a$ m
is5 U! S5 C' A I6 S+ b- W
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' G6 h& {' n+ |0 f# X9 _" P
do. d) O9 m8 Y+ B* m, u
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 ^" ?! M2 ^* N6 P1 F, Z' E9 \, z. s if current = @.Destination -- else return+ G" K4 _ t8 g, b8 P: Z
then
1 a& _7 l1 m3 A1 L" Q- d @.Destination := void;
4 {+ ?) H- G) K3 }/ y' b7 u. d# d' C if @.occupied then
: Z V; ~' I6 E" t- c' Q: E part := @.cont;
6 V' b3 X- n0 l' J, y8 g0 B @.transpOrder := void;
2 @5 L: x7 t9 l6 ~% H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# Q6 G+ s' o5 X" [4 H+ m' q, M
@,root.eventcontroller.simTime);1 \/ t" [3 n3 A" _( J, u' L
@.HasOrder := false;
% J% V' @* @0 r7 x. [- B" } @.DrivingHome := true;
" Q9 R/ e1 G# j, |2 b2 o rgManager.tryToStartTransOrder;
) N1 Z; i' s+ l7 ]$ U# @' _, z2 Y if @.Destination = void" O _7 x! }; ?4 I2 X" j4 Z/ G
then -- no transport order for vehicle @
$ N6 b" M1 ]" ` @.Destination :=$ c: ?/ H9 a+ H) q
rgManager.nearestFreeStation(@,track.~);! }' W( G; z% f- L
newDirection(@); ( G \, Y& }, d
if @.Destination /= void then. K4 L/ ?( ~ d6 f6 y; @* r) w+ I/ b
@.Destination.NumReservation :=
' ]: |. T$ C9 p. g @.Destination.NumReservation + 1;' w! E$ Y7 B5 K8 [, B7 W; x! J5 [) k1 H
end;
4 y# Q* o# a2 R6 B6 B5 v# M @.CurrIcon := "drivingHome";) [$ N0 u) l8 C( J$ |# o$ B
@.DrivingHome := true;
7 `# Z& \, E! Y/ _7 G end;
0 C- `- S+ c) F5 V: d" } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- ]1 Z; J+ ], \/ ?7 v3 h, I part := @.transpOrder;
! v! g. u' P8 S1 @! l1 ?3 V' T part.move(@);-- load part
! U7 k% G: C1 x5 U3 O @.CurrIcon := "load";
( Y: o1 i1 P0 _8 ?' _ GlobalDistObj := part.globDestination;
) ?3 N4 y5 E& [ a# } assignLObj := rgmanager.rgAssignL;$ C9 C) M8 u) M8 f; {
row := assignLObj.getRowNo(GlobalDistObj);: ~# S( R; M/ z3 s$ s! {
if Row = -1 then -- since 70+ ^( {5 u) Z1 m: K9 V# {8 D, Q
if lan=1 then1 V5 r G e5 o+ V% [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& S/ i0 k* B0 T
to_str("in der Andockstation: \"",?.~.name,"\""));) h/ T. |! `2 j) ^+ I2 }/ r3 t- l* x
else+ l: P2 T0 T* Q% ~9 |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' I( @6 f) K) s+ p to_str("in docking station: \"",?.~.name,"\"")); 1 F. @+ J: ^( m O
end;8 ~$ V! w4 R, p4 |1 Q2 ?
else
- n* n6 I2 A9 U& n: n x6 A$ X* d @.Destination := assignLObj[1,row];
+ z; w ~! l4 y0 }" }* |/ _ r: Y# K end;
0 w) Z3 D8 k& { newDirection(@);
9 J4 E4 Y C4 v @.HasOrder := true;5 C5 u7 ^' V: I3 X r
end;
' T+ G8 Q3 h+ @( x9 N+ Z) s, n end;
0 f6 p) _$ H. Kend; -- of the method
1 t+ r7 r% [5 K% k5 N1 U0 { |