/* called by: entrance ctrl of the object 'track'- C8 a) g0 l! p: N
*/
! [% P/ M% E& I0 k3 U4 Iis
" S- w0 C/ J% k5 j part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 U z9 r+ j* a
do" m* B Q4 I! b/ h7 N
Lan := rootfolder.Internal.Tools.AOLlanguage;. w( ^. E. U8 R
if current = @.Destination -- else return
2 c Y2 W$ }* e" A- D then
; [! I! c/ I* }0 m @.Destination := void;! U; Z% I/ ~& S5 V( l# h% A, \, g
if @.occupied then4 h! M3 V; c* T! N5 ~" S
part := @.cont;' |4 V2 X' Y* L
@.transpOrder := void;
! h5 J c& e2 W) p( V5 I! Y) K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# h8 j5 \; S; V* e& k- `/ Z- q. r @,root.eventcontroller.simTime);+ X4 X5 f, @- p q# g) ` G/ c
@.HasOrder := false;
9 {) F4 A2 x, ?7 X1 J @.DrivingHome := true;
1 @7 S n9 j0 a& ]! O4 Q; [ rgManager.tryToStartTransOrder;$ ?" @: x- g% F& E0 J
if @.Destination = void
' C! B0 P! m% a+ c( e" j then -- no transport order for vehicle @
7 ^) z( c8 T8 v8 L @.Destination :=; D4 s" X0 w$ C; |5 j& D
rgManager.nearestFreeStation(@,track.~);9 r! A; U9 e! z
newDirection(@);
E6 m3 v2 i* x if @.Destination /= void then
3 u/ L, ~8 g( {5 j- p @.Destination.NumReservation :=
3 z7 Y6 Y+ Y& o. q0 G& D% _ @.Destination.NumReservation + 1; ]- ?; D; r% u
end;
$ w7 @7 P& t, j. ~7 E5 Z @.CurrIcon := "drivingHome";
- W6 Z) q1 k9 \ O1 j @.DrivingHome := true;
# [. F# @9 q- i5 C end; d" }1 E% h. O" e+ G, T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ t4 |. ?& U# v
part := @.transpOrder;' G7 Q6 x1 d5 l: f0 B4 h% m
part.move(@);-- load part
3 `( O9 p f/ P. K' u @.CurrIcon := "load";
8 e- n0 k( M3 @0 d$ ]* f5 D$ S GlobalDistObj := part.globDestination;7 H; z% D# Q* c/ o0 Z' I/ J7 t( X
assignLObj := rgmanager.rgAssignL;/ ?6 }5 K. W! v- `$ W& r: `
row := assignLObj.getRowNo(GlobalDistObj);
7 p3 D/ c/ i$ _9 _1 ` if Row = -1 then -- since 70
+ l" L _3 V" W if lan=1 then
2 h5 g" m i1 l$ k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( `8 p- A& I( f2 a$ t0 ^4 R4 V to_str("in der Andockstation: \"",?.~.name,"\""));
' h; M( J- B( F else" n4 R5 v# H$ m8 h U/ |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 e8 o/ a* a2 `/ W* L$ w' V( x5 J
to_str("in docking station: \"",?.~.name,"\""));
5 W) r3 P2 ]8 }3 r# c7 \ end;
2 `8 \! P0 e2 E% X% m- R else
/ n, @; P0 D( d" g @.Destination := assignLObj[1,row];( ]8 V6 s" C7 X- d
end;
( m8 E2 ?( r: [8 v newDirection(@);
$ ~7 @* M) g" _" T4 P e @.HasOrder := true;
/ c# A: Y; c7 s) T end;8 k; X, z0 S: F! o2 n6 z) Z, e$ S& k
end;
# `- R5 }% B! u+ q Iend; -- of the method7 t: o" Y* n; |/ }# W; {' D$ M
|