/* called by: entrance ctrl of the object 'track'
8 [! x h& K* v% s) l+ h6 ^*/5 c* _& Q+ ^! b$ ?
is
) ], S/ h9 \" W part, GlobalDistObj, assignLObj:object;row,Lan:integer;, d- b. J" j# k
do
. ^9 V" y- [& P K5 c7 ~( U Lan := rootfolder.Internal.Tools.AOLlanguage;
' ~! x2 ^0 r3 p if current = @.Destination -- else return
- U- i- V8 o9 k$ C) q6 {* L& f- X then
0 J5 l5 Z7 z9 U; U @.Destination := void;1 b- J3 v$ s9 q4 q: ^5 ?; Z
if @.occupied then
( q, j9 i7 S5 N4 ~9 h5 M" t part := @.cont;; \+ a. d3 l# v8 j5 d8 E @9 D6 H
@.transpOrder := void;9 w9 O8 t, k( k( S; d! U! E6 C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 C' i# }7 z! n( v8 G @,root.eventcontroller.simTime);3 @1 l+ ^! v* L% y; h; u A, s" _
@.HasOrder := false;
% A( x& Y7 H) _& j @.DrivingHome := true;5 Y3 w2 q4 f: H, S8 ?
rgManager.tryToStartTransOrder;* C% X% Y: i- k& i. m; `3 X
if @.Destination = void
& s& j% E$ C/ N then -- no transport order for vehicle @3 S) o d! Z& T
@.Destination :=4 g4 L. L- U2 E
rgManager.nearestFreeStation(@,track.~);
* }0 ?: R+ T+ \8 r# U' m newDirection(@); 0 L' K% i- M/ O6 m. e. }; J
if @.Destination /= void then
- c( D) N+ p8 X5 K# ~ @.Destination.NumReservation :=
& `. B! C8 P) r H @.Destination.NumReservation + 1;/ I! X' t: p4 _5 O; b" {# [1 q
end;- F/ b4 J4 |8 F& V8 }! N
@.CurrIcon := "drivingHome";% r8 l3 H7 ]" m) z/ M, C( }
@.DrivingHome := true;% K+ N4 ~& j. e
end;9 l9 O [' [# E5 F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" |3 K" L( _8 W9 _( Z* h
part := @.transpOrder;
% u6 g' i3 _9 p) m% Y% @ part.move(@);-- load part9 C5 ?9 U: F; H# |' r, K
@.CurrIcon := "load"; P6 s# M! T3 V& W0 X' S
GlobalDistObj := part.globDestination;
( I3 \" y2 A$ R* p# g, m assignLObj := rgmanager.rgAssignL;9 g9 s0 F0 J9 ^$ \( _
row := assignLObj.getRowNo(GlobalDistObj);5 n0 d. i, e) D( {
if Row = -1 then -- since 70
7 ^& X$ E# Z3 W4 J if lan=1 then
1 r$ Z' K! P% w) U) N2 L- ^) W# j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ c8 y: a% E7 E* I# [% s to_str("in der Andockstation: \"",?.~.name,"\""));
' Y! }; t0 z5 v! i8 e# T else' y, w, ?# q$ k) P' Q4 V; t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- d2 t5 s7 }* x" ~) g- f# V
to_str("in docking station: \"",?.~.name,"\""));
' k1 @ U A# q( O end;& a! ]; v) O2 [# ~0 f @
else
3 n2 H! |% S" Z8 G5 ~" v0 A3 r! J @.Destination := assignLObj[1,row];
# [3 j6 ]6 ^. U) p& O6 c( | end; 5 F$ p9 R4 Z2 g( {' N2 q3 F
newDirection(@);7 ~6 C1 S8 b: o* s& P1 U: T; m+ b3 s
@.HasOrder := true;
5 ?: p7 \ B. I# X. n% B3 D end;4 I( X# u8 Z R! t2 X
end;5 O) A' h0 W9 m! D( \
end; -- of the method
4 Q& ^* [) g6 U |