/* called by: entrance ctrl of the object 'track'
3 Q' L! q: c& U, M% { H*/
; w5 w# A- ^* _4 ~is
2 V1 k" G( U% c0 {3 J part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 X0 @; p* U; q( y8 Q( P% a/ _
do
7 F8 M3 Q$ v N Lan := rootfolder.Internal.Tools.AOLlanguage;
/ c6 H4 S: _ F- @. ] if current = @.Destination -- else return
7 p$ ]" g/ {: i: a+ @2 p% x0 L then
3 U! J/ z" ~ U+ R! g$ L, r+ V, G @.Destination := void;
9 [7 X# P0 P- w J* M" a8 f' _0 z if @.occupied then9 c/ v9 T& v! Q) p# v
part := @.cont;# K. Z1 v# R- D: `6 J( b
@.transpOrder := void;, n4 T$ H" i H" @: b% \: t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 F3 C& Q) ~( G$ ?+ m
@,root.eventcontroller.simTime);3 E' I" O( w g* _3 T2 t7 i' j
@.HasOrder := false;* j) E+ Y" {2 z) z0 H
@.DrivingHome := true;
( O, j C x% [& B9 r rgManager.tryToStartTransOrder;
$ _) {) c! y. a' \0 p if @.Destination = void
* K1 J- C" G/ d then -- no transport order for vehicle @* ]% e4 [) s3 ~6 S; F
@.Destination :=
" l" \# z3 u+ M4 ~ rgManager.nearestFreeStation(@,track.~);5 a4 K E4 @* }8 h- p4 b
newDirection(@); 2 F7 l8 s7 M' F! i+ w
if @.Destination /= void then9 i1 u8 `; c% D/ z- A* h0 u
@.Destination.NumReservation :=
6 i" H$ |6 u( m0 P1 E/ n+ Y, H @.Destination.NumReservation + 1;- P' C B& L# v# N8 o4 K3 F
end;. |# x9 ]% z1 {" M7 ?3 J# a
@.CurrIcon := "drivingHome";
0 G; L+ l- E: Q. U \8 F- g0 K @.DrivingHome := true;
7 B- {) R4 u) A! g end;5 x! X% |, g% s" U: R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( _- z* Z/ ~4 n8 S. x s G3 {* u
part := @.transpOrder;3 \, a! I/ y) X" H- [1 @% V( [
part.move(@);-- load part
. X9 T/ t9 T2 U; G) S( p @.CurrIcon := "load";
2 ]9 B. a% B u5 _ GlobalDistObj := part.globDestination;
5 q6 z% m! d- e assignLObj := rgmanager.rgAssignL;
8 T$ d4 c8 V0 e$ n8 y8 h+ I row := assignLObj.getRowNo(GlobalDistObj);
. o/ s! \1 {+ k' @: f. {, }5 O2 A# }: i- c if Row = -1 then -- since 706 j' W9 u1 ]3 j6 z
if lan=1 then
* [6 o2 U, S4 n7 r9 p9 y8 P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! L/ F# J! I8 b ]6 { to_str("in der Andockstation: \"",?.~.name,"\""));! Q/ a% h& x3 y( B* S+ t1 J3 X
else
* `3 |. ~+ t& y& u( V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' x! [, v! _ {/ S* Y% B. \ to_str("in docking station: \"",?.~.name,"\"")); $ Q! n4 o4 E7 a7 `
end;. z T9 w' \! {9 F2 g
else
! u- i6 C# l4 g# s; f, K* ?) E; o0 F @.Destination := assignLObj[1,row];8 D$ \1 }1 [, V: I3 W: `
end;
( M& y, X% B% j% d) _5 t# M8 l3 f newDirection(@);
1 i+ K u8 ~0 | @.HasOrder := true;
' q! n, U* T' {, {& G* `* ] end;9 b/ H$ R! [; L! h
end;( u% M- ]" t) S- G! c
end; -- of the method
' J# ~5 A- H- ` v |