/* called by: entrance ctrl of the object 'track'& p* B. p w' r4 v* n
*/
$ `9 q9 Y7 \; C/ jis' l w7 |1 m! A9 J7 s0 V. }& g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 `' W/ m$ I! s0 X' E
do
, s3 L. c) v4 u' c Lan := rootfolder.Internal.Tools.AOLlanguage;0 T1 a2 F$ v' N1 _1 V
if current = @.Destination -- else return
* Y) t% s9 K' [& q) v, V, z1 b then6 e+ K4 x9 _; G, m- G- @
@.Destination := void; K9 F8 f9 |% t% e
if @.occupied then7 k6 Q, s+ p0 B2 W, f/ O
part := @.cont;
/ _: g' }; B/ J2 O* {! f) ]9 y @.transpOrder := void;% n0 J, Q1 U# M+ v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# o) j3 Z$ r" s, k* P6 L% x, p
@,root.eventcontroller.simTime);& Q& k% a5 [6 ~/ ] g
@.HasOrder := false;. d; |2 q I$ a) f- O j, Y( \
@.DrivingHome := true;
+ V6 A$ ~7 \% h" ?6 a" F rgManager.tryToStartTransOrder;% v4 M8 h7 Y" H- W; y( F) \! V) F
if @.Destination = void/ ?9 _" }! P! J9 b
then -- no transport order for vehicle @+ A, E- t$ R3 n3 ^! \. X9 H. V+ g
@.Destination :=3 [6 }, ~% h$ c) V/ n. D
rgManager.nearestFreeStation(@,track.~);; Q- {, ] v5 s3 \- E" y
newDirection(@); - R( }: g9 A) B+ w& l
if @.Destination /= void then; T- l% M, ~; F8 Q# m# F7 ~6 D: D% C
@.Destination.NumReservation :=
5 W' T7 }9 C6 Q @.Destination.NumReservation + 1;" J& ]9 J( ?9 S0 t4 C" v' q5 c
end;, R: y7 t. ?9 Z; ^; R# T$ |
@.CurrIcon := "drivingHome";( R$ n) s0 H! N& [
@.DrivingHome := true;: e# g( j7 J0 t1 {# o( z) H
end;
5 J, t9 B0 K7 n7 f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 Q/ b- X# Z( ?+ v$ z1 I/ t part := @.transpOrder;1 G m/ g- y. T9 l5 x% E% r
part.move(@);-- load part
/ J. Y2 ]3 C7 A% z. E+ j6 B+ {1 u @.CurrIcon := "load";
" l C" n- M7 i4 \" t; a GlobalDistObj := part.globDestination;
" V4 t/ R. y7 r8 w assignLObj := rgmanager.rgAssignL;* W+ {8 o6 x' d* h
row := assignLObj.getRowNo(GlobalDistObj);$ }. t" n- E* T" `! S
if Row = -1 then -- since 70
. h1 Q: f; i" A if lan=1 then" g; R5 D5 k+ W' D# S! k7 C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ t; Y+ `, {# G$ k7 l8 N$ u to_str("in der Andockstation: \"",?.~.name,"\""));9 B+ _$ ~* y0 L( L/ N
else7 ]8 K/ }8 V$ d g; T+ R: s4 R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) ~8 w) W0 U: O0 { to_str("in docking station: \"",?.~.name,"\""));
( U5 p* _# x( |; `8 _6 q# w end;# F0 n: K5 B$ {. d, ?
else
! q( Q+ a- t8 I. N* G3 U+ p9 C, W @.Destination := assignLObj[1,row];
7 I# ?5 C" C. q' d+ E A* R# i' x end;
) [# t. D; a+ V+ [$ w0 k newDirection(@);7 J$ a; R$ g d3 g: C8 h3 Z, W& h+ t
@.HasOrder := true;6 s) ]+ h8 X9 b
end;
' D7 ~: T7 A- ?3 w) X$ r" Z end;
7 J$ B: F0 n- `( V! oend; -- of the method
6 W9 c; ?. a7 X! L% ?2 P+ _ |