/* called by: entrance ctrl of the object 'track'1 `1 b2 R O6 ]3 @. {: X; y9 K
*/
7 C1 h( M. {0 a% Kis
; }! B+ K; v- W0 V3 a part, GlobalDistObj, assignLObj:object;row,Lan:integer;) V7 j/ q$ c$ c0 T
do; R- o0 s4 b6 T) C+ K8 a
Lan := rootfolder.Internal.Tools.AOLlanguage;" o/ x) v+ Z/ j7 Q8 v
if current = @.Destination -- else return: v$ K5 z7 `5 M
then T& @ o* \# v
@.Destination := void;) y% S7 }: {9 E
if @.occupied then
9 W- j7 |6 c$ s. e7 w part := @.cont;
" x9 N4 S( W% e1 B q- B8 Z @.transpOrder := void;& T0 G& A5 k, a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
U9 W" e+ p+ [4 v& e& @0 ] @,root.eventcontroller.simTime);9 O3 s- b* z/ u2 ?4 }% s
@.HasOrder := false;
+ V# q) g8 S" K& r% r @.DrivingHome := true;7 l% j, g3 ~0 ~6 S% ?' a6 Y# K, j
rgManager.tryToStartTransOrder;
$ } |- n, g$ _. @' U% G( O+ T0 S if @.Destination = void
F. R& A' \3 i2 K$ s then -- no transport order for vehicle @7 d7 v0 q. R) b' X- D7 r6 x
@.Destination :=
2 M6 U4 W! t0 v+ h" N7 H rgManager.nearestFreeStation(@,track.~);* |; V. n) F4 K) Q% A% g4 _4 h
newDirection(@); + b! J8 Y+ `0 _6 _
if @.Destination /= void then# R: F! ^4 ]' T
@.Destination.NumReservation :=
$ ~/ Q5 L, y5 z" ?$ U1 A @.Destination.NumReservation + 1;
8 j2 _6 F& r) h( T$ q) J end;3 j& Q2 Y/ m$ k r! I0 z
@.CurrIcon := "drivingHome";
3 K, Q/ T5 n! o2 O @.DrivingHome := true;* ?& e+ @1 @ V$ l; x
end;
' v+ I( ^6 i4 I$ Q5 l2 @! Y+ g else -- the vehicle @ is empty, both vehicle and part are in the same dock station; @- Q3 S1 p& b6 C9 `: w+ r
part := @.transpOrder;
* Q% r3 @( y7 D# [8 k part.move(@);-- load part
7 o5 o; @; I. ?/ G @.CurrIcon := "load";' A6 L( o. K4 I6 G/ x
GlobalDistObj := part.globDestination;- M$ f1 Q6 k& b, |* Z# x/ c" Q
assignLObj := rgmanager.rgAssignL; m7 S% W: f' X. E9 Z( _
row := assignLObj.getRowNo(GlobalDistObj);
; S* p7 t- w5 s5 N if Row = -1 then -- since 70
4 R3 \. g) }/ }$ Z* B if lan=1 then
6 B: ]2 t; t+ G. N$ }5 G) m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- J8 `) i0 u% O) p% W. X
to_str("in der Andockstation: \"",?.~.name,"\""));
5 D" S: M* n1 N2 g else
( ]& W Z8 P7 K) t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; K( E" g0 |( G% i! J to_str("in docking station: \"",?.~.name,"\"")); - t8 F& u2 v0 L; q0 ]
end;
& s' [! ]% M3 `4 d; E else
- x# `, X8 f* u" R @.Destination := assignLObj[1,row];
( ]' u6 a8 [1 Z. B0 k0 \& `; D" W end;
2 e7 ]/ p6 i& J newDirection(@);
1 e, q$ S* X- e @.HasOrder := true;
; j' K7 d, G; j ^ end; n/ C, T$ I# {9 n4 x
end;
1 ~$ U# a9 J7 Q3 y6 \: uend; -- of the method* r& R( d& C. S" |5 Z: J7 l
|