/* called by: entrance ctrl of the object 'track'+ T- d! T- k, ?7 v/ x# A
*/4 C) c9 A g7 A/ E2 ]
is5 G3 c: b* A: F: C! Z/ v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( y9 |2 }8 H ~* z( mdo$ R1 Y/ M a; ~1 o) z4 G8 ~; @
Lan := rootfolder.Internal.Tools.AOLlanguage;
) Y. K1 @$ R' i' n& } if current = @.Destination -- else return4 M) [1 e( b5 s
then# @, Z2 y5 f. u- H
@.Destination := void;
+ M0 ~: \. U0 W3 |7 X: C if @.occupied then! D ?; N( N* f h! Y! Q
part := @.cont;; G6 U6 p [5 S9 A
@.transpOrder := void;2 H& Y) v8 \* |2 O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) n, I: D) n$ ~+ t7 o. A
@,root.eventcontroller.simTime);
; t6 k* ?, X# }! `0 {0 l' O @.HasOrder := false;% I0 Z( U" l7 O
@.DrivingHome := true;
) H# U: a/ T \: e rgManager.tryToStartTransOrder;4 E" `& m" p7 t
if @.Destination = void
7 C7 `* z* Q5 H' v- Q then -- no transport order for vehicle @
a* N& n) L7 e @.Destination :=; A& a( X4 S' H9 i+ j+ \; V/ K
rgManager.nearestFreeStation(@,track.~);7 ?1 k b1 i* D1 r. F( D+ z
newDirection(@); 2 }) s- d& L# [$ M# V. T) ^
if @.Destination /= void then
) y; d2 A2 ]$ g2 F @.Destination.NumReservation :=) u* S% M, N' u3 {, s
@.Destination.NumReservation + 1;1 v3 ^1 O5 ~+ {% L3 c' |
end;
' j; [7 G3 E8 t# Y' d: H @.CurrIcon := "drivingHome";$ ~- g6 F( V% s5 X% w6 Y7 }' T
@.DrivingHome := true;
" U* W( f7 Y. \ end;
) E" V+ r- K9 V3 b+ f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 w6 ?# Y$ {; I part := @.transpOrder;
6 G5 ]( k( b+ K- [4 P4 b3 R7 n part.move(@);-- load part
/ P/ |' C* S/ @9 m @.CurrIcon := "load";: S; O, n" [1 F6 _$ @
GlobalDistObj := part.globDestination;) a- H) [* c0 ?7 I- C$ W
assignLObj := rgmanager.rgAssignL;
+ I% M1 j$ [9 _2 h row := assignLObj.getRowNo(GlobalDistObj);
# d7 x: F" d6 j. g5 Q% S if Row = -1 then -- since 70
' @! F! t/ s9 f% y2 e. ] if lan=1 then d% }6 Y* L4 l& ?- ^0 y* Y7 e- h( E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- O$ O8 @( b9 o5 D% Z# P to_str("in der Andockstation: \"",?.~.name,"\""));
% ~1 K' h4 ?$ g" M/ ?/ D, i else& J% ~$ E) x5 {' g0 S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) x' u+ u! O0 }2 A$ P+ X4 g, _' `
to_str("in docking station: \"",?.~.name,"\""));
5 W& ?1 E+ \2 O5 G end;4 M# L; `8 }: f' w
else
5 \( T4 f. K B: G7 \ @.Destination := assignLObj[1,row];
0 E/ S% y+ }( O. _" j2 F( j6 p end;
7 m9 o' h! Z; N8 A newDirection(@);
, X! b$ `& K! S- e8 K) h1 j @.HasOrder := true;6 Q N1 i* d/ C/ p' r; [/ N' ?
end;0 E! |9 q" `3 t6 d
end;
, q. q, q, K, d; |$ Eend; -- of the method
4 d, V( N- U# M" G |