/* called by: entrance ctrl of the object 'track', y& j) c7 ?- R, a5 m0 G0 G) ]
*/3 h1 s( Y4 V1 f4 h$ Q
is# ~9 J6 x2 n& l) [* _+ T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) ^0 \6 y$ w* ~! r# Y" t1 [do6 }. Q$ a& I+ |% \8 R
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 o' A" A" S3 ~/ P8 I, _$ T if current = @.Destination -- else return
# V3 @! \1 H) ~6 \8 f. A then
' E/ i5 V0 j. S" a6 o5 k @.Destination := void;9 P' v; M7 V) k) Y H( @6 z n
if @.occupied then1 b1 f1 I: \7 M- h& S7 F
part := @.cont;
2 I: u& a; I3 n3 s* r& T; k. `' S @.transpOrder := void;
6 ]: \, B' }4 T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 V- W+ a) d" d6 g1 @; F) p6 v4 ` @,root.eventcontroller.simTime);
6 X: d) j/ O" n; r! P M( v @.HasOrder := false;
4 w% |% k: ~1 b4 e @.DrivingHome := true;
& b2 z o4 E0 E$ m4 D3 M rgManager.tryToStartTransOrder;- ? p, n2 j- G$ p
if @.Destination = void
8 k( ]* _! @, C6 K/ O then -- no transport order for vehicle @
# n' n1 e9 D" m+ n" O0 u1 T @.Destination :=
# \+ w' ~& _' V( m/ j rgManager.nearestFreeStation(@,track.~);# U2 u K/ m. ^* U R" H
newDirection(@); 3 K! B) r- @7 @5 H B' m
if @.Destination /= void then* u1 r0 c6 g5 o! K" A
@.Destination.NumReservation :=% Z2 w8 V. {0 l0 R, x
@.Destination.NumReservation + 1;. K* p* n; p& l* ]5 t' q9 f) d/ {
end;( a' R8 x, s; K2 }; m" \
@.CurrIcon := "drivingHome";9 H) I. ] g. B s; W$ @( {% D" S
@.DrivingHome := true;
9 }% }6 J$ a" I% ]# y$ |3 _# L end;. \( m. d% t' x3 U" X& K _% X- P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# ] M1 z* Z/ K9 `# [ part := @.transpOrder;
" `! @/ T2 a7 g: O part.move(@);-- load part
: J3 Q8 Q# u/ e; F0 d @.CurrIcon := "load";) \. ~' E+ a0 ^, ]
GlobalDistObj := part.globDestination;! L$ J) M4 n( W6 g: C
assignLObj := rgmanager.rgAssignL;
7 v7 Q2 H* _ O) h* [# ` row := assignLObj.getRowNo(GlobalDistObj);' ~3 M* |+ x" d% ~
if Row = -1 then -- since 701 D, V4 W0 M+ E B% u, ^$ Q, a
if lan=1 then
. r. W) M6 F0 S5 K6 w* F* E5 ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ r3 M1 |, Q# y) M P8 t to_str("in der Andockstation: \"",?.~.name,"\""));
( @5 ?# d) b2 ^& i else
) g2 j- j( G! w: N) t3 I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- M O- G6 l6 _3 p% G; b
to_str("in docking station: \"",?.~.name,"\"")); ?# W% h" C! m6 j, t) ?* S
end;, D) K% H# J# F- u; z) u
else
1 G3 I. n* T# s9 j2 _: \ @.Destination := assignLObj[1,row];
D7 ?5 y, z' k) d end; / r9 ?! {; r ?8 t c
newDirection(@);! l7 e) M* z# h) `' Q; B
@.HasOrder := true;1 E. V3 G! v1 s# ?
end;6 Q& K3 o; F1 x2 E. ^& d' h4 o
end;7 M3 y# ^! `7 R- r' [: F
end; -- of the method
, c9 K0 N" p: N& `% ~2 P& i4 I |