/* called by: entrance ctrl of the object 'track'
/ Z" y, ^ d. C. |8 g6 ~4 I) P5 G*/
" ]' }0 \( n4 U9 |5 wis
6 w o, u! S5 d0 ]/ t' a I8 d part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 ~7 O7 p: D) O9 y R2 I' K# h
do
, Z' Y# [: d9 |' w7 R Lan := rootfolder.Internal.Tools.AOLlanguage;' l& L3 D( K' U2 B
if current = @.Destination -- else return1 N+ m ~ X5 y. ^; i9 t; I
then! R% E( ^+ r$ m0 x1 r: H) B
@.Destination := void;
0 {% c/ D5 g2 \, O Q- L if @.occupied then
4 g9 j% Y* T% E- j* q6 |5 N part := @.cont;
! c6 `4 q& W h, m2 |# y! a6 I @.transpOrder := void;8 }+ R4 r8 I9 H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ j* t' A- V W @,root.eventcontroller.simTime);
; @3 e) {% Q" [- k @.HasOrder := false;9 a# z( j; g0 {1 q0 N* S
@.DrivingHome := true;$ g- l9 [9 x& U/ Y; X% L
rgManager.tryToStartTransOrder;
1 K- N9 l8 q5 e if @.Destination = void$ W0 H$ }4 v2 R9 X9 P: A% L
then -- no transport order for vehicle @
( A A2 w/ O5 C* Y' r; @- K @.Destination :=" |" h$ ]" R3 u9 j
rgManager.nearestFreeStation(@,track.~);
3 k) w: P: ~, n0 A; }0 t newDirection(@);
* ~* X8 G' I3 `. t4 j if @.Destination /= void then
4 y2 D0 ` E1 S) a @.Destination.NumReservation :=
$ x! ?" P9 k1 _0 j2 g @.Destination.NumReservation + 1;' ~7 E* }" F8 U% Q
end;5 T$ L9 u$ s7 f
@.CurrIcon := "drivingHome";
3 a1 P; a! o# J3 g- _ @.DrivingHome := true;$ P- g# c g1 C9 e. Q K( i" Z& z' ]
end;% g ]5 A4 l+ [ H# P; ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( X' {6 y- }* T4 a* e
part := @.transpOrder;
4 v7 Z$ ^4 Q; V part.move(@);-- load part
1 t" X4 m5 ]* S @.CurrIcon := "load";& b6 A9 w- r( c
GlobalDistObj := part.globDestination;
2 ]/ }9 Y9 f: W: @& T# o assignLObj := rgmanager.rgAssignL;
( A9 v3 B+ Z% ^5 ^ row := assignLObj.getRowNo(GlobalDistObj);
/ W M7 g _. T) D# _- ?8 r, ]( M+ g if Row = -1 then -- since 70
6 o9 ?, l9 D# p) ~% F1 M if lan=1 then5 s9 j1 M+ N+ u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) m, n: ?* z4 w1 i4 J+ t" J+ q. y3 @* V
to_str("in der Andockstation: \"",?.~.name,"\""));9 w% w9 [" t/ l, f
else
7 g8 T+ y9 t( t3 c3 z! z+ F) N; A. x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 X, H7 R- b1 d to_str("in docking station: \"",?.~.name,"\""));
7 W( ]3 f# V5 y* { end;+ [, F0 _, j4 h6 Y& l# z) U
else
5 a$ H: w$ E$ y) I. ~ @.Destination := assignLObj[1,row];7 N+ a+ F$ |' P' n4 `
end; & ]: |$ t' U- m5 Q4 X: U
newDirection(@);
1 \+ i. i- x4 v @.HasOrder := true;
% e8 M, n0 F6 D$ ` end;8 v9 g8 E0 H# D0 m( P
end;
; ?! ~1 C' V. ~8 h7 u Zend; -- of the method
. l! L( R* a% r& }) \; } |