/* called by: entrance ctrl of the object 'track'
: L2 u. B% a" d: l9 `6 w*/- ]& U6 W9 L6 P5 L1 U: E: g! l. ?
is
, _) L ^1 }: F" H* c" }' {2 e part, GlobalDistObj, assignLObj:object;row,Lan:integer;# {2 C& a. z. i$ U; I% p
do+ b0 f" P5 D7 r9 ~/ Q* Q
Lan := rootfolder.Internal.Tools.AOLlanguage;! `& W U/ d3 G
if current = @.Destination -- else return
2 e* I3 I; L) j/ } then
" |1 K/ q+ T) F @.Destination := void;* N7 v2 [/ a9 i0 t- `
if @.occupied then
8 @. V. p' f1 M# R3 L6 x part := @.cont;9 ~6 V8 z$ ~) ^/ P L; T+ E
@.transpOrder := void;
E$ {- Y. {" o. l" g i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 k. s* R$ `* x1 d' D7 }3 x @,root.eventcontroller.simTime);0 R) C3 e( {7 m/ S$ x
@.HasOrder := false;
/ d, O( q$ B: V: N/ S4 C @.DrivingHome := true;$ M. K8 i) @: H/ J) S
rgManager.tryToStartTransOrder;4 n0 N6 i0 L, B3 M q. @3 h
if @.Destination = void
% A. V% Z# {9 w; t3 ^) Z then -- no transport order for vehicle @
# t7 X% K: X7 @3 ]* D+ V& d @.Destination :=
5 A5 _& j) S' {" V* C/ N rgManager.nearestFreeStation(@,track.~);
$ d9 c: t3 q/ |" W6 h# w* F( Y newDirection(@);
" ~, {( I: ]9 p3 s) y3 f* Q+ s# E if @.Destination /= void then r5 G2 Z- y; ^
@.Destination.NumReservation :=
" ]5 [# H1 W" Q2 s F; u: ? @.Destination.NumReservation + 1;
% {: Q* x# x1 X U* Q1 y, b$ n end;6 T* Y/ y; ~. R
@.CurrIcon := "drivingHome";
. o8 T1 Z4 ]7 E! x$ e5 n @.DrivingHome := true;2 N i( Y5 g: p
end;. y5 d; n+ R% i, i4 B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( f% Q d) _0 N
part := @.transpOrder;
( A% V& `* x0 g0 j part.move(@);-- load part
2 }' X: @/ b2 D) q" n3 r, q @.CurrIcon := "load";
0 c- ~8 e1 z5 d" J# Z GlobalDistObj := part.globDestination;: g0 {+ \! b9 h8 M2 w; X! s
assignLObj := rgmanager.rgAssignL;
8 q; Y3 v" O8 }) {9 A k row := assignLObj.getRowNo(GlobalDistObj);
) \6 \: G! s! r& \; G if Row = -1 then -- since 70# `, Y( h6 x8 y4 O3 g8 Q
if lan=1 then4 B) y. f! ]0 ~' O2 p4 U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," v- h' S3 B2 A6 W: d
to_str("in der Andockstation: \"",?.~.name,"\""));0 `$ C/ t) _# A3 I- x8 E0 o+ n: S
else7 B7 w0 r% t$ C5 g! @, w! q' f X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' v+ l- {1 [3 _2 V, I
to_str("in docking station: \"",?.~.name,"\""));
[: w+ s" w9 J end;0 e. h8 }; H8 z) a1 S2 W4 a
else! P3 ?9 Q2 R, S& X) g
@.Destination := assignLObj[1,row];5 U6 x2 e! m, _
end; ! S: k3 M5 P# O% o" y
newDirection(@);7 O2 T/ ^" Z U8 t5 ^3 ^4 c4 d
@.HasOrder := true;* l; j% [9 P9 e$ Y7 c
end;! r0 t- \9 C* w+ Q- b0 ]
end;0 [8 Y$ H$ u, y9 I' ?% m- |2 b
end; -- of the method/ ~" G& R% a6 m
|