/* called by: entrance ctrl of the object 'track', c8 C% |/ o; q& ?# x6 o' h
*/0 w2 f# W, D" r- T
is$ ]4 \$ d' q* o' E" |, g$ k# e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# i0 k# N9 A, Z+ x5 ~; U6 Zdo
/ Q- l6 [6 N6 ?. T0 M( Y6 Z' I8 b Lan := rootfolder.Internal.Tools.AOLlanguage;9 X! E' ?6 I7 b7 t
if current = @.Destination -- else return4 {' p( b( [7 e' z! Y
then
$ ]- f5 v7 z( f9 d @.Destination := void;
4 j6 [" j4 b, H8 { if @.occupied then5 _1 u' o3 s, }6 o2 i2 Q
part := @.cont;
% j2 K8 ?9 U0 n3 W, F6 l) M: N @.transpOrder := void;
( l+ I% C2 I: J/ o9 v: w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, G! K& L+ @6 W7 C/ `
@,root.eventcontroller.simTime);3 X$ G8 R, i3 H7 {: o- `2 K% x
@.HasOrder := false;
( N$ O x+ k; `" [- P @.DrivingHome := true;0 u& q3 |$ v" @7 b7 [/ a
rgManager.tryToStartTransOrder;
; J0 W3 Z6 D( Q' ` if @.Destination = void
" h- b3 D Q) j) Q9 L then -- no transport order for vehicle @
% J5 T' r( m$ B @.Destination :=
* _3 s, w1 ^$ g- A! U rgManager.nearestFreeStation(@,track.~);
( ^# _% b: O2 L newDirection(@);
8 o5 ~, _0 S, S* s% }1 Y) L- S: P if @.Destination /= void then
: \; C V% M1 }5 v! K @.Destination.NumReservation :=0 B, n- v2 ^7 ^/ m
@.Destination.NumReservation + 1;# j. \# _# i( d0 w7 k
end;" B9 E" t) z$ c2 b
@.CurrIcon := "drivingHome";3 \6 Q4 W0 q* c& M
@.DrivingHome := true;
1 o1 \3 \1 D- i+ }3 s end;
5 J" |/ M+ O' |# B, D2 `# ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) |" ?6 I6 P0 v8 v! ~ part := @.transpOrder;( ]1 I [4 l" D+ Y, F
part.move(@);-- load part2 G0 {, A+ l8 h; v7 _0 y8 n
@.CurrIcon := "load";
7 D/ y/ c6 K+ b( l* h GlobalDistObj := part.globDestination;
2 Z. L; L) S' U1 ^ assignLObj := rgmanager.rgAssignL;
- \/ r) w# u) y& p/ C8 e! E row := assignLObj.getRowNo(GlobalDistObj);$ Q* k4 m+ g( Q) ]$ _
if Row = -1 then -- since 70
7 W* o9 c, s9 f0 F3 g8 Q" X. l if lan=1 then0 e2 M) Z* \& k4 T, v ^ p3 n W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( F2 m* p$ t6 o+ F; S to_str("in der Andockstation: \"",?.~.name,"\""));
/ n& f" M d: F9 z( T! o else/ l% A- |0 `' P0 K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 Q$ b3 A' k1 S' l to_str("in docking station: \"",?.~.name,"\"")); 2 X6 `; u( Q8 V& K7 K
end;
" F6 T w( c! z! u- U2 M# m! l else8 J( }+ Z; P8 y
@.Destination := assignLObj[1,row];
. C! ?! L8 n6 ~; W' q9 p: T end;
: m. G4 a ~2 U! `) T newDirection(@);5 V, ^! W6 e0 y7 _) Q
@.HasOrder := true;
9 z9 F. N5 t* s8 p$ @$ e8 A- P7 ? end;
% Q2 C- S2 C6 Q J l0 r end;& ?& l+ C4 Z- c& e/ E# R
end; -- of the method& a% [, {' E( q- Y
|