/* called by: entrance ctrl of the object 'track': x3 S5 \3 Z# c7 `# C3 P
*/+ J- f' t2 G/ P2 N+ ?- M N5 x
is- @9 V$ V. ^1 ?* Y' i, k! S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 {' |0 L9 w; s! K6 X8 ^/ m
do) \, \% T' ]4 j0 s p0 o1 S
Lan := rootfolder.Internal.Tools.AOLlanguage;
) [' N$ g0 }9 a6 e if current = @.Destination -- else return
* Q5 f* E' k- v7 K- t! J6 W) V9 V then# L% \5 U' w# x9 z! b
@.Destination := void;
( r6 H0 u( }9 Z7 B if @.occupied then
+ A) O3 K6 F. g" W$ X# L part := @.cont;
8 H5 ^6 z- `0 f9 w( I) ]+ @ @.transpOrder := void;4 _! `& I- J0 E' ]1 X1 B! m. g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: F3 f6 V' q3 j: E @,root.eventcontroller.simTime);2 t% \0 Q5 w" e
@.HasOrder := false;$ I2 K+ M; A" X* z
@.DrivingHome := true;
' D h$ }. [4 v8 D% N& o rgManager.tryToStartTransOrder;( L, c6 T/ H7 s7 W* G4 y( I4 ~
if @.Destination = void
+ |2 F3 i# O7 R6 X( c: g5 m( c7 ] then -- no transport order for vehicle @
& I: d( W; n5 D: l @.Destination :=
: L1 n- b2 G- `5 E rgManager.nearestFreeStation(@,track.~);
5 E9 K1 x) u2 g% Q# t% P newDirection(@);
6 q9 U* s1 r3 n7 p if @.Destination /= void then/ Y( y: h3 s3 F: c% N
@.Destination.NumReservation :=
* I9 l* N3 _* @; K4 s' | @.Destination.NumReservation + 1;
' h: M% B# W4 j$ G2 ?6 a end;9 \# d4 Y& N o$ a4 ?9 Q
@.CurrIcon := "drivingHome";
i& ?1 [, a' r- u5 b9 n @.DrivingHome := true;3 S! ^7 e8 M% h
end;
! f y3 R5 r* z$ q+ p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* }8 N; A. n* N5 j8 Q6 k" W( N) w* c part := @.transpOrder;
1 K' R/ R0 p- T6 R' j part.move(@);-- load part
7 Y) M& h5 l/ u: b# c @.CurrIcon := "load";
' {$ T3 b' ~' W4 F7 a# V0 l GlobalDistObj := part.globDestination;+ g$ R6 w" H) ~ n& T! ^
assignLObj := rgmanager.rgAssignL;
' }! D5 S" {# j6 G7 a5 V& x. v q row := assignLObj.getRowNo(GlobalDistObj);. k/ S: F( g V& E
if Row = -1 then -- since 70
# C: {$ X, u" D3 n1 M if lan=1 then9 m3 J& C. f* c0 G/ k+ a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, z* }2 D7 D. g3 A5 A9 z to_str("in der Andockstation: \"",?.~.name,"\""));4 S& `3 y% ~; K8 G1 b h
else8 l$ i4 F/ f8 d X3 r G- |4 `6 ?- I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& O! l F% _9 B2 X6 W/ @
to_str("in docking station: \"",?.~.name,"\""));
0 c- q" s3 ^' y1 f6 } end;7 J {( K6 Q5 u: L9 g* C
else
- c1 f" X) M0 S: k- c @.Destination := assignLObj[1,row];
1 r$ d/ @/ x+ U# ]* b6 A end; $ Y8 q, v: M( E$ F
newDirection(@);
; C" \! ^8 A# P) R6 I @.HasOrder := true;4 H; T; J8 V5 V9 x; t, `4 Q. f N
end;! q# i, g' N+ |6 [. ~
end;
8 W; g, v7 M8 m4 Fend; -- of the method1 C+ t7 t: ~% Y5 q1 `% b5 Z; i# Y
|