/* called by: entrance ctrl of the object 'track'# B* T3 J& x# U9 w
*/
1 Q( }, q! u) S5 Z5 C0 K' H; Q5 his
, [" j, J% `; A7 O- Z' ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 a- R' F$ x* D2 g9 b5 _. c, r
do
2 @! H% B3 u1 R" w @' v g3 S Lan := rootfolder.Internal.Tools.AOLlanguage;2 r% a) q7 ]+ Y5 |
if current = @.Destination -- else return
e: S7 D9 ?0 p8 D8 {% _ then
: s0 s, C1 D* o @.Destination := void;& M/ `4 G" K1 {& K
if @.occupied then
2 x/ U4 P' ~' Q part := @.cont;
( E N. D8 |# @ @.transpOrder := void;; X: l' F: N$ H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: y( f! [1 ^' H% i
@,root.eventcontroller.simTime);9 Z1 P3 A% C) G0 W0 v9 B
@.HasOrder := false;
, B8 C# J' I: a; K @.DrivingHome := true;
" q# \# ?( x A% e rgManager.tryToStartTransOrder;4 B; s. P: |/ i; e0 F
if @.Destination = void) S/ S4 a/ z: P+ h8 D& ]" L h
then -- no transport order for vehicle @
$ q& J1 }% r! e" x t* r @.Destination :=- E5 ?! N, ]& |* N9 A
rgManager.nearestFreeStation(@,track.~);) m: u( g) L# s8 a* w& y1 v% j
newDirection(@); - _' D! a! Z3 K* C* R( M4 h$ N
if @.Destination /= void then
6 i/ q& r0 ]& R: X( N& P. f& N @.Destination.NumReservation :=
" O! L3 W; v, t6 o- A8 T @.Destination.NumReservation + 1;
" ~5 O8 g5 y2 J: D: S end;
, I3 c/ R, E. H* E+ S" f$ y @.CurrIcon := "drivingHome";, h1 P" J, n3 W' |4 V
@.DrivingHome := true;
- ?- d7 x% C0 o8 W( T* X% U end;* F+ O- `7 c* \6 ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& X1 Y; z/ f. ^+ V1 e. g& R part := @.transpOrder;/ `# A' W7 G+ \( p7 b; m% u
part.move(@);-- load part" ]: c) \& W! y8 Q2 X+ y5 n
@.CurrIcon := "load";- b$ H# R1 P/ l: e+ @ B
GlobalDistObj := part.globDestination;; j! f2 D1 x% i2 n w. u
assignLObj := rgmanager.rgAssignL;
3 c! L9 ?! M0 H' c% i* q' ~ row := assignLObj.getRowNo(GlobalDistObj);
& |+ h1 L. ]( p) n. l. k if Row = -1 then -- since 70
! a0 a5 e' I/ E: c0 i if lan=1 then; c/ P6 ^% p- U( s2 P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; `) d: C; X4 A# C4 Q6 M
to_str("in der Andockstation: \"",?.~.name,"\""));
: B- `- t+ u4 a* l" r else
) Q/ f6 M0 W' l+ r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 a5 y) R, P8 b8 v- G0 H* p, Z to_str("in docking station: \"",?.~.name,"\"")); 1 @/ q- {4 h ~$ U+ }
end;
1 M: ~: F! b' P$ Y( s else
; f m/ J6 T. H @.Destination := assignLObj[1,row];
8 e1 X: {7 [6 D) [& Y end; ! {* k: j5 {0 p2 y
newDirection(@);
* n2 M' G6 O# {9 }1 m @.HasOrder := true;* i4 |- l; b5 {* I2 e3 b
end;
& p: C- n; x) ~( Y. K4 _ end;
8 @3 F" @/ F% i0 E/ ?: U% nend; -- of the method! B9 Y4 ~6 C0 M0 y5 J
|