/* called by: entrance ctrl of the object 'track'' C. W4 ?8 `+ d4 v! @5 V1 n. s( l1 G$ W
*/
7 L5 a# O, n: A! b. E ^is/ O+ B0 w: s6 b. I1 t( H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" k3 z# X8 W2 p, `- f
do4 F* R) z2 X) W% O$ u a
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 I% \1 P4 v Q# m if current = @.Destination -- else return
- ^$ E+ k: Q+ @, y/ o2 {/ t then9 q3 Q" C/ _& M) J4 z
@.Destination := void;
) c9 H2 `6 ~# ]% q$ s o8 h if @.occupied then
! Q! M6 L8 F& ~/ J part := @.cont;
- C8 z, L) c6 C) [. _. f @.transpOrder := void;" g) ]. Z: m: l3 U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 H5 |% v0 U3 A) D3 b
@,root.eventcontroller.simTime);% ^2 L2 A9 f3 \- e8 d# V: I
@.HasOrder := false;: r" w' ^# p+ e0 ]! t
@.DrivingHome := true;
; g6 G& s) s/ C$ a3 W rgManager.tryToStartTransOrder;
" `# M" Y: f" k' W) E if @.Destination = void" i! Q" ]7 i' p- Q+ `* W- A P
then -- no transport order for vehicle @# m, L/ S2 j% j9 f6 n& x
@.Destination :=
/ T) V M$ {# N+ E rgManager.nearestFreeStation(@,track.~);/ ^: R7 L0 ?1 n# w" C# a2 e o
newDirection(@);
+ O8 _% N3 |5 o if @.Destination /= void then
# [3 l! l: D& T0 s) J+ d7 C @.Destination.NumReservation :=; D U& X' P/ f# X
@.Destination.NumReservation + 1;# R( e8 Z2 |# I! C+ @# k
end;5 k6 |( [6 E3 x
@.CurrIcon := "drivingHome";( o- s# O+ x. I5 m3 v
@.DrivingHome := true;
/ s# l5 d4 |2 r/ j* \+ R end;
* Q. S) R5 C3 K, e* \8 m3 p% f8 f8 ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 {. Z, j' }0 R7 k part := @.transpOrder;/ H& Y# g/ n1 j5 ^
part.move(@);-- load part
?# j5 d6 b. T4 j- s* X" ? @.CurrIcon := "load";- G1 m/ Z4 M: K% i
GlobalDistObj := part.globDestination;7 i* x+ c: t5 `$ K* O
assignLObj := rgmanager.rgAssignL;
& y$ E+ w3 u, L" z# P" ?4 X4 @ row := assignLObj.getRowNo(GlobalDistObj);0 f5 }+ T8 x% c) D' |
if Row = -1 then -- since 705 E% b4 Q8 t) l
if lan=1 then
& K2 b3 X4 D' k/ V! i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: P) p( H+ j7 A1 _. G% h: K( R3 Z to_str("in der Andockstation: \"",?.~.name,"\""));
1 o) [' Y6 W# s1 V- R: o& ^. c/ W else1 d# C, i5 ~1 i( S1 F+ z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 F$ ]* ]: {+ U# |4 U+ k
to_str("in docking station: \"",?.~.name,"\""));
% Q2 v: w/ e/ n+ n end;
4 z- _* Q' G" N: { else, U3 Q ?: ~: q9 c( T
@.Destination := assignLObj[1,row];
- K: F$ U A4 | end; 7 u! z# k* m4 i0 m
newDirection(@);
" w. Q! X6 u8 ~ @.HasOrder := true;
& y: ]6 [$ D) {( S( { z" r end;3 A, N6 C+ G/ w# [
end;9 |! D( j$ C+ W4 b' ]
end; -- of the method, ~( I4 A, h8 C% p6 E6 X4 S
|