/* called by: entrance ctrl of the object 'track'
- z$ b. K% L1 K U. k# t' Q0 F% W7 z*/
2 Q: H' N% M1 Z3 e4 `% |is
6 R0 W$ [5 d8 }$ K% |8 b part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ y! s$ b' W ^" [
do
3 T2 I, G# D* Y+ T Lan := rootfolder.Internal.Tools.AOLlanguage;
: n* [$ m- H( K7 F if current = @.Destination -- else return
( L3 r# u, T: Q" ^6 P; g# h/ g% c then
# P% x5 p1 K/ `3 N @.Destination := void;& Y* P. l* R- T( w
if @.occupied then" B- F! e0 r' \
part := @.cont;
4 f. h; t) I" u) A& H: y! y7 k @.transpOrder := void;
0 _7 \7 V4 O1 M# T: _# N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 J0 V C6 v% ~/ S# V& S
@,root.eventcontroller.simTime);
* R0 A9 f* f! _. F; C! D3 d @.HasOrder := false;
2 W/ k+ u# r* B% F @.DrivingHome := true;. |0 P4 w: i" v: C
rgManager.tryToStartTransOrder;
- w. y1 }: N4 S& y if @.Destination = void) u' I# C/ [$ n" p( e3 g- P! E
then -- no transport order for vehicle @/ p3 Y3 b, w& F/ Z! `/ s" E7 m u
@.Destination :=4 N! q$ ]* `0 a
rgManager.nearestFreeStation(@,track.~);
2 v; T# u" n+ u9 M newDirection(@);
) M/ ]- O8 w9 K, t if @.Destination /= void then
' j! k, @+ | ]" m5 v5 I @.Destination.NumReservation :=. G8 u2 d- p" p* U# t
@.Destination.NumReservation + 1;2 k3 E; v7 G4 g2 ~, `) G
end;6 ^- P6 @; u7 v! h& j; N
@.CurrIcon := "drivingHome";. d$ t. @- m z9 ]
@.DrivingHome := true;
" X) K( T- q% i' L$ G6 T$ g5 w end;
. Y+ T6 i! e. I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ h* X' C, U1 F, E B; n4 d3 x part := @.transpOrder;+ I0 q% `) ]0 a" n! f9 F6 d
part.move(@);-- load part
: E! S6 J. ^. \" _: A# w @.CurrIcon := "load";' Y% {' T5 z, f2 p
GlobalDistObj := part.globDestination;; p$ v* @; J: W8 W5 t
assignLObj := rgmanager.rgAssignL;+ ?0 J- Z* ?. D; t9 t% n
row := assignLObj.getRowNo(GlobalDistObj);% l. H8 ^. W h, Z2 B, C3 ^
if Row = -1 then -- since 704 h- B9 D2 k1 F+ A7 v4 n
if lan=1 then1 b7 t: y0 {& q" {$ ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; N7 p4 ]# D7 V$ G9 W/ A
to_str("in der Andockstation: \"",?.~.name,"\""));3 J& V, k; p5 V" u7 i. L
else
* f" d# g' }8 `2 _! r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* e6 `8 g" \& }! q: E9 b$ z
to_str("in docking station: \"",?.~.name,"\"")); 6 s* |, v5 v$ X. w" Q8 q& {0 Q
end;: K; x) m4 t. ~$ L3 w9 A# I1 Q
else+ M5 [2 l) G7 ]2 P5 x' x
@.Destination := assignLObj[1,row];
. L" r# s( X! d# l0 y! ^ end; " z P! l; M" i* {9 q1 Q
newDirection(@);
, n9 {. L% n% j- p @.HasOrder := true; A+ |, q) K9 W. U: r) Y+ C
end;
0 b+ I# E2 d; Y( P" e9 Z end;
/ A3 O$ g1 v* N1 L/ Nend; -- of the method
& \- f' G I$ n5 e6 H& b |