/* called by: entrance ctrl of the object 'track'
2 F ~% J7 B( P C*/2 L/ X$ r( t/ f) M& x
is
' I, v$ }& w. K. [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- }2 }7 r4 i6 R2 d% Ldo
3 R: f6 `0 _2 _! ]# N' H Lan := rootfolder.Internal.Tools.AOLlanguage;
1 e }/ S- N- s( D if current = @.Destination -- else return$ e2 ?" Z; M* ^: r, K) a( C2 C. D
then6 Q5 S/ U8 K3 z' C4 f
@.Destination := void;
* X' ^% `' s ] if @.occupied then) A8 }8 b( ]! r8 O( J0 V/ F* b
part := @.cont;
8 ]& C/ C' p v: e. n" n9 s' I @.transpOrder := void;- x7 m& T% M( I. S3 I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 L" q5 l/ h! K) m0 V( h
@,root.eventcontroller.simTime);
a1 O2 o0 N' p! q @.HasOrder := false;% U. N/ H3 l4 h' V' {5 U: M& _ b
@.DrivingHome := true;) [8 H" h8 H5 ^ X0 Y
rgManager.tryToStartTransOrder;! w, T5 M8 T {1 a: w3 G$ x) K
if @.Destination = void
3 k& N$ U5 u. m7 W2 [1 K" { then -- no transport order for vehicle @
& y/ V+ r- w( ^5 H5 R6 |0 i @.Destination :=6 A, _/ A i# S0 x. W/ Z; A
rgManager.nearestFreeStation(@,track.~);# [2 X8 k/ h5 y/ v% i4 {
newDirection(@);
/ K( N8 Z! q; ]. N, N8 J) ] if @.Destination /= void then
% L) \6 b) e) Z# E" }4 V. H" ] @.Destination.NumReservation :=
6 x* D2 I$ d5 {) G+ z @.Destination.NumReservation + 1;
( v; |1 o4 G# K5 e. y! U$ _ end;
. t) X4 e3 O3 G6 ? v1 u/ f @.CurrIcon := "drivingHome";
5 X: A6 d0 v. n7 P, z8 D @.DrivingHome := true;3 u( }) ?9 Y( }2 ]
end;+ b" P# D4 I4 t# c) K/ j- Q+ E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: p6 C+ X: a6 p; j [5 I part := @.transpOrder;# Y7 c( }/ g: D9 `0 m1 a; x& {
part.move(@);-- load part
5 P. I; o; P/ ^$ n2 G @.CurrIcon := "load";+ v$ m( R( q! B. a
GlobalDistObj := part.globDestination;3 U* \* O2 T9 o6 i, w$ W0 j
assignLObj := rgmanager.rgAssignL;
% O( J5 W4 O" N7 I row := assignLObj.getRowNo(GlobalDistObj);6 p. R$ p @! V2 e! z; j
if Row = -1 then -- since 70
# R# B! _5 T3 E% a: k3 ?3 R if lan=1 then, w" b' p* ^% c: x1 ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ E$ \ Y% g+ u4 p/ Y to_str("in der Andockstation: \"",?.~.name,"\""));1 t. T" }+ r# C$ _
else$ c+ j. ~6 i2 F; W: X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) }* c' W6 b# e4 ~ to_str("in docking station: \"",?.~.name,"\"")); ' W, t8 W- Y) ~+ P4 n$ _
end;
/ j1 \% T0 W- g/ V- b( p. d) L else
. J( u7 F! v7 O, P$ l @.Destination := assignLObj[1,row];
% m# k9 x' g* F8 {5 t" D; G% X end; 1 Z6 F& ]# A5 f9 N4 t1 C0 h
newDirection(@);+ M' x/ @+ Y9 L
@.HasOrder := true;, A" [3 o6 L& Z% |
end; p: U$ c, a4 `+ g, a. X
end;" J0 w. @+ B0 q5 `3 H
end; -- of the method1 E' H7 x, r7 i5 s
|