/* called by: entrance ctrl of the object 'track'
5 U, @9 ?- h8 X/ U) j" ~1 b6 v*/' L' Z. V% e/ B& h
is }6 {( D* |8 N4 B% X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: r. t0 J( I4 f1 \# Ddo
% R4 L3 M- {+ d1 J# g7 e Lan := rootfolder.Internal.Tools.AOLlanguage; d- @7 W- e5 h9 @! k+ B" [! u
if current = @.Destination -- else return6 g: T0 n! a$ e
then
% ^. H5 D) X. F, ?3 o# } @.Destination := void;+ x- P, q! ?: `. E# F6 v
if @.occupied then3 O: Q7 z0 D) [
part := @.cont;
& a/ M% g" s. {6 | @.transpOrder := void;+ c% n" }* |" ~: m! m/ [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* j2 L! j1 d/ a/ K2 L4 j/ l: j' ]% ^, I @,root.eventcontroller.simTime);
; `6 z' |7 l' d7 M2 C @.HasOrder := false;5 S+ W8 t" M( a1 Y3 }
@.DrivingHome := true;, [! ?! [1 v( t( D( i
rgManager.tryToStartTransOrder;9 z) X& x$ ?. i3 J o* n; H
if @.Destination = void* w* W9 P' z3 [ H, d7 N/ r
then -- no transport order for vehicle @
* i: P2 N0 t; O0 [: |' b5 F @.Destination :=% Y# J; I0 ?8 E6 D% ?
rgManager.nearestFreeStation(@,track.~);
$ v9 D$ A: C% d7 a K+ Q newDirection(@); : i% o! z7 ]6 L* B0 M
if @.Destination /= void then7 w. ^7 E: Z3 H& l, @; q0 J
@.Destination.NumReservation :=) Z6 }) E |' Z6 f; k0 X* ]# N0 d
@.Destination.NumReservation + 1;( V; ^! i% o+ G5 T. P. V
end;9 X" L3 ^ v5 H4 @% }4 q9 \
@.CurrIcon := "drivingHome";
) _ _6 ]0 ]) Z% g5 ?$ z @.DrivingHome := true;
& T; J/ }. ? ~ end;
: q0 `; J4 K4 L! u else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" V$ L5 @ |: E; i" Z3 C" t part := @.transpOrder;
9 b9 N& ]) U7 f! S2 ^% @ part.move(@);-- load part
/ {! J6 f S- u2 Y, i% i) G @.CurrIcon := "load";$ M1 G0 X% {$ H7 A
GlobalDistObj := part.globDestination;0 i* @4 n& l* D0 _
assignLObj := rgmanager.rgAssignL;
, }" B: z$ u. p$ L' D row := assignLObj.getRowNo(GlobalDistObj);9 I" e8 v$ J; K! i
if Row = -1 then -- since 708 ?' O, @' N& O4 p7 _$ T
if lan=1 then
9 B% B! q7 K3 \! C, q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' u# M% V( K0 V5 p% n. k
to_str("in der Andockstation: \"",?.~.name,"\""));) u1 c& {$ V' h( O. u
else
6 u, d; @# x- O6 P d. w V4 X. q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 n" f; ^* z& Q+ j( e6 z- [ to_str("in docking station: \"",?.~.name,"\""));
7 G3 b7 B% m4 } end;
, \- b. F9 G( i) z& I5 r, m4 F3 g else/ W" C! _! z+ k5 |( @. z; ~/ V
@.Destination := assignLObj[1,row];- e" M' C! ?$ t: P1 s) j/ H/ f
end; , y5 ^/ C1 m9 C* \, e/ [
newDirection(@);
% j K6 B1 R9 v @.HasOrder := true;
. h9 P, X3 _+ y- j end;0 A* F, d9 t4 y6 p4 n
end;
& F! `6 H& t+ Y/ Wend; -- of the method
7 c3 w% l3 t1 d# _+ i |