/* called by: entrance ctrl of the object 'track'
4 M. S; y- D' m. W; P*/- Z8 k5 Z2 `! V" V5 h" k6 {
is
- t8 U; s8 H/ Q! S7 ]% L* ]% B part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; R% {2 Y4 q8 `4 |3 Ado
+ L# b2 I. o: Q+ h' o, d Lan := rootfolder.Internal.Tools.AOLlanguage;# C! g) a# J" T* K- n/ W2 g0 g
if current = @.Destination -- else return
4 ]$ I8 W5 r+ R, x [ then
( ]" u. ?/ Q `3 z @.Destination := void;% K+ Q8 u7 d+ \- @" G( c" A4 j# N, y
if @.occupied then) h) o; ?4 u) I/ z) F! Q
part := @.cont;
2 S. x2 R/ u9 q( v5 d* d @.transpOrder := void;3 f v" V( {2 f1 R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 A7 M- [& ~1 V1 \; C @,root.eventcontroller.simTime);+ N. m. z7 b$ U/ s) F) @6 w/ @2 {
@.HasOrder := false;8 G8 L" K( }. A c3 }( @
@.DrivingHome := true;
0 \: i' L' Q7 X6 n; p rgManager.tryToStartTransOrder;' n3 w- k, u" O0 L2 |& Q6 y
if @.Destination = void! M, I& c; s7 Z8 o! E
then -- no transport order for vehicle @
7 Q0 `/ ?6 o0 p) e @.Destination :=
) n+ K! I: T: D. z4 P) C0 p- m rgManager.nearestFreeStation(@,track.~);6 [7 b6 O; T! [7 h4 u. w' t
newDirection(@);
3 H* _/ N+ f* z7 e if @.Destination /= void then
0 M2 S; d" j% L) s @.Destination.NumReservation :=- p" R" o- `& [
@.Destination.NumReservation + 1;
! _7 u3 `0 A: m end;0 K5 D4 A' W% N* }" t# ?
@.CurrIcon := "drivingHome";
! p9 a' e0 {- y8 C# \( k @.DrivingHome := true;
. {$ \. X) ^9 h% t5 ?0 ~# V end;+ f0 |0 _- e d" W+ o) b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( g2 |$ w0 Q4 c0 F" m
part := @.transpOrder;
4 a+ w; u- R2 V; g* I part.move(@);-- load part
* t4 a- c/ @4 ^5 ]/ j i @.CurrIcon := "load";" F3 `: t. }. O# [) R- v
GlobalDistObj := part.globDestination;. X2 W8 i, g1 W0 { p
assignLObj := rgmanager.rgAssignL;# s8 g0 A; A! a+ p6 y
row := assignLObj.getRowNo(GlobalDistObj);# ~, I1 ^, O) h9 h
if Row = -1 then -- since 70
- z& I5 C4 T; }3 q% H* c7 x5 [ if lan=1 then( j2 t0 X# J- H' b6 Z5 i4 q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: H5 y6 b& B4 H3 l( _
to_str("in der Andockstation: \"",?.~.name,"\""));+ b! x% _ A5 |/ Y
else
" N1 n$ Z! s& Q, a% B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: f- M8 k K" Z4 C) U
to_str("in docking station: \"",?.~.name,"\""));
; F3 Y4 T9 W7 Y: ^- Z end;
* [( L1 X. w' ~7 C2 w: X( @ else
9 u7 @. D E" h7 G5 y5 |. F2 Q @.Destination := assignLObj[1,row];5 R3 M6 Y/ z% D8 I) E0 ~
end;
+ `+ o: q; ]4 X) r9 G& Z1 S- x newDirection(@);) _# V/ I2 }2 C! E+ V
@.HasOrder := true;, P* d C2 b/ X- Z
end;+ O% m& i7 L- G: ^+ `& E! I7 w
end;
$ J X( W# h: G* b4 S1 Hend; -- of the method
4 s% M/ o( z: }- [, @# I/ E |