/* called by: entrance ctrl of the object 'track'( B4 U' d6 P1 I N# J
*/. m6 r6 Y' c5 q9 r! q: V
is( G' c/ U. u# O4 K6 @# C, G5 `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 |/ s7 `7 v" P8 _1 odo7 s7 w# ?2 x) J/ u2 e- Y, s
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 M# @* [# s d* S! v1 }& X0 s( C if current = @.Destination -- else return
: Y( O& K3 g/ b5 J" a. b then6 E6 R1 f7 I t$ F. z
@.Destination := void;
/ ?% N) b0 J0 D# m; { if @.occupied then! \! P4 l( W" u2 @3 |
part := @.cont;
8 X. Y0 z" H3 V$ n% z J @.transpOrder := void;
5 a6 c. z# e. }- W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( o. D5 ~( Z! ~2 W* T5 [2 n @,root.eventcontroller.simTime);
9 J2 l4 h9 r. G/ K) f4 s1 s& C8 m @.HasOrder := false;7 Y/ e! T. l4 T/ R, o! r$ p6 I1 U
@.DrivingHome := true;
5 e6 f5 _. J" u. `' O rgManager.tryToStartTransOrder;8 H* h! ~1 I, K! }( h+ ^
if @.Destination = void
" U% u$ \# b* Z) e0 g6 A6 L then -- no transport order for vehicle @1 P: A' u3 z" H: q
@.Destination :=
& ?' u3 E6 c4 e+ o4 C0 |- \% a, o rgManager.nearestFreeStation(@,track.~);' [; g6 ~& G3 F7 j x8 h9 X( }
newDirection(@);
1 j# |/ U+ w* A% { if @.Destination /= void then g' _+ A' Q+ Z, ~3 M. n
@.Destination.NumReservation :=
5 i6 ]& n2 S& _% { @.Destination.NumReservation + 1;
3 R1 c* g/ {3 l end;
( \8 d. T( a: G8 }& E @.CurrIcon := "drivingHome";
: |' T, K! [/ _% M# F2 Z% q @.DrivingHome := true;: ]7 Q! f9 G3 \/ L( f, f: O& o" v
end;
$ u+ i9 c9 {* T& e3 L4 H4 H else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 ?% `8 ?4 H. _/ ~- n7 M8 }3 A
part := @.transpOrder;8 V0 a, Q4 L& o
part.move(@);-- load part" z/ i( i- {2 g3 }: b& A
@.CurrIcon := "load";6 I6 b4 V. j% g8 `. Z
GlobalDistObj := part.globDestination;8 F, N( s9 n' E1 |( r0 W
assignLObj := rgmanager.rgAssignL;
# C) m/ P7 ]9 l7 }3 C* ? row := assignLObj.getRowNo(GlobalDistObj);
# y+ U6 c" U" ^; F$ P if Row = -1 then -- since 70
! ]* C4 S) _' T' f if lan=1 then3 S, u+ D$ N" Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 h' K( Z$ h$ C% e6 J5 e$ S
to_str("in der Andockstation: \"",?.~.name,"\""));
& N& i) R- C6 u7 o+ ^4 I- I( j else
* i9 H! g% A0 Z7 x6 V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, q% j1 _" U' F; H% ]" o to_str("in docking station: \"",?.~.name,"\"")); 7 R4 O E0 i7 v
end;
' ] u9 N8 T+ p' m8 P( q3 H( E else
- S2 c: q+ J5 B3 B: l @.Destination := assignLObj[1,row];6 X& |8 c4 {9 e+ p' S1 ^4 K# V8 `# M% b
end; 8 N: e0 o2 b: y7 u
newDirection(@);
" m3 x/ ]& G2 F* j4 e/ C# v @.HasOrder := true;
- b% ^, W0 Y/ y |8 Y9 W; M: o end;
. ?0 O' B Y/ T- j, P( x0 A end;
9 [3 S4 M$ u- b, `) Y& E: Jend; -- of the method; y- z) n: c" W! F
|