/* called by: entrance ctrl of the object 'track'7 ?$ [, J; \" i" H
*/
x- z" a5 C; B& O/ J3 f- @is
6 ~! M, W. f+ x3 ^ H" l part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 R, d5 m. {& ~$ p
do
6 d) j* J" @2 i/ N' [+ m Lan := rootfolder.Internal.Tools.AOLlanguage;
; Y" S R/ Q1 R6 C! q if current = @.Destination -- else return9 c# Z' t& w1 S9 A+ c! `4 S$ L
then, L6 N, I$ K" ^$ F/ P6 R' C x/ A
@.Destination := void;
; Q x$ y' Y- u$ W$ G if @.occupied then7 {1 G5 ~. d: M# x: d
part := @.cont;8 j' E2 c) l4 G% @, ~
@.transpOrder := void;8 J0 P: O/ [, o6 O7 d/ H5 a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 X p' U, e+ B- [ p @,root.eventcontroller.simTime);
6 c0 R$ \3 e4 M6 _ @.HasOrder := false;
5 @$ m( N2 w7 o' j8 G7 ]7 C' L @.DrivingHome := true;
' @1 ?& m- K1 B+ B rgManager.tryToStartTransOrder;
& L I& Z, u4 W5 y% } if @.Destination = void0 s, b/ t/ _% r. L4 B
then -- no transport order for vehicle @
; @4 F4 d$ g: [! ]5 c; ?' y @.Destination :=
" ]% Q" n: k. e rgManager.nearestFreeStation(@,track.~);3 v7 }. F6 m( ^. A
newDirection(@); 4 Z( S/ O# p) `
if @.Destination /= void then2 g1 b" {7 a, E- ~/ O+ t, ^
@.Destination.NumReservation :=
. B4 v0 j, w' S ~4 H& B, Z5 X @.Destination.NumReservation + 1;! j. @1 ]; e2 E# X
end;, I& h4 T' L* |/ G$ U6 m" h% n2 r* p
@.CurrIcon := "drivingHome";
) x) M" j7 l; x8 u @.DrivingHome := true;
* B) o4 X$ }' } end;7 s1 w/ ~% ^- \: ]/ N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& j4 f- p; G: [, @ part := @.transpOrder;
7 h0 G$ H }$ A1 G1 E" W# f" ] part.move(@);-- load part- K" A: n) N2 \: _- y
@.CurrIcon := "load";
" P( B& O- d& i8 _ l GlobalDistObj := part.globDestination;7 W0 V, W, S+ |1 }% R
assignLObj := rgmanager.rgAssignL;
; R. l+ ?2 w/ Q2 f% Q row := assignLObj.getRowNo(GlobalDistObj);
) | m' S) `, ~0 ?, X$ l; v5 m if Row = -1 then -- since 70
6 R0 H$ e2 K6 U" |* z' B; C% M if lan=1 then
, \8 H Z) _. E, c' ?1 ? D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 W+ x* b. F. P* D to_str("in der Andockstation: \"",?.~.name,"\""));0 O& ?6 T4 j" p' @+ Y
else2 |0 B5 A! g- @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ l4 K4 N3 U3 v6 V
to_str("in docking station: \"",?.~.name,"\""));
) q" i6 u6 f( |* t D: O0 l& ? end;: _% d5 B2 ~! M+ |& G; ]
else
4 Z0 B T. y( ` @.Destination := assignLObj[1,row];
2 `/ s& \9 d# b. z) W end; . A$ S: ^, X; G% |# R
newDirection(@);
/ T- N D! B/ m* o3 [3 |/ y$ Q @.HasOrder := true;# K7 O* U- A& C% m- r8 e5 A
end;2 I/ B) X0 h; u0 `! A$ p+ q5 \9 G
end;* b# Z/ `) g% ?4 K/ }/ ~' i+ j
end; -- of the method4 b3 f$ ?" A) O( Q2 x
|