/* called by: entrance ctrl of the object 'track'3 { A: H0 ^! h1 r/ y {( N% s
*/
, Z; F, n3 _( p. I. {( ^' A! j) Mis
# a7 n$ s: J; u" g9 s part, GlobalDistObj, assignLObj:object;row,Lan:integer;; C D" B! T- N% u1 n
do
- `, _; U# y" V) O Lan := rootfolder.Internal.Tools.AOLlanguage;1 ?. U8 O6 |! E
if current = @.Destination -- else return% S& r( F' d! I( x+ U
then
& Y7 A9 y. Q+ I/ ?. ? @.Destination := void; a, d% g* ?4 N/ T. C7 h
if @.occupied then8 `0 a! Q: A! h4 I; g }/ ~
part := @.cont;
3 y {" A( y6 E1 I( a0 v @.transpOrder := void;7 Q" T7 a6 [7 _9 ?4 X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 x# k. m8 B9 E% y* ?: M7 `' _8 ^
@,root.eventcontroller.simTime);
. p: o+ v: L/ N4 F B8 Q% D: o @.HasOrder := false;
: p% H) q: @+ F# Q/ P1 W+ q' J. H @.DrivingHome := true;
( K O4 |9 u7 J+ @4 q! x- L rgManager.tryToStartTransOrder;, d3 t& c% T* m6 D0 T. r4 r
if @.Destination = void' p# l: p; e" T' Q4 G: s+ V
then -- no transport order for vehicle @ H, l: K7 N0 v7 Y. I) J8 b/ N
@.Destination :=
( Z/ o% H6 z* Y0 D rgManager.nearestFreeStation(@,track.~);
& F! f* {: {2 D newDirection(@);
# Y8 ]; K/ h9 }0 V% G2 |) g if @.Destination /= void then3 J# e4 O) N9 ]0 e! b) p
@.Destination.NumReservation :=4 U2 h1 h5 @ A) `; h
@.Destination.NumReservation + 1;% \( ?# A+ N, g3 R( B, g- i
end;
) G5 I/ Z y5 t( ~, T @.CurrIcon := "drivingHome";
8 i' N, S) k6 V; T8 ^. F @.DrivingHome := true;
( d6 D$ x8 m7 \2 k: w0 m: X$ @ end;0 M4 X* w* a3 E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ w6 i- o6 `/ d& r( p; [
part := @.transpOrder;5 n1 t! o& Q( f. Y4 |5 R: k' t
part.move(@);-- load part# Z; d' o+ {( Z6 @7 A! V
@.CurrIcon := "load";# u7 J7 p- F7 n
GlobalDistObj := part.globDestination;
( }4 P( S2 V7 k assignLObj := rgmanager.rgAssignL;
' {6 Y |' o" Q: N' o9 v: `# N: Y$ Z row := assignLObj.getRowNo(GlobalDistObj);1 d) h# m7 r0 w$ e* b8 O
if Row = -1 then -- since 70 }0 p) F5 `0 W6 n, c+ E5 X7 g
if lan=1 then
1 V6 f0 r" p5 q, d# I+ | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& N5 V& f1 ?% E* J( ] to_str("in der Andockstation: \"",?.~.name,"\""));4 u& B0 N9 u8 x2 ?
else) X4 B2 O6 ~, i2 s- U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 } K0 C% M. ~: W; N to_str("in docking station: \"",?.~.name,"\""));
/ k( O, m x" ?+ f& h% { end;
* A! F8 Z# c7 B! f' `* A else
' {* m# D% s1 C: A @.Destination := assignLObj[1,row];
# G) ]5 Z# R) ~# h end;
, J) E3 ]9 \0 g" S+ ~7 ^8 \ newDirection(@);7 S. o& P/ p4 Q) f- {1 I
@.HasOrder := true;2 C$ U( w6 T' L1 ?" H# z
end;4 \% K, g+ c' H, J& b
end;
, g4 j1 X0 z6 k( I0 G+ K: |: z& Nend; -- of the method1 T0 Z3 q* Q4 R. M. p7 Y& K. ^6 I+ w) K
|