/* called by: entrance ctrl of the object 'track'
9 c. W2 t% ]- [2 g5 w*/6 c8 B. f$ m6 @+ z0 z/ q& P! N- P
is4 N4 \ H2 h5 |1 v- y9 \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& C: Q4 U- I; C: l
do2 E" E, f! O) |# C' [% |
Lan := rootfolder.Internal.Tools.AOLlanguage;
; X: i8 ^8 t9 c1 Q if current = @.Destination -- else return
: M1 ^# }+ G; |" |/ K2 Q then
' E# x, x/ r' I8 V2 v5 k( v @.Destination := void;
+ b; F1 Y. N4 h6 D% C7 N if @.occupied then) v" b; B8 c$ g1 A# \9 N5 t
part := @.cont;% {6 j/ g1 z X2 x5 x
@.transpOrder := void;, A {$ {, ~8 @# e! H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
_: h9 B4 `6 q @,root.eventcontroller.simTime); ~6 l' `! h; L4 C" L7 F
@.HasOrder := false;
' w* k7 f; i$ x6 K @.DrivingHome := true;# R; q+ w& {+ p, S- F
rgManager.tryToStartTransOrder;
/ u: L" o4 f$ G3 d" p* M& { if @.Destination = void
2 q4 i- O& u4 t9 f; n6 n then -- no transport order for vehicle @
C/ K. U1 ?/ e# p Y @.Destination :=
( }# s0 o" S0 e rgManager.nearestFreeStation(@,track.~);4 c# A- x' t6 v' M! s! M9 D; o
newDirection(@); - y( D5 z- G: n1 o, [
if @.Destination /= void then
1 X6 ?; l: ~: f# H @.Destination.NumReservation :=, z! D! X8 v$ \3 P
@.Destination.NumReservation + 1;, l& v" C: c0 z; {
end;
4 U0 k1 f8 r- r- s+ Q6 S( L @.CurrIcon := "drivingHome";5 |; \+ G% z, `; \
@.DrivingHome := true;* [; j0 A8 m3 Y* N4 O
end;
7 f; m2 B7 a# [( A( g else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) p2 Y1 b* {% j! q* y7 G part := @.transpOrder;4 \4 g8 ?, x( H1 h$ n9 t; y
part.move(@);-- load part/ E$ V4 q6 ]3 N
@.CurrIcon := "load";+ o; O) w' F( V. M
GlobalDistObj := part.globDestination;% D! f2 t2 ^ D4 ?3 [- }
assignLObj := rgmanager.rgAssignL;
4 u2 P7 e7 A/ C% L- X! ]! s row := assignLObj.getRowNo(GlobalDistObj);2 C5 b3 q& H; [; ?
if Row = -1 then -- since 70
2 {9 O& C" n/ i7 @+ V4 Z% l& c- } if lan=1 then
! a5 k# }1 n/ Q( \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" M: _9 y! x8 B* n* v6 _3 u3 s( ^# c to_str("in der Andockstation: \"",?.~.name,"\""));; P0 Q% A, i ?* H1 G+ M* t
else) f) x. s' C, e8 E/ v1 X! B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 I) K( v9 k; G9 j& s& s: j
to_str("in docking station: \"",?.~.name,"\""));
" ]& B1 u+ o" N" Q4 S$ o5 z, T' y end;3 Q$ \ s# u9 ]. v& A- A4 }, f* h
else$ t4 k- N3 R4 N8 @
@.Destination := assignLObj[1,row];
$ G- G* E( P% X9 d end;
5 S8 E6 H7 W+ e* ?) ~ newDirection(@);& {8 Z1 i6 V. O- w, x; I( {
@.HasOrder := true;/ ?* u/ c6 _! X, f& R
end;9 k: J& J0 I/ [8 }: J
end;
* V, G" ~, }* D4 i7 dend; -- of the method
J9 o, L, x* y2 v% ^; |" r9 M' f |