/* called by: entrance ctrl of the object 'track'
/ f" b0 h" Y7 i# ^$ W. D*/4 d: Z3 ]$ d- D8 Y0 L
is$ @; e2 U, ~# x! d3 [% d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! z& @7 \1 y9 n( b5 ` q+ r
do$ G8 V% H4 G9 i: r( d
Lan := rootfolder.Internal.Tools.AOLlanguage;8 b% N7 \4 |" W3 ^3 o& U* P& ~+ ^
if current = @.Destination -- else return
- Z" s# O8 G2 a( f then' z5 B! c' r1 q6 p& J4 |
@.Destination := void;
4 C8 a$ z; z& J& K! L* g: S if @.occupied then
5 b9 x4 ^. o) \8 ]0 @ part := @.cont;) L6 t- z% X% q, n6 H! W( M5 S$ H3 C
@.transpOrder := void;3 \# b# m6 b0 r9 [ w6 s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 Z3 r1 M6 z6 h, o/ I- Y
@,root.eventcontroller.simTime);0 u: y: P2 U* t* P
@.HasOrder := false;
! x$ p: ^% `" B6 Z @.DrivingHome := true;
0 `/ p& A% Z: B3 S7 @: S rgManager.tryToStartTransOrder;9 M; Q C# u$ Q' z S! y
if @.Destination = void
$ @4 u4 u* f" u. i9 j then -- no transport order for vehicle @7 ?- c* t* p) j' Z9 h
@.Destination :=
$ G" U7 J1 Y' l# n rgManager.nearestFreeStation(@,track.~);
) o2 m& c% v$ g* B! h& v6 X/ ~. p newDirection(@); . u, p+ g. F! l% s5 a& g
if @.Destination /= void then3 a ?% i$ g, N4 L5 P0 T' |) L1 S
@.Destination.NumReservation :=
1 j& b7 ~9 r* M* i; x @.Destination.NumReservation + 1;/ ~2 A0 d2 l2 p% N( ^% {1 i) Q
end;
/ W! q2 r% t1 \+ {5 ^/ Q' M: f! L @.CurrIcon := "drivingHome";
/ N! v- b3 [+ C1 O4 ] @.DrivingHome := true;
' S) z* Z# {! E4 k end;6 d. G" r5 J( M9 K/ a6 l/ T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" n: A, d% \) [9 p* g
part := @.transpOrder;( L- k+ f9 C' y8 q# B
part.move(@);-- load part$ @) V# _/ v$ E5 c) h) _
@.CurrIcon := "load";
! d8 F" f& f2 D. J+ N GlobalDistObj := part.globDestination;. g$ J4 ~2 L# {0 ?/ J. @! D9 {4 L
assignLObj := rgmanager.rgAssignL;
: p3 L5 L$ D/ e. N1 q- u row := assignLObj.getRowNo(GlobalDistObj);
" Z% y% I% M$ G+ F3 } if Row = -1 then -- since 70
6 O0 K5 y1 V' A3 C4 v3 e6 k! `: j if lan=1 then* w6 d3 M4 A% K* J0 M: B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 e) `8 l! D& R; y to_str("in der Andockstation: \"",?.~.name,"\""));
k$ Z0 B) i6 }' O else
) s8 L" v8 V! y( G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 o0 ~% C$ t6 t
to_str("in docking station: \"",?.~.name,"\""));
+ l8 W- ~+ I1 j0 V end;
1 r5 {" W# q0 V0 k1 f else
, ~ p2 p- K8 t% w @.Destination := assignLObj[1,row];
4 w" h1 W9 |. C5 P, p end; " m8 l& D! s _
newDirection(@);) A, x! Z( \, |2 s s& G
@.HasOrder := true;$ n% h) j f i" P4 C% J
end;, F4 E3 I" _3 ]4 |% k/ t* B+ i
end;( t0 W/ ~* \0 N) [
end; -- of the method
3 P1 U1 g& P) f7 E7 ?7 V9 d, M |