/* called by: entrance ctrl of the object 'track' t+ c; I- _1 q8 g) w, Z6 h
*/( A+ n; e- [4 x1 _
is
& `1 U' a8 F8 t; B* ]7 F! t part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 @% M, R, d4 I- L: l7 ?
do" [2 Z& y Y- s. B# y5 k) X
Lan := rootfolder.Internal.Tools.AOLlanguage;6 p" M0 s* N: W9 k5 J# w( g0 }
if current = @.Destination -- else return
% A: D p6 P, U6 T+ c then
+ V. A2 W; w C8 Z7 L& Y2 a9 r @.Destination := void; w; e& X' s- |$ b
if @.occupied then+ e5 Q9 e8 R- z: m7 A2 s2 }
part := @.cont;/ X" p; M+ m4 W% I
@.transpOrder := void;2 \+ \2 r- {3 Y1 G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 o5 ]8 g* T. v" b @,root.eventcontroller.simTime);7 V5 T( R. R. g7 m- w2 Y
@.HasOrder := false;
4 S. ~$ d6 w: N @.DrivingHome := true;' m% X2 K, N$ }' [* ]! a
rgManager.tryToStartTransOrder;$ Q- p) i2 B/ T D# l# ?3 t
if @.Destination = void6 b8 q) [7 |$ h* Z
then -- no transport order for vehicle @# C7 C6 s& e# Y3 m9 ]2 M1 Z
@.Destination :=
1 S, ?" W& @- Z8 t. i- j* t rgManager.nearestFreeStation(@,track.~);8 B* j1 U. G: \# q7 h& f4 R" f+ |
newDirection(@);
; z! x$ M) _& o5 p) U: \ if @.Destination /= void then
) r- s& S( R g7 k @.Destination.NumReservation :=
/ \# L" H# I; S @.Destination.NumReservation + 1;7 u- F7 W. w) _( f V4 Z5 b4 z
end; X3 u0 \( ^* Y3 N) R/ s
@.CurrIcon := "drivingHome";
; T$ J9 ~" K( b7 M+ C/ E# } @.DrivingHome := true;
+ s* M, n: Q; i- z$ `, U" O end;, G$ L3 W5 K* q z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' Q" i/ A1 K! e7 L# n. D; M) E
part := @.transpOrder;
& K6 O% M2 W; e4 a: h4 Y4 j part.move(@);-- load part3 ^4 p# u* C- ?; m3 f. I1 d% w9 g
@.CurrIcon := "load";; Z5 V% S: R; y' G" X, ~
GlobalDistObj := part.globDestination;
3 p7 _0 j/ c& S assignLObj := rgmanager.rgAssignL;
8 O. j5 z- \. m/ u+ F7 f row := assignLObj.getRowNo(GlobalDistObj);
* b, D9 E) _* X if Row = -1 then -- since 70
( Q' w' d0 t: `8 M8 g- z9 } if lan=1 then
6 Z1 P7 [# B1 ]" b- D) H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: q7 C! s% R$ q* ?" ]
to_str("in der Andockstation: \"",?.~.name,"\""));
" j5 x: V1 I& ]8 X+ {: P. p6 j0 G else
, K2 p' `3 \; X/ C2 t$ L8 ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 Q% k" Z" w& v to_str("in docking station: \"",?.~.name,"\"")); " Z2 Q' ~) p$ b; t1 [: I
end;$ M, g: }0 a8 _9 h1 v
else
9 I& \$ B& J, Y. l7 ^; q- f @.Destination := assignLObj[1,row];# _- S: V% o# O( T s" }/ `
end; 6 p) r. Q8 @; i. q4 X: q$ W% X# y
newDirection(@); o1 ~* D+ `: V, l0 W" @+ i
@.HasOrder := true;5 V. q0 m2 J0 R
end;7 a V% d% F% o9 t$ X
end;
# F* ?/ z: x" h/ f6 @end; -- of the method
# D: H4 k$ Y. ]0 f6 b) [ |