/* called by: entrance ctrl of the object 'track'
; [. m# p- J K" ~- F4 y; C*/
. ^: p9 G- f- }4 \8 X2 z/ H3 f, c# ~is
, n$ g$ w7 v ~4 _/ f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ m, V6 F* Y0 f$ Udo5 V+ e/ T! \7 r7 Y( ^3 n2 F0 d, ]& q u
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 e! I) f9 @- q8 U if current = @.Destination -- else return4 K) U' C, s. Y0 i1 S' m
then
9 }' s! A5 G" N g' w B @.Destination := void;# g- y# i$ t4 V( k$ ^" |+ Z
if @.occupied then- W3 d' K8 f9 X5 R" h
part := @.cont;3 t* [% ]6 x- |
@.transpOrder := void;
. d. F8 e6 M: N7 Y! z r" ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 \) L0 X0 M1 P' y2 }/ m- b5 y+ X @,root.eventcontroller.simTime);
3 T3 H/ h% h1 [) b7 Y1 J' U" c2 [ @.HasOrder := false;
7 g2 b4 n' j$ L @.DrivingHome := true;8 x/ d) _. l N* Q9 ?
rgManager.tryToStartTransOrder;: o' L* i0 `, Y6 }, _
if @.Destination = void
" L( M. @7 H" p7 g then -- no transport order for vehicle @
3 N9 D. q& _: Q6 H4 [ c @.Destination :=
8 k5 L% O: P( L* q2 q. w rgManager.nearestFreeStation(@,track.~);
# w7 P& d2 o; G- K) T- S newDirection(@); + c9 V# R. Z: a" A
if @.Destination /= void then+ t: k, e% |% F% Z; W) d' R
@.Destination.NumReservation :=
* z: s, Q7 I$ y @.Destination.NumReservation + 1;8 L n ?3 D/ ? C
end;
V/ N( F2 t# P$ X5 d1 \2 S @.CurrIcon := "drivingHome";( ]" @4 H, I5 g+ n
@.DrivingHome := true;8 T. n$ H7 P7 O) m R6 B
end;
% o" X _. \& ?9 q3 c else -- the vehicle @ is empty, both vehicle and part are in the same dock station) y) {' I# O" J
part := @.transpOrder;0 G0 f! O) I$ U; k% Q
part.move(@);-- load part7 m/ ~2 L$ [" q/ n K
@.CurrIcon := "load";
) F! }$ a/ J3 W5 b3 c3 i GlobalDistObj := part.globDestination;
1 Z5 h; e. b( s' _ assignLObj := rgmanager.rgAssignL;
- r( C1 h5 {" \/ w) J row := assignLObj.getRowNo(GlobalDistObj);7 r; A$ v: z) P
if Row = -1 then -- since 707 O: Y$ Z4 u$ A$ h8 ^6 j" A
if lan=1 then
- P( o N. {) U4 R( _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% t8 U+ B9 F* j9 q1 u to_str("in der Andockstation: \"",?.~.name,"\""));
: ?1 _- }/ Q9 d- z% x9 T) ] else
: j5 u4 I9 e- \+ Y# ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& p3 r- G# C1 v: s1 U, B
to_str("in docking station: \"",?.~.name,"\""));
9 D% R2 A$ k O& `4 T end;
p- _# r7 H6 \6 P2 p else9 {# ^# a b) G, V* p6 j# Y
@.Destination := assignLObj[1,row];+ \+ a1 y2 j j
end; + {2 L: F; R. {. y9 K: N
newDirection(@);
; J# A @ h* c( \# F @.HasOrder := true;
7 a6 _0 y; `4 [$ \ end;
1 z# M5 |$ G9 B' n( \- \ end;
$ T1 M" t ^' M; X" Qend; -- of the method
7 l; h0 e1 [/ ]4 R& q |