/* called by: entrance ctrl of the object 'track'
3 ^- }9 V. H& l" m) G5 Q0 t S*/
: f% `% S. {6 B5 C* n) p$ tis
' E; j4 J, m; S7 c" A V- h/ \$ J part, GlobalDistObj, assignLObj:object;row,Lan:integer;' z* U1 y( b- v& T7 X& w" P' D
do: C. w; R& f' V. ~) _/ ~8 V
Lan := rootfolder.Internal.Tools.AOLlanguage;
* V4 @0 @8 m4 E$ V: D) u d5 C; |% P if current = @.Destination -- else return( b3 H6 O1 a% F' q* R
then7 m. ]: j- e4 F; J
@.Destination := void;
, Z8 B; w9 Z' u0 Z if @.occupied then
- n- D9 G0 z6 W* K- r, O8 T" H6 I part := @.cont;' D+ w, ~* ?$ r
@.transpOrder := void;$ f- F+ Z7 J/ H& B4 R: B2 p$ ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ @9 k$ Y' D8 c @,root.eventcontroller.simTime);2 I/ {' ~ L: M+ E# C( u% T& A3 Z
@.HasOrder := false;
, }. ^4 l- |3 b6 \7 i) h @.DrivingHome := true;# y1 N: G5 x7 N$ ^) N; [2 o
rgManager.tryToStartTransOrder;
2 e1 y' D4 w+ B) N; Y if @.Destination = void
; H2 S8 \, J! M then -- no transport order for vehicle @+ B: ?" E; U* e9 X" e
@.Destination :=+ L: K$ o; v' r: s4 s) z7 k* G
rgManager.nearestFreeStation(@,track.~);
" D; V9 ]& n; G; c9 X newDirection(@);
" ^; f( h; u# q% _/ a* C: ~ if @.Destination /= void then
! w; p3 X" \" C: w1 A1 w( f/ U: } @.Destination.NumReservation :=
) J. T( @* h+ F; V0 Y, E @.Destination.NumReservation + 1;
; L- K( f' c+ T* W) G4 ?5 _ end;' X* k9 l, I$ L! x; g' K5 K% V
@.CurrIcon := "drivingHome";
' e9 t" G8 [: R+ }9 i0 j @.DrivingHome := true;
5 K8 r* u% n& A end;) e, v" L+ X5 E0 B2 N+ c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ l& S+ |; e( `( o7 e part := @.transpOrder;
& O9 h9 v$ i& X- M, H5 [ part.move(@);-- load part! u6 {. T7 y( H) C. ~0 A
@.CurrIcon := "load";& L* ?+ j: _6 B
GlobalDistObj := part.globDestination;
- ]& |$ q' C$ |4 g+ c+ N assignLObj := rgmanager.rgAssignL;
, t! [6 g) }1 T row := assignLObj.getRowNo(GlobalDistObj);( V3 U: u* }! }2 B0 ~$ T9 k
if Row = -1 then -- since 70
1 b! w; z" }) j& P7 X if lan=1 then
/ y6 ^5 e& A+ I# S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ ^1 _5 ` o( }8 @4 J6 G to_str("in der Andockstation: \"",?.~.name,"\""));
- h2 e: Q f3 S4 ]+ ?2 P else
, ]+ b V4 b6 S5 ~' S3 W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 N% w6 C1 ?' x- Q6 `4 s
to_str("in docking station: \"",?.~.name,"\""));
* ?4 V `0 A I* U3 ~/ U' e+ @ end;. l% x8 p5 h+ b- Q$ B' x
else
2 x0 R) b4 L1 c5 @5 x# d @.Destination := assignLObj[1,row];' H: Y( i! j/ ^
end;
3 h% ?7 ^) V4 n; [ newDirection(@);. J6 J# R% Z0 F3 F$ |5 ^* {
@.HasOrder := true;1 t- `& J+ Q8 \" I3 ^$ y/ D
end;
# N2 r! i6 H y' a/ i end;7 k1 X g/ B- t* n0 p
end; -- of the method
' B$ U( R4 T' [" S! p" l% H, h |