/* called by: entrance ctrl of the object 'track'& n! P) I1 Z0 Z& ~9 @
*/. h% J( p. K% J
is
* e& ~; a7 X, c4 u, J: Q7 n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
X* n/ ^5 j! d. [2 ]do
# q% K9 a* u6 B Lan := rootfolder.Internal.Tools.AOLlanguage;
" y/ H) _" G% \& ]3 D1 }! H if current = @.Destination -- else return
1 X& ~1 ?) O) R; c" _' K then
- _+ C" ^. U. ^/ ~# I9 u) L: H* n @.Destination := void;
# [; P8 G5 y& S5 o5 a+ V1 G8 a if @.occupied then
* l: K- i6 \6 F% }) Z/ A part := @.cont;
5 ]) ^1 ?( |6 ~( W1 `; b! m @.transpOrder := void;
! [ c1 _$ |; w! {/ c2 G/ ~& X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- V4 K+ t* }4 o; F+ v" d @,root.eventcontroller.simTime);, X4 s# Z+ I7 D8 Y
@.HasOrder := false;
$ J9 `( I% `: G @.DrivingHome := true;. ^9 r( y; i& S
rgManager.tryToStartTransOrder;
# c/ t1 h! W6 y0 g1 Z- p, @ if @.Destination = void
8 j3 q" A4 f% d+ h then -- no transport order for vehicle @2 F7 W, _/ m8 H* b! P
@.Destination :=( \9 C" Y/ M9 w8 l
rgManager.nearestFreeStation(@,track.~);
: ]3 n" x$ R4 S6 \ newDirection(@);
" C, ?) K3 g% T8 p4 { if @.Destination /= void then
A. R: Z) Y+ E @.Destination.NumReservation :=
9 \9 ?8 c8 n3 i! |. W" ^! X @.Destination.NumReservation + 1;: w j; s) `3 Y! u; w, k; M
end; j% r6 W6 y- g8 J9 d1 S* C( R
@.CurrIcon := "drivingHome";2 u+ C/ c x8 ?" G
@.DrivingHome := true;5 W% R3 Z1 c4 ~7 {) t6 X
end;6 U* a2 q& A/ I- f9 A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! n5 P% C* L# M4 M; }3 p4 F9 } part := @.transpOrder;
0 M8 S+ M+ U) X, m$ {4 |+ [ part.move(@);-- load part
9 s1 U0 {$ F( _9 |* v, ]# G4 m @.CurrIcon := "load";
1 ]. y$ d/ z" a. K/ x GlobalDistObj := part.globDestination;+ J6 D* U' n; \- Q
assignLObj := rgmanager.rgAssignL;
8 n) h) Y/ y9 v; M* a8 f row := assignLObj.getRowNo(GlobalDistObj);2 Q e( a S# V, [% m- ^
if Row = -1 then -- since 70
/ R" u$ D9 b- ^! N0 @) o if lan=1 then
7 S& k. T6 l: o$ h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) S2 Q0 ~0 J3 x! k% {5 l
to_str("in der Andockstation: \"",?.~.name,"\""));/ v. `, |: G* l7 X! [1 s
else
/ T+ h) o7 ^' y3 t8 l2 ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( z/ O* w# \. S' v4 q9 ?7 t to_str("in docking station: \"",?.~.name,"\""));
2 q, d |- G6 P end;$ b- J/ Y$ M+ k" X9 p$ g' g8 G5 s
else9 }( U: }/ P6 I0 a8 V }: y
@.Destination := assignLObj[1,row];! _( v) C& T" S7 _" W
end; - O: p+ s+ h8 }- { m7 Z& e- o
newDirection(@);
. ~/ L5 U1 w( D; U2 M @.HasOrder := true;
3 Z1 e+ A/ z$ L end;) P( L* v& E7 a% y/ K$ M6 e% e
end;
* ?8 j( |! ?) r7 V) \! ?# Z& o( j: Fend; -- of the method! c. s/ e# k7 _! O1 j
|