/* called by: entrance ctrl of the object 'track'
4 U0 D& k% f- s8 {*/5 A4 `& b& C0 N1 k; o, J& {, m+ ^( ^
is: w, I1 ]4 V7 Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# C% e& |: L# n5 Z% C" x" Rdo
! H+ T, Z( E* ^* Y7 G Lan := rootfolder.Internal.Tools.AOLlanguage;, V8 m! u6 o" M7 B0 K4 g8 c5 {
if current = @.Destination -- else return
% |( {& b& F. o! |* O2 ] then
e) q2 Y/ ?# s @.Destination := void;
1 F( H* H9 U2 W; W if @.occupied then F7 Q- i% O0 b5 f6 M1 |7 w
part := @.cont;1 n) D% L t" F) X5 _* ^
@.transpOrder := void;
2 X4 F# i) c5 A1 x- Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, h" {/ d/ o7 |& A' {
@,root.eventcontroller.simTime);
. S5 }+ j( H, }1 O+ y5 P @.HasOrder := false;% e5 @8 @5 W( N
@.DrivingHome := true;/ _# m8 V- p8 h% {+ S
rgManager.tryToStartTransOrder;0 v+ R+ L) V+ [/ v' S
if @.Destination = void5 X" K7 d+ _5 R/ [: X/ K: P
then -- no transport order for vehicle @
4 D6 R: ^5 ?% L$ @: M3 d; P @.Destination :=/ y" r# k {' C8 f, X" _! h
rgManager.nearestFreeStation(@,track.~);
/ f: c, [' b6 A& C, D. G9 K. g4 F' H+ ? newDirection(@); ( J4 s3 V n, o1 M
if @.Destination /= void then
+ m$ B% D6 ] {: L. i# {: M @.Destination.NumReservation :=
2 y; J0 p$ c+ v0 L" u @.Destination.NumReservation + 1;
. r ^2 D' E% ?* V7 M end; ?6 t4 e6 v J( r8 @4 W9 O d
@.CurrIcon := "drivingHome";: Z2 m6 B' O! `! ]
@.DrivingHome := true;
7 g* H6 ?! ^, t5 f end;" b) ^+ k: j& G" q! S6 {+ B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 I5 D5 E1 ^6 u* p: d part := @.transpOrder;0 _7 D! S9 A1 t1 Z) h! m; |; |6 p# p
part.move(@);-- load part! g' B% ~. y. R
@.CurrIcon := "load";6 U. S% w' {' S5 _' K
GlobalDistObj := part.globDestination;' i4 n1 p1 O& |* ?
assignLObj := rgmanager.rgAssignL;; \* u" g, s) E# D: G0 I
row := assignLObj.getRowNo(GlobalDistObj);
# D) ?5 K6 p* r* {' N if Row = -1 then -- since 701 g* C; b; G3 |3 u) x
if lan=1 then
, U! K' W0 h8 B' v0 @5 n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, B* N7 S0 M q+ y# j
to_str("in der Andockstation: \"",?.~.name,"\""));" b) R' Y l4 B' S# _$ X
else) ~0 ~, j! K0 { C5 |4 M2 E1 x* g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 ]3 J. O6 H7 D' d. R8 S
to_str("in docking station: \"",?.~.name,"\"")); & u. _; |1 [+ D* o/ w! ?
end;
! o- ?- j( p- Q( I! M; J/ t else9 d) W7 W# Z" P7 g
@.Destination := assignLObj[1,row];5 x6 Y- ]0 m- b* j. \
end;
- F& t+ _) ?' e/ x newDirection(@);
8 J0 m% {& g4 @+ w+ y/ Y( V @.HasOrder := true;
2 J5 u. H& j# A8 V end;/ U+ c: o- J* d# z# `
end;8 e; [0 h* O# ]% i
end; -- of the method9 O2 a. u' {3 d5 q8 S5 g- W: m; y# g5 U
|