/* called by: entrance ctrl of the object 'track'
+ y/ Z: Z7 f! ]) o1 Q*/0 n2 _2 n& }% f: v' a
is
( z8 _8 g; ?; @: _( ~2 B. j# o part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 q4 K, i3 W; v9 i) `, a9 Qdo
) ^1 j9 r) u% ? L0 u Lan := rootfolder.Internal.Tools.AOLlanguage;% c+ k% W/ A) u6 ] M. l; Z
if current = @.Destination -- else return8 ]% p6 P+ B8 k$ t. E% z& N" E) B
then
) n( U. ]8 _: D; M @.Destination := void;! N4 p6 X8 l2 w. E! |
if @.occupied then9 {5 G% `& y1 G" J7 l- E
part := @.cont;1 s' k+ i) m# V: S
@.transpOrder := void;
2 `' C4 l; B. G7 v f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 \1 X4 O! u b
@,root.eventcontroller.simTime);
* L! c5 \; l* e- b @.HasOrder := false;
7 Z' s. Z8 `" G4 _0 g0 J5 H @.DrivingHome := true;5 {; \, ` G Z7 s- g
rgManager.tryToStartTransOrder;
4 W+ Y4 j: t4 Q) { if @.Destination = void4 h) r- K9 I4 |
then -- no transport order for vehicle @
4 r9 e# F1 P# [) k @.Destination :=
$ x* _2 r/ o7 S& W2 m5 r rgManager.nearestFreeStation(@,track.~);
8 B# z2 ]9 D: G% u! ~* h newDirection(@);
5 B" ?. Q9 g6 P) g: \' V/ }! Y! Z! c: I if @.Destination /= void then- X+ ^! p! N4 A" M# [+ I
@.Destination.NumReservation :=' [, M$ v0 a- ?5 B# E0 W
@.Destination.NumReservation + 1;
+ N+ N* Z- t4 c; P7 Z) ~ end;* {8 w7 X. O4 Q: O1 r3 \1 f
@.CurrIcon := "drivingHome";
% v5 Q" n9 j! F @.DrivingHome := true;3 x. \% a5 G# K
end;. K; j7 N3 T) h4 @+ ~) J+ O o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 p& H- ^7 A+ ]: H6 f" R0 {
part := @.transpOrder;3 n7 c+ \+ j6 A7 m7 y/ X5 @
part.move(@);-- load part
p- Y' n/ P2 g% B; J e( r( ? @.CurrIcon := "load";
5 @8 v1 i( W4 d- W* p" L GlobalDistObj := part.globDestination;& x+ z5 n. x7 T# A2 u
assignLObj := rgmanager.rgAssignL;) R; m/ r8 O/ E L5 L# V! \, s0 @
row := assignLObj.getRowNo(GlobalDistObj);
, v& M3 ?5 f/ N if Row = -1 then -- since 70, I3 v. x1 D! p
if lan=1 then
1 ~ O( n( v( Y0 G/ { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! @" E( n% o3 z/ p* l! P to_str("in der Andockstation: \"",?.~.name,"\""));: ? |* r# R' @! q! b+ O. w0 ~: _
else: n9 b/ J& D/ [ ?' E3 z: g! T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 y! S( q1 X! h9 h. g. x
to_str("in docking station: \"",?.~.name,"\"")); - o0 I9 e7 X/ S H1 z! s
end;% T. x+ w. j& y. O5 v$ g" [
else, D2 k. t( f' |2 D) x! R
@.Destination := assignLObj[1,row];7 |- x" w5 Z% ~0 U
end; * l T# {1 [4 a
newDirection(@);
9 K4 T! e% e# O3 g @.HasOrder := true;
. A% W7 H6 O9 _/ e! S end;
" A2 b$ R; s. H2 X0 M3 h6 z end;7 L/ Z3 w$ ~& I! I
end; -- of the method/ J( w" @" P" V7 { y6 ?, I \: y8 t% \
|