/* called by: entrance ctrl of the object 'track': l5 H: J* Y( Q. k* V* x! G
*/
$ X5 w/ y) d7 p, ]- ], [is
' j2 m# v- J! ` ?8 Y, x part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 t$ _9 s7 E) _% S7 J/ Zdo
- g% A; w& B m# R# F3 X Lan := rootfolder.Internal.Tools.AOLlanguage;, X+ t% _6 W$ f3 K8 c
if current = @.Destination -- else return
, K$ x* x4 Z6 z2 I& n3 i! S then7 w( @" b0 E3 Y
@.Destination := void;7 g$ x6 g7 R- l9 B9 x; p9 @
if @.occupied then% p- z% w2 O1 ^$ t4 W
part := @.cont;( {4 O) ^1 I' n8 x: ?" I! m
@.transpOrder := void;* o2 Q: v# E% L0 j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: [6 I% {" s) x6 q. H, R p
@,root.eventcontroller.simTime);
6 j# j, j, y- F( f6 B @.HasOrder := false;
. E" h/ q v \% T/ w @.DrivingHome := true;2 a7 r: J! F% v, p/ e) C
rgManager.tryToStartTransOrder;6 {7 Z w, Q% k
if @.Destination = void& j V( a. `4 m& V0 P
then -- no transport order for vehicle @
* p! Q( ]+ A3 i% m; J @.Destination :=
8 G y4 E$ b* B4 U rgManager.nearestFreeStation(@,track.~);0 f b4 k4 e6 V7 z' l3 Q/ Z
newDirection(@);
+ j8 i3 X! }% u" C' `5 ` if @.Destination /= void then% R( k* Q. }3 z4 k: @4 m
@.Destination.NumReservation :=- s$ }7 u5 P9 x9 s7 {
@.Destination.NumReservation + 1;# S4 `7 E% r( o0 O: k1 i" S
end;" P" C. @. D+ p* N" u% P7 L
@.CurrIcon := "drivingHome";; O$ f4 c3 b+ j1 u! T
@.DrivingHome := true;
3 R+ f! e; E8 u7 z end;
c2 e7 S1 x* j+ o/ w/ E/ r else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 P' B6 _! U, Z4 _7 ~ J# m
part := @.transpOrder;- c, B x7 t% C# i+ C
part.move(@);-- load part
B8 p; ~/ u0 p* `$ E. ?1 |" O) f @.CurrIcon := "load";* W: g8 b" L v
GlobalDistObj := part.globDestination;+ s/ X1 g) i0 H* w+ X
assignLObj := rgmanager.rgAssignL;8 R3 s, r, y7 b7 o
row := assignLObj.getRowNo(GlobalDistObj);
8 z1 H/ X) _, N' m ? if Row = -1 then -- since 70
) i5 t. Y5 W+ M5 _+ ~$ b( L if lan=1 then
- [" g# l( D9 \ E' D6 s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ {. Y: C% w, ?. E
to_str("in der Andockstation: \"",?.~.name,"\""));
8 h2 I3 A9 h7 ^ else
: ] h0 O1 M1 U: _' V. X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, g5 o6 H; @$ e7 j) R
to_str("in docking station: \"",?.~.name,"\""));
# Q- K1 Y/ m- ?* | end;
/ [- k& F1 J9 h6 p/ [& ? else% |. E" ]: c. C) n; y' n
@.Destination := assignLObj[1,row];' V3 ~0 h$ u. K z4 y
end; : C. u. W& r+ G+ s9 f
newDirection(@);
; |) F' G0 U5 o, \- m @.HasOrder := true;" M# n/ C0 O' J; h A0 v7 ^' V* t- ^ q
end;
' ^) b7 O6 r& S! Q6 m end;: P# m% h2 b3 [% G6 @ l( _
end; -- of the method
! Q" J$ }5 i, i3 C+ l |