/* called by: entrance ctrl of the object 'track'
% M! u. S1 G6 g$ @% x*/& G, e* F% P& I# J
is: E4 j. b( i- F3 i( L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' i( ^: k+ Z! y! I/ hdo
. H% f1 ]0 a$ F9 c- @3 [ Lan := rootfolder.Internal.Tools.AOLlanguage;
) g( ]% Q7 N" F. @ if current = @.Destination -- else return) \( ?# W5 B$ a% Z
then
9 K! [+ W; ?3 q- f, x5 h1 a @.Destination := void;
! K! `0 j+ ]/ L9 T | if @.occupied then
2 i' n! @3 f1 S" [/ A part := @.cont;/ L }% h9 g0 R# p
@.transpOrder := void;/ @" R. r) g3 A& h8 b3 m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) M- ^# `' h7 x% I0 |1 J, N& c6 X
@,root.eventcontroller.simTime);
" J7 I, `9 @7 i$ j6 A# P& z6 P* @ @.HasOrder := false;$ x) m6 N+ V% ^* }" ]
@.DrivingHome := true;
4 D% W+ r% M9 @$ [0 _" N rgManager.tryToStartTransOrder;
9 m, a9 p, {! Z( D if @.Destination = void- f. I& x0 L( ~ A8 S9 `
then -- no transport order for vehicle @! A+ g5 d& O; f+ M* Y
@.Destination :=
( a# H+ w2 p2 W0 ? rgManager.nearestFreeStation(@,track.~);& B) F" ~# U% p4 j' h
newDirection(@);
: O( I, Y$ L4 i if @.Destination /= void then
4 \1 y; e5 _2 c; R8 [ @.Destination.NumReservation :=
W. z, M) d7 z: N: L# W1 D$ d# y @.Destination.NumReservation + 1;
' v9 ^, F* q! D4 \" Q, W- r; [+ m end;
% \# Q; \ X! u+ h @.CurrIcon := "drivingHome";
- `5 H' W- T4 w5 P @.DrivingHome := true;4 D9 \$ a0 L9 l- B2 ]% D4 |1 p
end;
: e i. i8 `: }# i% W; t7 l+ D else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 w5 x" d6 |- L$ R8 U
part := @.transpOrder;# i3 R; F* B# h' @5 }
part.move(@);-- load part, }; e5 W0 `) E; d. F
@.CurrIcon := "load"; J6 X3 ~+ j2 i3 O6 n( B, s3 `
GlobalDistObj := part.globDestination;/ K! {5 J! r, n; _; b b$ k5 L0 L9 c
assignLObj := rgmanager.rgAssignL;
! b4 {1 z, ?8 R# Y row := assignLObj.getRowNo(GlobalDistObj);2 q4 X% G; m- O4 C; ?$ r
if Row = -1 then -- since 70
2 T' R5 b4 a. p+ K if lan=1 then
y6 k7 Y. U; J8 D( c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 \7 r/ Y/ d+ b to_str("in der Andockstation: \"",?.~.name,"\""));
* ]7 w8 q5 t' U) Y else7 n0 u: ~: s- s6 Z' m6 u) ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) _" S/ o; a, Z- N) Y0 z, X
to_str("in docking station: \"",?.~.name,"\"")); " V9 X* a1 e K6 ^
end;
( R" Q- C0 o5 |9 \ else1 ^! e* l: x: @: C3 ~( ~3 H
@.Destination := assignLObj[1,row];
! S+ z+ T( H; P* E; n! `% G1 z end; ' l/ z' O4 Q3 N8 p1 \1 m
newDirection(@);# ~1 z- M' w {2 |3 ~
@.HasOrder := true;" T5 W( g& w% ~* h* W- P
end;3 d5 J9 t; D) w1 D( x5 I/ L
end;
. O" C( l5 r. hend; -- of the method( i! K9 v# G" y( X$ e
|