/* called by: entrance ctrl of the object 'track'* Q5 O0 \, Q% e" C
*/# e* [; h6 c5 P# |0 e, ^
is ^2 F( ^5 K% X7 W6 g- m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* M Z, s, r2 o# Q- ado
8 E5 N% ^+ ?. [ v2 w* r; Y/ x5 R Lan := rootfolder.Internal.Tools.AOLlanguage;
7 O: q! q6 t0 E6 }6 i if current = @.Destination -- else return
. L$ a" V; t7 j. l9 p8 w" y then
. H% i5 B8 w3 L. \$ m @.Destination := void;% e/ K# w- R5 w+ r( [# T/ w- g
if @.occupied then2 q2 ]5 _/ P; V- m7 d; A' `) c
part := @.cont;
! n/ [& T0 J% C5 C- r I4 H @.transpOrder := void;+ F% B& }1 M5 N( C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ m( t1 u) L6 C6 _4 O# ~' V @,root.eventcontroller.simTime);
* P: P u9 V5 c$ D& { @.HasOrder := false;4 H% [0 b8 E* ^9 Z& @. [
@.DrivingHome := true;
' z* N. k" a7 V0 j( ] rgManager.tryToStartTransOrder;
; a# {* A1 R8 y( C" Q' ] if @.Destination = void( o+ W+ j& |! j8 W
then -- no transport order for vehicle @) }2 a4 |9 ~: q2 r- D) a
@.Destination :=
1 T0 M3 O6 U, B, l4 r rgManager.nearestFreeStation(@,track.~);
7 j% D y- |/ ?: L, W/ n, O newDirection(@);
3 M5 |0 M0 Y W5 w; b if @.Destination /= void then
* J. h/ b" d* P2 @ @.Destination.NumReservation :=: ?" p+ o8 }& D. r7 D* _9 C
@.Destination.NumReservation + 1;* ]- k' i4 G7 v$ w2 A4 g
end;, W( U# G; P* o4 C* d( K8 p
@.CurrIcon := "drivingHome";# F J5 `2 g1 E6 U# O
@.DrivingHome := true;2 \9 K2 w7 |: a( R' i" g
end;4 ^; ^. o9 P# A l g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! T. {$ S' }- j* Y! m' [ part := @.transpOrder;2 v6 Z. D) d9 g/ q- j, b* v! F! ~; M8 v, P
part.move(@);-- load part1 z; I& A8 B! n
@.CurrIcon := "load";" H( K. ?$ z: ^5 ?1 W" Y
GlobalDistObj := part.globDestination;2 h# j; L% E7 s6 N `5 V0 _' z# q
assignLObj := rgmanager.rgAssignL;
8 }. M5 w, U* l5 M row := assignLObj.getRowNo(GlobalDistObj);+ y& R; B* x: J
if Row = -1 then -- since 70
5 P) ?, m+ ~- k if lan=1 then
% x. X% ]1 v8 U+ a9 S \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
q9 \& ~2 y; y4 ?" P8 n6 q. \ to_str("in der Andockstation: \"",?.~.name,"\""));
3 I" X! O- l- N2 d0 o else0 n- Z D# I% e* I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 M) g; L! F$ _
to_str("in docking station: \"",?.~.name,"\""));
& O/ B) H" Y% _8 v& v7 a* y) `, h( { end;
2 z K0 G: @. P+ M J- E else3 h S# o% i. S; l; ^
@.Destination := assignLObj[1,row];
# A9 Z C! {; q* t* L4 K end; ! D! a* R6 D, U( t9 q
newDirection(@);
b! C1 p7 N% Y w0 ~4 ]' } T7 j @.HasOrder := true;, q/ u z$ h, f( E
end;
1 N. e5 W% G8 d8 O end;! x9 Y! A1 @ p5 K* u* z* _5 ~
end; -- of the method l' y( Z: t' H" u+ D9 L( q2 z
|