/* called by: entrance ctrl of the object 'track'
! Y1 T% a1 c5 p$ A& O3 I*/
" }5 B" k; A5 U/ Ois
1 G' j, d) p0 @% l part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' i* ?0 A1 ~. S8 H c/ ^do
) W: U% a* Y3 q* {: Z8 a Lan := rootfolder.Internal.Tools.AOLlanguage;$ J9 b' n7 d) o+ O2 A1 g$ b
if current = @.Destination -- else return
: u8 T) [. L) D* D then1 G+ ?: [: K0 [! g, Z1 X
@.Destination := void;/ ^5 z3 e9 U: x* J1 Z
if @.occupied then
/ G4 E6 l- w6 m7 Z part := @.cont;$ ~7 c" Z" A1 l" @ {: X. S
@.transpOrder := void;" g5 r' T. K _+ Z. a0 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, \1 b, j" c4 O. @" U$ ? @,root.eventcontroller.simTime);
$ J% i( F/ z2 h B9 N4 i @.HasOrder := false;( p: }6 a7 N j' i& T: b2 V1 I
@.DrivingHome := true;
9 W U) O, s% t i2 H2 M rgManager.tryToStartTransOrder;- \3 L9 U# U3 ~) Q
if @.Destination = void
. ?' c' w- z% K& Q: I5 ?5 [ then -- no transport order for vehicle @; o$ Y' R$ V( j H
@.Destination :=
( ]: L% X/ x7 V: y& H8 o rgManager.nearestFreeStation(@,track.~);
& M8 b3 h B% |$ ]! l newDirection(@);
$ g; ~: @" a% d0 Y+ x/ n if @.Destination /= void then0 u# V4 [+ G+ n6 H2 @. {4 Y
@.Destination.NumReservation :=( p9 U% C- A1 A" T
@.Destination.NumReservation + 1;& M" t/ T6 ?2 l+ k
end;
' z" ?# D8 _( a" g @.CurrIcon := "drivingHome";# D" I# T& f1 {
@.DrivingHome := true;2 \4 J8 w$ N; O5 W6 w
end;; i; ~+ w; N8 Y4 J. ]5 Z0 h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; r5 n. f% ^& V" ] part := @.transpOrder;4 U5 M6 E( g1 a4 N3 F$ @% F; f
part.move(@);-- load part% |0 w# |$ e) ]) d3 N- T9 h
@.CurrIcon := "load";
$ P0 g9 [, f( C1 b* a. N GlobalDistObj := part.globDestination;' r) ~# a: N; o; a$ A; t8 G
assignLObj := rgmanager.rgAssignL;8 a- F5 c( z8 g: n3 v6 l c
row := assignLObj.getRowNo(GlobalDistObj);
" H& U( i3 l4 _* l! Q4 ~4 T6 ? if Row = -1 then -- since 70+ e" n3 y( U4 U5 Y$ N, s
if lan=1 then5 W0 A7 J$ \9 x0 o8 K V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& ]( [. K0 V( o8 y9 k& k
to_str("in der Andockstation: \"",?.~.name,"\""));
. e5 }! I) u4 L8 ]; m else( n; [: L+ x, m! h* i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# I( q2 l* O& @; a5 U% m5 l to_str("in docking station: \"",?.~.name,"\"")); 0 {7 V3 Z# B- g9 z" x0 a9 r) _
end;' F, O% o" h/ |: ]& u
else$ ?" M Z% X' p: h) r" Q
@.Destination := assignLObj[1,row];( Z: \/ t, Q1 ^. U- w% M0 [( t
end;
/ j7 P' F) T3 v& z newDirection(@);
$ |6 T; Y! E2 Y; S0 Y/ A @.HasOrder := true;
+ ^. y; X. [; F: X- _$ _1 L4 u end;
3 J/ ]; a. b( K1 Q end;
/ z+ Q& Q& b9 cend; -- of the method" h9 j. {& Y2 }
|