/* called by: entrance ctrl of the object 'track'2 L8 i% Y* K, F+ `
*/* z* g5 b& b! [6 n& K
is
0 m3 A. e: @0 q9 ~ k part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 W( I. G9 e; A1 g" q9 _6 z
do
! Y1 @9 z' N: q) V Lan := rootfolder.Internal.Tools.AOLlanguage;* W' E: n$ ^" i5 Q; c5 G
if current = @.Destination -- else return) u) c& }4 l$ G( V# r- A
then
, f1 g/ k) I' m% v" g. X1 b; ^: a4 t8 l @.Destination := void;
3 k% I2 v' H( U if @.occupied then
" J" N5 M* ~4 o/ D) u part := @.cont;" K( G. }# n5 x+ z+ E
@.transpOrder := void;1 A% N$ L8 z6 @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* \% J8 x3 J( [$ y" ~, Z: a
@,root.eventcontroller.simTime);
6 ~, E. {* E6 u3 Q# M @.HasOrder := false;
7 L5 K) l/ u" c- d; A' L. j @.DrivingHome := true;
9 }" v1 o, {5 h- c3 I. | rgManager.tryToStartTransOrder;: P1 i' J1 s2 u: O }; b
if @.Destination = void+ n+ X# i, M0 Z, q
then -- no transport order for vehicle @) t# e2 R# f: W% \+ X8 R$ g
@.Destination :=
. E' O- y0 `& W: X6 h rgManager.nearestFreeStation(@,track.~);3 G9 [ w# w0 o8 u* f R
newDirection(@);
# S: N8 X: i9 j6 n4 @3 ~5 I! Z if @.Destination /= void then& `; T9 S' j z4 z/ D5 r
@.Destination.NumReservation :=( \) d% L# G# X* F
@.Destination.NumReservation + 1;
) I9 t# D d' V9 f end;
' I2 z* c/ ^6 \# j# {2 t @.CurrIcon := "drivingHome";
$ k3 y* O7 D4 {. z3 w, f4 D @.DrivingHome := true;8 E4 ?: y+ ]3 ^# K8 y+ [
end;
# G* G. e3 t* c* w* [6 N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 f4 c4 T2 o, N; c part := @.transpOrder;
& W8 K6 T- v& A part.move(@);-- load part, r2 J. U9 _1 B- v+ y& w
@.CurrIcon := "load";
- O g) p# P/ D: Z; {; |0 x" G GlobalDistObj := part.globDestination; \4 l, _% p2 u7 N5 |; V' s
assignLObj := rgmanager.rgAssignL;
; W* m7 D$ ^1 ]' X. I1 n, y row := assignLObj.getRowNo(GlobalDistObj);: Q) J7 z( p: i4 W9 |
if Row = -1 then -- since 70
8 ^ b& b. _; }2 e if lan=1 then
6 Y9 P$ \$ G1 d$ c$ T5 I; s' P: N4 P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! s2 J* n, S9 X1 s% ? to_str("in der Andockstation: \"",?.~.name,"\""));
: I r- r% f0 U0 q else
4 z8 _) i" v, ^2 C0 Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 ~$ d! W* |3 p' U0 U3 Z
to_str("in docking station: \"",?.~.name,"\"")); 4 w5 I Q1 o) Q
end;# L- ~4 H3 o+ ]1 p3 V
else
& A9 Y: L% i# ^% M$ i0 J7 _0 _2 | @.Destination := assignLObj[1,row];
# g8 ]0 a3 z. \; R end; / s7 N8 W2 u" ^5 ~8 H, p) P
newDirection(@);
: i) D% W" l1 ?9 \7 z @.HasOrder := true;
4 ~ q* Q! a7 l2 ?( ]/ l, d7 f end;' P" R: L5 ?$ V) R" X
end;$ d! T ^$ P* q: h; x9 S9 z% x
end; -- of the method7 J. j2 s4 Z' d2 P/ U3 Q" M
|