/* called by: entrance ctrl of the object 'track'
* y6 a3 W7 E( a1 ]& a; D*/. e2 w3 B- Y5 z) c4 J' T
is( {, I/ r% v( M/ N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# M$ h2 S- R, `9 R# ^2 Edo
1 ~7 k: E5 ]% q$ w: W+ X: e& D Lan := rootfolder.Internal.Tools.AOLlanguage;. p3 n" g. V& r* e& y
if current = @.Destination -- else return! I. _; p& \( _! p8 E* s6 M6 c
then
& [4 K( D9 D# M5 [! B) A: @: v6 F @.Destination := void;7 b& \: F0 B' K. G, Q: e7 | H; Q4 i# T
if @.occupied then2 i6 m4 O* `# F. S3 t2 S
part := @.cont;6 M; [0 l8 N1 J$ P6 s. ?7 @) M
@.transpOrder := void;* S W7 K Y( B/ |% {6 H6 b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 o9 e, E8 j! I& O- h5 _6 [2 h
@,root.eventcontroller.simTime);
) }, p( G8 V+ r$ u+ `- T8 p @.HasOrder := false;& Z- p+ u& c% ~1 L j" ~% b- s
@.DrivingHome := true;/ V2 ]+ U1 I; s
rgManager.tryToStartTransOrder;3 k) P7 U4 N1 u& V9 P# T! o
if @.Destination = void& {( L& J- |% O/ |
then -- no transport order for vehicle @
' s' Q! o E9 }3 b* Y) O+ u @.Destination :=- i4 q& F$ J/ I# n% @4 s
rgManager.nearestFreeStation(@,track.~);. q, i" F% N1 F2 C
newDirection(@); ' a+ Y- V8 H, A" f2 `" p% V
if @.Destination /= void then
0 b- T, H( j" \1 `7 O3 F @.Destination.NumReservation :=: P$ V9 K6 |; e: u+ i7 y" f# {( c
@.Destination.NumReservation + 1;2 {2 W' z, E6 @* q
end;
: @5 Y" s1 I4 g5 ~" @1 _6 K4 W5 P9 E @.CurrIcon := "drivingHome";
G" X3 D( [! ^ @.DrivingHome := true;
% W! [4 [' ~# f end;7 o1 s% u9 f$ }* S/ c" O9 H: l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 j& D2 u u$ C4 T part := @.transpOrder;" r! e8 ^9 n3 b- [
part.move(@);-- load part% n7 z" S1 }& R1 A5 g
@.CurrIcon := "load";! p( N) D3 Y- q4 p' [0 Y( c% x
GlobalDistObj := part.globDestination;0 ~! }8 n& l& ~% x" j2 t$ w
assignLObj := rgmanager.rgAssignL;
: H7 Z' T* @( o' t4 H row := assignLObj.getRowNo(GlobalDistObj);
/ d" w0 [3 B3 u+ l if Row = -1 then -- since 70
: h9 @3 P2 W2 Q9 b K if lan=1 then& l7 P, b( }9 w" ?1 \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- Q0 u* u& U. U t4 q to_str("in der Andockstation: \"",?.~.name,"\""));
( p8 c1 ^9 U+ z4 m6 _) n, j! o else y/ [; a0 g W6 d' W1 d5 a
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), @7 A4 L" o- R0 [, V8 E
to_str("in docking station: \"",?.~.name,"\""));
6 x: C9 l) E; V9 C a6 q end;
( \2 q, B9 W$ d) S/ B else
* C5 R3 M' ^+ A; y @.Destination := assignLObj[1,row];
. w6 o5 q2 V5 z end; ) o" ]5 X% }2 Y$ Q& C
newDirection(@);
' C( [$ N; g" U# }+ n( Y @.HasOrder := true;
J1 Q- g' h9 ~9 v8 b _ end;" o* L% x# ]$ j; L
end;: J( y d, I5 Q/ p. Y+ K
end; -- of the method
4 {8 w; }' Q9 B5 s* t |