/* called by: entrance ctrl of the object 'track'$ e4 U9 d* u! b! L7 ~5 E$ D& S" M
*/
0 x, B; ?$ b2 ^. _is' b( h' M" X+ \# u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; C+ B* ~( O) v( r) W+ p3 Z/ ydo/ h0 J H: Q" p/ V0 @/ S7 F
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 O# ^- ^6 P2 V/ U& y if current = @.Destination -- else return7 D$ S4 z! r- G
then
$ Q) s8 X5 n% ~& @( S# D @.Destination := void;! l( Y3 E. g7 i
if @.occupied then* V) Y- }6 J; |1 C
part := @.cont;$ Y5 w6 {) s- [% M9 O9 o
@.transpOrder := void;, ?5 t, d3 d) E* N: H- m4 o3 R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ v5 H9 K! j0 @' [
@,root.eventcontroller.simTime);
6 I8 v, q1 _ h1 ~% f @.HasOrder := false;
0 ~# I# g! b+ T- Z, S @.DrivingHome := true;6 A; e% k7 B, n- P' V6 t7 e/ X$ B
rgManager.tryToStartTransOrder;' q; u" w2 o- t1 e
if @.Destination = void
9 V1 j# P) Y" i* u* K: H2 e+ H% a then -- no transport order for vehicle @3 v4 k' C x0 u. w/ {, x( R
@.Destination :=7 y: ?0 M9 q) l1 U- B2 n
rgManager.nearestFreeStation(@,track.~);8 e% s3 g! [: o+ t
newDirection(@); & C3 h# c3 @, c- |
if @.Destination /= void then: a/ h9 s' s9 y% @! e/ u8 M! N1 j
@.Destination.NumReservation :=7 f. P M* I) Q2 \ T
@.Destination.NumReservation + 1;
3 M, `$ S* ?: R" Z3 D) n# `- d end;
% d7 q3 m- i( m @.CurrIcon := "drivingHome";% J' E+ L! w I: n9 K% s
@.DrivingHome := true;% C8 \; }* x; X" X/ V& J: l; a& o
end;
7 _) Z( Y$ J& [" a/ ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ c% F6 ]" S3 V/ O: L
part := @.transpOrder;
* M+ J' P# Y, ~ part.move(@);-- load part4 _( y$ W2 ]: G* R8 Z3 e
@.CurrIcon := "load";
8 c H. q% K% r9 v, { GlobalDistObj := part.globDestination;
/ R) k4 V3 k( o! r' W& ? assignLObj := rgmanager.rgAssignL;
' H9 N1 j% i2 d) d* G, R$ P, m& l row := assignLObj.getRowNo(GlobalDistObj);4 w5 d1 Q9 y' J8 Z: ~
if Row = -1 then -- since 70. \8 t) T) x$ `! i, J/ ]
if lan=1 then4 m+ {/ `8 w1 D! g S9 I n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; a4 D* h( R) C# _% d% m# L to_str("in der Andockstation: \"",?.~.name,"\""));1 y8 O# w' A' n: i0 G
else4 W* P/ Q2 d6 E+ I, G3 h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ W- y Q x$ M3 \, X; {, [
to_str("in docking station: \"",?.~.name,"\"")); 5 [4 N2 i, O$ I. c4 L! c- s
end;2 {3 L! O- x3 @( L9 Y% q# k
else
+ P, b5 ?& Z# G" P7 G, V @.Destination := assignLObj[1,row];# E& L9 f _/ @/ C
end; ; C! {; Z, V$ ], t
newDirection(@);
8 ~3 v- S! l+ a" C- Q( w @.HasOrder := true;8 X7 s6 H" @( }6 [( J L
end;, {7 \0 {* i' X3 b0 [: }9 r* z0 x1 r
end;
3 r7 L$ d+ s7 j* z. e$ X; f; ?end; -- of the method; ]6 P# w7 F# o7 v+ {+ r
|