/* called by: entrance ctrl of the object 'track'
+ D6 F+ T0 ?4 z8 r, J*/- F( R( R. p6 l. Z
is
& k. v0 O2 C J% {5 i& L part, GlobalDistObj, assignLObj:object;row,Lan:integer;, D* q8 p0 }& C6 l* Z! Z
do0 G% T! U5 G" Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
& @; I" ~* P$ B( t* F/ c0 D+ l if current = @.Destination -- else return; {! j# l- U5 Q( W
then
* f2 i5 [0 p3 I) A$ u3 T$ n @.Destination := void;7 P1 J4 |% }( G, d) }5 B4 _; a
if @.occupied then1 H& C7 B0 i- ]1 ~7 ?- J
part := @.cont;
4 L; z4 d& z4 U K! |" H @.transpOrder := void;
) |. {: B# ?0 c3 Q1 G% J2 _+ d$ u+ { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 Z1 q: n3 f4 M1 P! A
@,root.eventcontroller.simTime);
. M; O* A& l& p, h, g @.HasOrder := false;
: W$ c* @/ o. r7 _ Z @.DrivingHome := true;* u+ E9 ^8 t% y Q9 H! w0 S& ?
rgManager.tryToStartTransOrder;4 z! l, w+ ~* \* G
if @.Destination = void
0 n/ [( h$ |2 G& L then -- no transport order for vehicle @7 g" k: T \8 M$ R4 U. v
@.Destination :=
. w3 Z6 x+ \5 b0 J rgManager.nearestFreeStation(@,track.~);
1 |, \* ~3 l7 i+ _! r. y newDirection(@);
* J2 f- M Y& E0 z! D4 T. H if @.Destination /= void then, w) k _4 i+ i* x6 q2 [
@.Destination.NumReservation :=, C& z0 P3 T+ w+ }3 I8 @
@.Destination.NumReservation + 1;
. p G7 c* s- [4 o( z/ S end;# P4 S; _' h' R1 l
@.CurrIcon := "drivingHome";! v2 {% b& f/ m% N3 b% v8 I
@.DrivingHome := true;
5 r7 a- t+ |& n7 ~8 G6 |5 w' T7 K end;8 |+ w( b1 J- |" z( | ~* e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% {% T$ W: C- \) S/ U- W5 B
part := @.transpOrder;
, w: @' x9 P2 t& f part.move(@);-- load part ]5 v: ]$ f5 e
@.CurrIcon := "load";
4 W6 b @0 v- v9 r GlobalDistObj := part.globDestination;9 d( M o. d& t9 j) z4 M! [) d
assignLObj := rgmanager.rgAssignL;0 R" O3 \9 J. Q7 L" t4 m
row := assignLObj.getRowNo(GlobalDistObj);) `3 `1 Z- j9 M9 M ^9 R
if Row = -1 then -- since 70
- K7 o1 m9 t* ?6 s( Q$ s# N if lan=1 then6 n% u6 g1 N3 `3 | ]" t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 p4 `* H; k6 Q1 q1 W; I3 e% {. o to_str("in der Andockstation: \"",?.~.name,"\""));
/ G* t' I* R7 H4 H0 t } else- a/ m8 [) q0 o# ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 Y* k9 F* j( o& j
to_str("in docking station: \"",?.~.name,"\""));
9 p) i9 `4 x/ s0 A/ g end;
+ {, \% T+ u! m, T$ H else% p' E! h" i O% E* O" ?
@.Destination := assignLObj[1,row];, w. B3 y0 O, w. z0 E
end;
+ V& z- y! i4 Y4 M T& k4 Y0 S newDirection(@); {% S z2 H8 Q: `
@.HasOrder := true;
8 j% c, `" J. z! w& z+ @) j' W end;* R6 Y3 k- S/ n7 B
end;
5 C" A! }4 g S- @$ o1 U3 J. Uend; -- of the method
" `: s: s1 d5 g7 x% T; w |