/* called by: entrance ctrl of the object 'track'
7 k! D* ^7 V; m* |*/& I' ]- B5 O6 ?
is
; z+ L/ [$ j! _# ~$ G; j# G part, GlobalDistObj, assignLObj:object;row,Lan:integer;% N' o! ?* V1 Z5 D( V2 `9 i: R: A
do
6 \. V3 x2 L1 D3 a Lan := rootfolder.Internal.Tools.AOLlanguage;+ n# n y# N$ }# s: I! \, H3 R6 _
if current = @.Destination -- else return( Q' l" _4 l( K1 X) ]
then$ m- A+ @% Q1 S4 m/ N+ s& g6 V, Z
@.Destination := void;% a- f2 j* \8 t' ~8 t
if @.occupied then
2 q" N' \2 o# G, B& s P$ v4 y4 W part := @.cont;
) l% W: z9 H i0 X @.transpOrder := void;
) n1 |6 \# `4 k9 f5 b7 f# @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 a; s2 K5 h, Y% y @,root.eventcontroller.simTime);) j; _. X/ ?8 E- E' j9 u' n
@.HasOrder := false;5 k2 ? [" {0 ^* V( W- t
@.DrivingHome := true;! F' ?: u. L8 i9 c
rgManager.tryToStartTransOrder;
6 a; i+ V3 k% e/ _2 O if @.Destination = void
3 z( a1 r1 g/ g0 m8 y then -- no transport order for vehicle @- j- ?$ R6 x, H3 C4 r& h
@.Destination :=$ ~- ]: w5 E% P3 |; p( I
rgManager.nearestFreeStation(@,track.~);7 B, [& u0 `- K" A
newDirection(@); ' ]3 R7 H3 N: y+ D L
if @.Destination /= void then
( i7 B7 g6 p1 g# e @.Destination.NumReservation :=
" `+ c3 C7 O2 u/ o) R @.Destination.NumReservation + 1;; `8 F* v% k- ]1 D
end;( f. ]6 I# j+ k9 C( \! P
@.CurrIcon := "drivingHome";: U5 y! n& P; O* I* {
@.DrivingHome := true;
' J. R- z& j& N1 W/ l end;
* d- m; |! l3 |9 F else -- the vehicle @ is empty, both vehicle and part are in the same dock station) p, M& e9 |% H1 V a! D
part := @.transpOrder;
- t$ Z( `5 w' m! m part.move(@);-- load part, M0 @8 _- D6 {+ p+ \$ j R9 `
@.CurrIcon := "load";! ]- |/ [' |5 s
GlobalDistObj := part.globDestination;* F+ M- F7 Q; R! F- [( E7 M
assignLObj := rgmanager.rgAssignL;% B8 k' I) N. y6 F! c
row := assignLObj.getRowNo(GlobalDistObj);: ~& S! \9 e( A+ {% p/ j: Z- O
if Row = -1 then -- since 70
1 z6 i0 V- A2 a2 G& s; i* U8 d5 } if lan=1 then
6 h9 X' C$ z6 ], z# T" {& T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), F$ S5 {/ N. [9 b% x+ I/ ?' l* }
to_str("in der Andockstation: \"",?.~.name,"\""));
0 Y1 q6 c F/ T* @; A7 _- _ else
" {: V6 q5 L. V' o8 z6 v- [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ ?- t4 s7 {# O, ^/ M; [; j& p* `
to_str("in docking station: \"",?.~.name,"\"")); 4 n7 u5 e. }6 Q( f' @
end;
1 A, j& ?8 v0 L else
! G6 e$ \1 Z T' q @.Destination := assignLObj[1,row];
, p8 \$ |, P' q% v: F end; & G5 ]( w) @2 {7 y3 o8 Z3 G+ G% F
newDirection(@);7 ]# A2 n; {1 p2 d: v& z1 f
@.HasOrder := true;
" J* M# k* O" [# o end;
* m( P2 J$ b( v7 n end;
/ ~* \ [+ p! I0 t) U: Uend; -- of the method( u* a1 T" R0 B: ?# s9 n9 r
|