/* called by: entrance ctrl of the object 'track'$ |9 s( h* O- W
*/; X7 I0 Z5 b; d/ [9 {
is' w) s2 D( f+ b' `! }2 @% N6 C) E: b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' o2 c6 a, ^* T' @' F. S2 a; Sdo
& o1 x0 R1 Z, F; Q' Y$ @1 C Lan := rootfolder.Internal.Tools.AOLlanguage;
& e" e: ?. W# Y5 V if current = @.Destination -- else return
5 x5 G. m) L- ~6 @/ ^7 V1 E; q then( V% u8 a8 L# ]- L" Q: G0 y U
@.Destination := void;6 w' R, _6 I/ a T9 g: d; W3 `
if @.occupied then- u% b6 P6 ~5 u: O
part := @.cont;
/ I' v6 O5 l& m4 g @.transpOrder := void;, z( |3 L7 L# ]. \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 Y7 {, I, {) Y7 h
@,root.eventcontroller.simTime);8 h) E" l9 B0 J
@.HasOrder := false;* Y' Z" A- C |6 p' c* _1 J% y$ P
@.DrivingHome := true;$ M* `# O9 I& c9 y7 u0 t
rgManager.tryToStartTransOrder;' c. z6 W$ X; n% ^9 h/ Z4 s4 a
if @.Destination = void6 v* G- U [! R9 D1 S9 j! F0 l) c
then -- no transport order for vehicle @$ X0 x; y* m8 M1 d5 T" D' N4 t# }
@.Destination :=' M( J; U2 {" g1 y9 Z% H& j
rgManager.nearestFreeStation(@,track.~);5 _" T; i! [* U# @
newDirection(@);
y4 v. g) r4 B# }) c0 V, ?" \ if @.Destination /= void then
" E) N$ M- D h' i: m8 H) M @.Destination.NumReservation :=
" ?, x" R4 |5 N2 z- y @.Destination.NumReservation + 1;
7 d6 [' g! t1 F- Y0 F3 @0 ` end;
' A: c% N; `5 I% F3 T @.CurrIcon := "drivingHome";6 `* I3 q# H9 P0 J/ f7 @: W7 ~
@.DrivingHome := true; Z# ~$ m+ K& T8 o3 M/ K
end;( W( E" H0 L R% O, T7 h5 y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 a7 ?" ~' y7 W' f
part := @.transpOrder;
% D! l+ \# N, s" ]2 S3 C$ }) A d part.move(@);-- load part1 w5 s! d) O( V6 e% l
@.CurrIcon := "load";
3 p! I. @2 ?9 F4 n6 R$ f: {( ]1 e! G GlobalDistObj := part.globDestination;7 Z) H7 u3 {& P% _6 g& J1 r0 ?: M) I
assignLObj := rgmanager.rgAssignL;
: [8 w) ]7 G6 n row := assignLObj.getRowNo(GlobalDistObj);
" {3 B1 S4 K1 C% X a if Row = -1 then -- since 70
' C. k- m! h% n# U7 ?+ K* v4 z if lan=1 then
% _" s% p+ M$ c. C0 Z1 o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ o* D5 u, f$ x T0 L: g1 y
to_str("in der Andockstation: \"",?.~.name,"\""));% w, w2 j6 ]+ |* p' T" e
else1 q& r$ ^# p+ u7 g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ L, p$ J1 o; `& C
to_str("in docking station: \"",?.~.name,"\"")); 8 [8 Y6 F$ W7 f9 a
end;7 G4 a! Z; x, f5 O+ T
else
, C7 ]' r/ i* J: K2 X o @.Destination := assignLObj[1,row];
* G7 L0 ]' q* T# z9 R% @' i end; , r! ^0 H! U. F/ h R
newDirection(@);5 ?; a/ ?5 B; Z# V7 g& g
@.HasOrder := true;
2 g! T& t- d' h9 K end;
2 }; ~. r' Z( v( L end;+ e+ O! a6 c' @; H7 B* u
end; -- of the method& K3 L( Z/ B) \# U
|