/* called by: entrance ctrl of the object 'track'9 ^% F: o+ u' n2 I
*/
) J' N; D( H6 V' _! y2 |2 cis" K/ Y5 a) N- T, Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! Y" X' r- u* F6 U7 t- K( ?
do
' O/ I K# H# d! [+ X) J2 ~ Lan := rootfolder.Internal.Tools.AOLlanguage;( x0 ~; k; b" o q+ `
if current = @.Destination -- else return& }2 J3 z' r: D3 {5 ?6 b0 s5 \
then; F3 w7 _9 p4 ]" O
@.Destination := void;+ a" N& F: a2 ?# h
if @.occupied then3 x; w: K p$ G! H; {$ R
part := @.cont;% @" o5 H2 |( L! Z
@.transpOrder := void;
" V" y: S# [) m% u9 @7 T1 F+ D8 x; a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( ~$ J$ z: X6 q8 h& d1 g3 \
@,root.eventcontroller.simTime);
% X) N+ e6 F; P$ j; b1 o- H9 u @.HasOrder := false;
8 w+ r; M# `* `4 E( i @.DrivingHome := true;2 t: y/ I/ H ^
rgManager.tryToStartTransOrder;, ~% d5 M: `- y6 ?
if @.Destination = void
' H8 L/ D; R/ U( R8 p then -- no transport order for vehicle @
% i9 D, c0 z0 E8 s @.Destination :=$ \& @2 M/ ~* J" y0 Y
rgManager.nearestFreeStation(@,track.~);' o& S4 I3 G) c g9 k6 S' y* i
newDirection(@);
9 d L2 P9 ~# T% G/ y* @ Q; ] if @.Destination /= void then o: P0 ` a& s5 m& a$ V
@.Destination.NumReservation :=
" O7 a7 o8 _$ e: h9 F' c @.Destination.NumReservation + 1;# |, m4 [. |, A& K# Q( Z
end;7 n( ]( t6 [, g/ }0 T
@.CurrIcon := "drivingHome";8 R! d; X5 @/ K: y) [
@.DrivingHome := true;" e& V' n1 B* n2 A! S. Y8 n! Z$ i; I* F
end;
1 l, ?* T& F6 q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& M: B% E) x! [# ~/ Y part := @.transpOrder;# _ ^4 k7 _5 z5 K
part.move(@);-- load part
3 f C2 P+ w) k# I @.CurrIcon := "load";# w! M9 N5 ^5 |2 a
GlobalDistObj := part.globDestination;
$ Y4 R% O, u, P. u0 K7 k" m assignLObj := rgmanager.rgAssignL;
4 g- g( C$ ] [) W* b row := assignLObj.getRowNo(GlobalDistObj);
m# b$ T/ ~8 W: o, N if Row = -1 then -- since 70
, S0 X$ s& S9 k# ]' y if lan=1 then
$ R" `5 F9 x- b$ {2 a- f6 {& Y1 j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. H( V. ^) O6 V8 W3 s2 S1 h: j to_str("in der Andockstation: \"",?.~.name,"\""));/ V7 g- D8 i/ |" n
else
6 v0 ~8 L4 [, {/ ?7 T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 _$ B, ]! o8 c
to_str("in docking station: \"",?.~.name,"\"")); + Q# _& }# R! }" L
end;: K2 ~1 l, C) L
else6 ]3 T% e8 L% L6 x- v/ |
@.Destination := assignLObj[1,row];
3 r9 g4 K# F/ j# U* z5 w6 {! r end;
1 D& ?- n5 V2 B' B3 d$ d newDirection(@);6 `4 H! e0 S0 K7 B
@.HasOrder := true;) H0 t' e" L* ~3 Q; L$ ]
end;' y' A" u1 H" o& E- l5 H
end;& e \# r! e- J3 R% \1 _
end; -- of the method1 v. ^. V" |1 `, s2 r
|