/* called by: entrance ctrl of the object 'track'* ]( f$ }1 l8 M
*/
: ~% d+ v" T! k. Yis1 l& Q: u( k& ^! T2 \0 _- U; I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) s( R1 ~! H- z6 A# G" ?
do
& y) j' f! `9 ~- u& s Lan := rootfolder.Internal.Tools.AOLlanguage;& P: t3 H8 {& D9 F
if current = @.Destination -- else return
9 S+ w1 v5 u: l- i! C) F. D! b then/ N0 i4 t' A( [) O
@.Destination := void;# r. _( W3 S2 [ g3 A* V
if @.occupied then
1 A" \ G" ^- z) T/ g part := @.cont;& |& Z& V% d" }+ G& n# D: N- e2 y
@.transpOrder := void;
- F m, P* p+ [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 E+ C' h" X- Q# v* h3 p7 ?3 j0 A* n
@,root.eventcontroller.simTime);7 T. ]9 j% Q. @8 c1 u, V
@.HasOrder := false;# c# } H( v7 J) l7 h
@.DrivingHome := true;
* G, ~2 T* a n rgManager.tryToStartTransOrder;
B1 P7 @! H' p( z; v$ k if @.Destination = void
) h0 @% R! j' f0 J' A8 ~3 G& Y then -- no transport order for vehicle @; x9 m- b$ l) ^" m1 m
@.Destination :=: D4 f* W3 [8 C% p/ g Z2 M7 m
rgManager.nearestFreeStation(@,track.~);
5 Q- a9 i6 a5 W Q' @1 z( a/ y8 @ newDirection(@); ' }2 E) {5 ^6 t6 C2 E5 k0 L
if @.Destination /= void then
* x8 K9 z8 ~; O+ Q6 a @.Destination.NumReservation :=1 ^* M$ m, C0 \* ^6 `
@.Destination.NumReservation + 1; ]" @% R; L7 D3 @
end;
% z- W8 l, {9 R- E @.CurrIcon := "drivingHome";
- ~- ^& L) D2 t+ D @.DrivingHome := true;
l0 K1 b! T6 N7 b5 D/ ], ]6 l end;
8 Z0 u+ E) B, F) M7 L' {% A8 f$ h else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. @0 ]+ A* H* j; a8 F( c: ?% b9 k0 r part := @.transpOrder;
o Q3 W+ r' c* ~* W% ^ part.move(@);-- load part% M& W. \, i/ f8 o7 q& Z8 H
@.CurrIcon := "load";( M# I( Y! D- v. Y
GlobalDistObj := part.globDestination;
- g0 x% U9 F. p assignLObj := rgmanager.rgAssignL;' E( M6 ]* Y4 l* e e* |
row := assignLObj.getRowNo(GlobalDistObj);' e: ]/ c6 \% @
if Row = -1 then -- since 70
3 u# X: f# G: b. u if lan=1 then
$ o7 ]8 @$ k/ I4 A) s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 u! t9 ~: S. k2 z
to_str("in der Andockstation: \"",?.~.name,"\""));6 A% u9 W' U3 K: m
else
4 G5 N8 R* N k5 z: g6 L. U' K: @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ H$ v! R$ N1 C7 O# ]" i
to_str("in docking station: \"",?.~.name,"\"")); $ d6 C" ^. I5 ^
end;1 i/ S" h0 O. g* t$ k" u4 }$ [: [2 {
else# o3 }' r4 G5 J7 B, [/ Y! D; S
@.Destination := assignLObj[1,row];, R" \" Q8 X+ d" P. S
end; % Q: [) F0 ^/ r8 [. l2 w
newDirection(@);
/ S" y4 R3 g3 F8 n: z @.HasOrder := true;7 j' v- ?6 }1 ?" o
end;
' _6 F8 f+ z" ^5 l6 A end;5 ~) a( \; s% H7 N& k' K) Z+ O
end; -- of the method5 l0 ]* H) C5 x: K
|