/* called by: entrance ctrl of the object 'track'- Q' E) j8 M$ R: o. |" T, S* ]8 ^
*/9 C" z: Q1 g; y& F S" r- K7 I& o
is4 i2 _2 t; {' b" I! b; u# g) y- [% \9 T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 {: K- n- A/ v1 Ado: X" y: f+ x1 w6 p
Lan := rootfolder.Internal.Tools.AOLlanguage;2 F& ?: O/ q' D3 e& H7 a
if current = @.Destination -- else return
, ~" \0 h- l- r/ @ then
: H) n( \$ f H @.Destination := void;
1 \* o3 E# Q( x7 D if @.occupied then
- d% n7 X# [! W0 b2 ` part := @.cont;' D2 v J& t; ~$ f6 _8 U
@.transpOrder := void;
( k0 x+ F+ G9 R \+ y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 T5 L, `$ g3 h1 s: a$ t
@,root.eventcontroller.simTime);
" ?' q+ r4 V+ m8 X2 [* R @.HasOrder := false;1 p7 _1 ?6 E8 J) h [( i9 j! s
@.DrivingHome := true;
- j( H; G' P% E9 R/ \' z" } rgManager.tryToStartTransOrder;7 M' G" d! g7 w
if @.Destination = void
1 E+ q8 h8 l2 l- M' P. E1 c then -- no transport order for vehicle @
' A( t5 V6 Z7 K6 i4 C7 N @.Destination :=1 _) G0 `' Y/ Q/ H* K" Z* u
rgManager.nearestFreeStation(@,track.~);
7 @; \8 B, B, B3 A' S+ {0 Y7 Z newDirection(@); , K" V( ], _; i
if @.Destination /= void then
0 l! Q( {4 F. n$ J4 Y @.Destination.NumReservation :=* g. ~7 \( x4 A; x
@.Destination.NumReservation + 1;7 z$ u# u W% d9 u2 }
end;
7 K* b+ G- j7 r$ A8 ]4 w @.CurrIcon := "drivingHome";% k' w& e0 o* p/ z- ^3 O
@.DrivingHome := true;
- q7 c6 e* d" s end;, j: a) k% X0 i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 D) G* G' Z2 T* p( L$ e' D part := @.transpOrder;6 Y" u2 z( c& v# w! S K
part.move(@);-- load part
% _: D2 g( D0 u% U( T, m1 \: ? @.CurrIcon := "load";
2 Y$ X# D( G5 U: N4 T0 ` a. c1 H GlobalDistObj := part.globDestination;: m% U3 ?! i' @: i+ V" m+ S* ]9 y. k
assignLObj := rgmanager.rgAssignL;0 o: m7 }' I. ~3 j
row := assignLObj.getRowNo(GlobalDistObj);
5 w9 @7 I) Z$ ?5 E if Row = -1 then -- since 70" Y' h n! ]1 F# O# Z; a
if lan=1 then
' u6 S) } ^0 B* ^; [& d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: U, f* S' g8 Q/ _ |5 U" V) c# Y
to_str("in der Andockstation: \"",?.~.name,"\""));
2 x7 m( [. E1 ]% H else& L0 e) p' J$ g3 Y: R" s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& n5 h/ b1 X4 R- ] to_str("in docking station: \"",?.~.name,"\""));
: ?; Y+ U6 W9 h) }8 c/ f end;
+ i- ]$ T! T! h, G. N4 s" _ else+ c8 t9 t' J* {- L
@.Destination := assignLObj[1,row];
6 e& m2 i: q- D, n: g3 b0 B end;
) |9 a" s$ Z) l! N: b: Q6 X# v newDirection(@);
) {: }, C6 n7 o6 Y# K @.HasOrder := true;
: V& n/ Q. F+ W# c. H3 o, p, } end;
1 `. s& S: h$ m, }+ u% I3 B1 A end;
$ V6 g; i; l* Y% Eend; -- of the method
' O# F0 l& S6 @$ I/ K+ U- [ |