/* called by: entrance ctrl of the object 'track'3 e: X/ x& v% w/ Q, U/ ~; B% X
*/
2 P- m7 s" d$ R3 Dis
8 ?# Z5 { Q+ B3 r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 p1 B G4 H8 u7 i2 G# n& b' ?do- |' I( } |1 ]) m
Lan := rootfolder.Internal.Tools.AOLlanguage;: i. r- X+ G" G* Z; }
if current = @.Destination -- else return
( P7 w- s) x5 U* m3 j6 b8 O. M. T* [ then
& d: [$ y3 J( U, M @.Destination := void;
) d# M: O# v, `" y8 ? if @.occupied then% C2 g) t/ @' d9 l
part := @.cont;7 ?- n! T% ^* ^
@.transpOrder := void;
" @4 ?$ z( g6 B2 W; g, \% t- D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# Q* q' F7 Z* F; a. [3 q4 x
@,root.eventcontroller.simTime);) \5 f+ S8 b* Y' ^7 h
@.HasOrder := false;
/ D+ K4 ~4 @* N; W @.DrivingHome := true;& z0 |/ t& \0 K/ U: C
rgManager.tryToStartTransOrder;, V1 b: e% b! G+ o/ P) n
if @.Destination = void9 z3 S% H( u1 h* V
then -- no transport order for vehicle @* T0 i: b0 o2 b5 O
@.Destination :=
$ z* N- l0 E% {4 p& ] rgManager.nearestFreeStation(@,track.~);% X, B# x# \0 Y2 J
newDirection(@); # K" F0 D. G) Z: c0 F" [
if @.Destination /= void then) G+ o7 f3 w0 x: N5 ]7 }& k
@.Destination.NumReservation :=
/ y' z+ R: P8 D @.Destination.NumReservation + 1;' ^) }1 N+ ]- B) Z) K! U
end;
1 K( f+ W9 E" C1 @/ `3 e @.CurrIcon := "drivingHome";/ I6 f- i3 `3 Z; \3 m
@.DrivingHome := true;
- D0 `7 I" R6 _ end;
- H" p+ P9 a* ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station% m4 ^$ k& b( L; ~9 g5 i7 d
part := @.transpOrder;
# {# i, {( j- y part.move(@);-- load part1 z9 S$ v2 m9 x: h
@.CurrIcon := "load";
2 g' S9 S7 g( k5 O% |/ `/ { GlobalDistObj := part.globDestination;
! {9 |8 l. l4 e+ v5 s" o assignLObj := rgmanager.rgAssignL;
$ D/ j* x: ^7 c, u row := assignLObj.getRowNo(GlobalDistObj);- C0 n# N0 N6 O3 N1 \( q) V* \
if Row = -1 then -- since 703 \4 }: \! v5 P( A5 ~ B
if lan=1 then
7 o: d1 ]. R+ a8 H* F, v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
z( t* J! F" f! o) R! N& N to_str("in der Andockstation: \"",?.~.name,"\""));
1 K/ J3 L% ^/ Z0 P$ R' L2 X, T. ` else9 ^# {: S1 J0 M4 D8 b( b# P* ]" J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( d5 \7 e1 I7 M+ p* _% h: F to_str("in docking station: \"",?.~.name,"\"")); - m' K% A; n! y( ^2 q( _
end;
" ?$ ^: H( V- p8 m0 a2 ` J0 [6 O else
, c$ y' k& }$ O1 @9 n5 [* a @.Destination := assignLObj[1,row];
( k# Y! j! N P9 h1 q; g$ E" |* g end; 2 `& |! I8 I/ g, b* y
newDirection(@);
; F& S( O6 M# t+ X$ ?3 ]5 Q3 M @.HasOrder := true;
, a' a2 }2 |+ q5 \ Z' A- Z end;0 [* k" C2 s4 x& I& [6 J% D: ~! s
end;
8 ^$ `7 d5 Y3 j: p% |: } k J) dend; -- of the method
- p: k4 D( A/ ]5 Y9 j4 g8 L |