/* called by: entrance ctrl of the object 'track', y/ S/ L8 k6 u J Z+ l1 T1 n5 ?' H
*/( w. y0 e1 U: p% N: ~0 X
is
. `/ U! E9 ?# [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 t' ~7 }- v% e8 U) ^! m
do
* f) _+ a. p% |6 F5 M) C Lan := rootfolder.Internal.Tools.AOLlanguage;
; `0 M% ^" Y1 D. p' }8 `2 u& D if current = @.Destination -- else return
2 T; H9 N5 A: j* ] then& s: M( f5 K: k6 t: f8 Q
@.Destination := void;7 D0 d8 o1 e) I4 U- h i. U
if @.occupied then
# c! Y- ~# S9 n5 Y- M. w9 \ part := @.cont;
& w0 o- Q* z) U# s4 D @.transpOrder := void;
' i; |+ [6 X; V- m2 I& m7 }5 f1 X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) g- k/ C6 e; {6 A4 p, ?
@,root.eventcontroller.simTime);
% `3 Q9 c' U) ^9 O5 E K @.HasOrder := false;
- a( x+ }5 `8 ?9 [+ W @.DrivingHome := true;- H" }9 I$ \9 A
rgManager.tryToStartTransOrder;- G7 L' k9 r% N+ v! G; q
if @.Destination = void& O# R# m' s% F. s. u
then -- no transport order for vehicle @; ~" D( m( Z- ?* e; A" c
@.Destination :=
: f, g2 r2 U; e E6 v i1 I1 V @ rgManager.nearestFreeStation(@,track.~);7 D( X0 I X5 C( N
newDirection(@); # n/ G2 S! D t J) d- A5 P! H$ O3 d
if @.Destination /= void then9 [: Y" h% I2 O) V; Q
@.Destination.NumReservation :=: H& @6 I& o0 \2 b0 J
@.Destination.NumReservation + 1;
& x, {# j# }; ~5 H end;3 b9 ]$ K9 \- P: |9 V
@.CurrIcon := "drivingHome";! K5 ~3 S" |% X
@.DrivingHome := true;
+ \8 ]3 ~& _, ~) _ end;
0 }1 O! E' d" L1 f, V/ S1 O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# Q( Y1 q6 Z: u9 X# u& y part := @.transpOrder;
! Y$ T& C4 g$ ~, o" L% N part.move(@);-- load part3 y! g" j7 x+ q% r
@.CurrIcon := "load";
& d4 [7 o {9 U% S8 ~8 p3 z GlobalDistObj := part.globDestination;
# ]4 o4 s0 c9 ?* L# V& Z assignLObj := rgmanager.rgAssignL;
4 Q, c+ l& h7 k9 Z( a row := assignLObj.getRowNo(GlobalDistObj);
1 j; A9 n% J7 A4 c- { if Row = -1 then -- since 70
+ d0 l9 `6 g7 E7 q L% \4 H( ^ if lan=1 then
* h# m$ V0 Y7 v1 e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. q+ e1 u; R' p5 X. o to_str("in der Andockstation: \"",?.~.name,"\""));
! A" J f3 }4 o1 A& h5 m5 j5 ^2 z else' l; v9 n5 b! u/ c5 r9 t- E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 ~% E9 ~+ x/ L1 ]8 J
to_str("in docking station: \"",?.~.name,"\"")); j. s/ E U" `6 w1 _
end;9 ]& C- C- X. t, F
else
6 B% O( N `& O @.Destination := assignLObj[1,row];
3 D* }; }* A% l! D% h: c end; , x+ V- F' B$ W0 C0 v/ x! |* q, n
newDirection(@);
1 j/ v1 y* A7 F' ~ @.HasOrder := true;
7 z4 g ?. b K8 N! c. X end;
+ n' x! }5 }6 g. r) X end;( M* L2 a; z6 C; e
end; -- of the method+ g4 n3 W7 {$ f4 ^0 n1 E! e* J
|