/* called by: entrance ctrl of the object 'track'( m& a @ @# h5 `! e5 Z% V' K* a
*/
$ j6 ]3 ?3 |( ?' T6 G$ m; iis8 I1 d5 {' L2 z3 |5 e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; h% l& z9 _) ?/ x: p4 x L
do9 K& D( V1 [4 ?! w
Lan := rootfolder.Internal.Tools.AOLlanguage;: Y0 v" e8 l" v" m
if current = @.Destination -- else return2 z- W6 E. s1 h2 S4 s
then
# @/ A I% {- | @.Destination := void;
# a+ r' ]) l: @0 b# F/ ` if @.occupied then3 Z" o. B' W3 M3 E: ]: O5 _9 E8 a+ i
part := @.cont;, d& X! ]: ^8 H5 x; ~8 R
@.transpOrder := void;' X7 w/ d! ?8 U' g) D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ s6 V6 ^$ G7 _# o2 K$ {3 X: ^8 ~ @,root.eventcontroller.simTime);7 T" y2 b# r7 I# k* d" ^
@.HasOrder := false;
2 Y5 K5 G5 `" ^1 ^" {8 @4 t* H @.DrivingHome := true;
9 ]3 }* k' C$ @3 U rgManager.tryToStartTransOrder;
. N! }* m3 I7 c7 } if @.Destination = void0 Y6 E# ]" k/ m0 N4 v( X. ]
then -- no transport order for vehicle @
4 _( U% S2 |3 ^! f! U3 m; { @.Destination :=
4 Z e. P* K: R, a- c: g rgManager.nearestFreeStation(@,track.~);7 E) W& O5 y5 S' h
newDirection(@); ' h S( D5 \& O& ?7 i. I+ ]- n
if @.Destination /= void then
# Z/ w4 _' I: u2 \' G1 O9 y @.Destination.NumReservation :=% @( y9 y$ [6 Z( D
@.Destination.NumReservation + 1;
! m& \; q# |3 I: Z. E3 H. h: f end;
+ i4 F8 n* c$ w0 L/ q @.CurrIcon := "drivingHome";8 S3 Q7 q$ s3 A/ Q+ _( k; p
@.DrivingHome := true;
( y5 S3 W: k' h& v" z2 \ end;: v: p% J T ] @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) K% p% k0 k+ c4 w3 ^, t3 _* h part := @.transpOrder;
' N d7 `( U- p3 X part.move(@);-- load part9 P O) B% {; ^+ o' a! j
@.CurrIcon := "load";
6 e+ v* w. [& `; p: I GlobalDistObj := part.globDestination;
$ b1 X+ K# n% j# b. K assignLObj := rgmanager.rgAssignL;
/ E- K% G* m! G) U. ]: i2 Q- T row := assignLObj.getRowNo(GlobalDistObj);
4 _1 S0 F7 e* Q3 o O if Row = -1 then -- since 70
" s* o- d- o. ~9 e4 s if lan=1 then
1 S, b6 C% A7 J# _( A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, t7 P4 W! _0 Y% r0 V/ e
to_str("in der Andockstation: \"",?.~.name,"\""));% }8 x6 J) L; B9 r' U' l
else2 O" e4 ]* m! ^) Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! e7 Z! H' n6 Q. K& X0 a/ [3 P to_str("in docking station: \"",?.~.name,"\""));
( N6 x; Q& m3 l end;/ M; I2 o$ e+ v. S! Q [9 Y9 {! d- ^3 _
else
% C. [# O4 Z) Y/ o2 X! H8 @* F/ z @.Destination := assignLObj[1,row];8 j1 ]( Q8 o$ R, ?5 r, B
end;
' d# b9 T; @4 Q# F( x+ s5 V newDirection(@);
}3 U q% `* o- b3 ~ @.HasOrder := true;. h3 `# f/ | E" m; O
end;
! a5 t1 y4 Y. y end;
9 c2 j A; _, v1 N0 K! ?$ H" }& Q+ qend; -- of the method
D5 |, w4 W) B2 i |