/* called by: entrance ctrl of the object 'track'2 K: `/ A/ V7 J, ^' c, X
*/7 l. b" _; @7 d \1 v
is0 Z7 j0 t1 h% M+ K6 T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( ] k0 q P4 V
do! S8 r1 ^1 v5 {0 C
Lan := rootfolder.Internal.Tools.AOLlanguage;
U* [1 L8 q Y. q3 t2 g3 @ if current = @.Destination -- else return
* _$ W4 P" u2 @( S then
+ `! p% k ?/ r+ B @.Destination := void;
+ o4 z- i* |- ` if @.occupied then
) L# U1 A9 V# _4 J: ^ part := @.cont;
0 u& u: G1 J0 w @.transpOrder := void;
4 `; P& o# P. C( G5 R& y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" ^3 ~% n3 L1 v' v& O( o; E @,root.eventcontroller.simTime); [: Z" F$ E. {7 k; i3 e9 t* V) V
@.HasOrder := false;
2 _* J+ V0 R' P0 R; O4 G @.DrivingHome := true;
9 \5 g# C9 Z4 M rgManager.tryToStartTransOrder;9 j/ _& k7 X% Q8 t+ e
if @.Destination = void
{9 _' @8 m" r6 C then -- no transport order for vehicle @
5 ^: C7 H# L% ?7 l2 \* z @.Destination :=1 A$ C" @7 C* ~7 e+ F
rgManager.nearestFreeStation(@,track.~);+ p, s. F) W, i
newDirection(@); & a/ k' S- D8 }) I% l" p4 h1 `
if @.Destination /= void then
4 D; M' }9 u" `. D. [6 x# k0 A' C @.Destination.NumReservation :=! p4 f$ Z8 I7 d! |+ {2 h) \
@.Destination.NumReservation + 1;
* |% x7 u. g8 U5 R/ v end;
' G. Z Q5 Q# \9 \ @.CurrIcon := "drivingHome";9 j& j$ f d0 Q7 T' f r P. \( {0 _
@.DrivingHome := true;3 Z4 f9 Q P/ V' s- ]
end;6 P R: B( G4 d8 m7 I0 `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! k5 }) w& t- N/ h! ` part := @.transpOrder;) A$ X }# G; P, P' s! G- c9 ^
part.move(@);-- load part0 M2 L1 Z6 b" y$ N9 e1 B" X- V
@.CurrIcon := "load";
- A% \' n# i% g$ z GlobalDistObj := part.globDestination;
2 g2 l. a5 @) e+ z2 {) O assignLObj := rgmanager.rgAssignL;
3 a$ v" ^1 V q9 ?/ D row := assignLObj.getRowNo(GlobalDistObj);5 B3 W5 A0 |/ C! Z! K3 s2 H
if Row = -1 then -- since 70* ]1 f$ O( L; n: C$ F& F+ C8 L( Y3 X
if lan=1 then
$ i9 ~2 x) j8 K/ R1 u$ W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 `. J# U& q# m7 w* M* v
to_str("in der Andockstation: \"",?.~.name,"\""));
/ t( p3 J1 p. E" t6 g9 G else: {+ R& T8 M: V1 X% Y2 r3 B" \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, ~# S% }# J" N& P
to_str("in docking station: \"",?.~.name,"\"")); 7 Y# P' d3 y9 E8 w+ b9 r$ J
end;# q1 k+ w7 `. f5 s
else
' x% M% a& Z0 @8 q9 [ @.Destination := assignLObj[1,row];1 ^. b0 X& x' |0 ]! j2 R: ~
end;
" m8 u1 d" {" I* Q$ Y newDirection(@);
- @+ Y6 n( Z8 P/ V$ e @.HasOrder := true;" ~; ^/ k5 l: w; I+ i, d k. ?4 q% u; ]2 L
end;
% o: L6 Y( Z* [6 R W6 p1 v end;' K" j- C9 o' o! I8 z9 l
end; -- of the method& J% v( {4 B, d1 k- U
|