/* called by: entrance ctrl of the object 'track'
3 f2 _( z' z) T& x& N. w*/
& r5 r2 P! I4 [1 _: c; Ais' E4 @* ?* {& e3 e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ B C4 n+ E3 P7 E$ E) Bdo
/ m: J% p. F; }5 B; |1 k1 L Lan := rootfolder.Internal.Tools.AOLlanguage;3 D0 Q/ U, _0 Z+ ~/ W0 z% y
if current = @.Destination -- else return
' ~) s" H: s( f& K" e then6 k# ]# n. v! R; w; E% G
@.Destination := void;
4 @* c. r% Z$ e5 H9 r if @.occupied then; Q$ s2 m$ d! r1 ]1 X& V
part := @.cont;
. y9 c" @9 ]2 i @.transpOrder := void;
6 F7 \8 o. U% l& Y; s/ l( z& l5 {. p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% R) t5 G( e7 ?: F# Y# |- q% @/ C
@,root.eventcontroller.simTime);$ O" w, f5 t0 L1 i. K3 K
@.HasOrder := false;1 M: U- S% J( u L+ K6 ~' p
@.DrivingHome := true;
v$ C! n7 h& Z9 W3 m8 O- v rgManager.tryToStartTransOrder;4 x. `" P5 }! D
if @.Destination = void
. k9 f. H3 j- @ then -- no transport order for vehicle @. L5 y" {' O4 n h
@.Destination :=( `$ u6 a- s$ X7 v% b+ l
rgManager.nearestFreeStation(@,track.~);
* K, r F2 V+ B8 A1 w# T4 Q newDirection(@); $ Z& v4 M3 F1 i# d, }# L! Y/ j
if @.Destination /= void then
5 j" a1 m |2 D% t @.Destination.NumReservation :=
$ T1 k+ F% J1 _1 C @.Destination.NumReservation + 1;
4 Z; [$ ~ `1 X1 T end;" M# j, `$ U( Q6 U5 n
@.CurrIcon := "drivingHome";
! q" d( _0 W5 l* g @.DrivingHome := true;
0 A/ [6 M( T8 j$ i end;
1 T4 ?- K2 s% w5 l else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ j. v" ?1 D! _+ R1 D' W' P
part := @.transpOrder;
, a: g7 S2 O" j1 k part.move(@);-- load part% V+ k, d4 O4 T1 P& T+ _1 I% r1 \
@.CurrIcon := "load";
$ k5 O, q& D( D2 l: H GlobalDistObj := part.globDestination; S, n/ r) [/ t& v# o# \
assignLObj := rgmanager.rgAssignL;
% |* F3 G n# O# T' g' u$ M row := assignLObj.getRowNo(GlobalDistObj);
" m2 x6 h4 C2 M if Row = -1 then -- since 70
+ I8 D; _( m' x5 B if lan=1 then
& n8 x$ A- t/ |7 r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ X" e% G* T4 I7 `3 I- S$ T$ ~
to_str("in der Andockstation: \"",?.~.name,"\""));
! ` s6 h9 A2 T# ]/ K else9 h' H# c6 L- q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," [7 D7 R$ F. Y2 j- }) } g' w( t
to_str("in docking station: \"",?.~.name,"\"")); , n0 C% }9 t* E6 }. X
end;
- r1 d' Y$ O4 C1 W+ ~ else
$ Y. g, J6 s# T( R5 A2 t: @ @.Destination := assignLObj[1,row];! i( ?+ o/ c/ [
end; % _! A3 |& J1 ]
newDirection(@);
: Y' }+ T% \" z! m4 W+ c3 T; u @.HasOrder := true;
. X# l' T) M( U1 d* Y' G end;5 ^$ \8 x. b9 ^$ R
end;
; P' I' `6 _/ Cend; -- of the method
% t, f2 h1 @) S4 }" e/ p' N |