/* called by: entrance ctrl of the object 'track'
( z9 w! E7 n1 z7 q a*/* a! w7 L' y C) T/ X( M& ~
is+ D E9 r6 _7 M5 P) ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) f: \% }0 z$ w0 Q# Pdo
M5 \* h* \2 p, p# M# [9 e Lan := rootfolder.Internal.Tools.AOLlanguage;
; b8 a" e3 l$ w7 P/ D& G% y8 L! ~ if current = @.Destination -- else return
1 v# Z5 f; s8 i, z. Q P& q5 ] then# k" A' v' E6 t6 K6 v/ L5 t* e
@.Destination := void;
3 {+ o- {; p& I; ]# v if @.occupied then' G/ } \( Z {% x8 `3 Q# z r' C
part := @.cont;; J o, Y U1 V! z0 W
@.transpOrder := void;
: @5 {, J! u7 r/ j% A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 G4 m; U2 Y0 R ?' r6 y @,root.eventcontroller.simTime);& t$ U9 q' `/ o) i5 l! o5 P
@.HasOrder := false;5 }6 n3 ^1 W: l/ K* \
@.DrivingHome := true;5 G7 H, j! ?# L3 Y$ e7 ?
rgManager.tryToStartTransOrder;
9 o+ P: [% v' k3 O0 D if @.Destination = void6 p4 \, P5 l. O7 [+ x7 t
then -- no transport order for vehicle @
$ W& H% y2 F! [' s4 u. C) } @.Destination :=3 i- l1 Z6 G$ h
rgManager.nearestFreeStation(@,track.~);! s# x& H, E( H' m
newDirection(@); ' D9 {6 ~$ v9 d: a; P( K) G
if @.Destination /= void then
$ I9 {% ]) O/ F4 ?7 q0 b @.Destination.NumReservation :=3 y g& O' h1 n* u/ _2 F/ u
@.Destination.NumReservation + 1;! C% ^+ v" Y1 Z; ^: {
end;
4 _: y+ Y6 y4 k. j' N3 U @.CurrIcon := "drivingHome";' L# u8 d6 G& o8 n
@.DrivingHome := true;
$ H1 O9 E4 R" s* b+ y" T( O5 v, F5 g end;
" `" N) p) H. Q+ H) Z8 u else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ V+ ^5 H) s3 q/ z part := @.transpOrder;
' U( s& _1 H v4 w part.move(@);-- load part- v. t5 B" V% ~
@.CurrIcon := "load";7 x1 Q S& X9 q! j( {- i& i
GlobalDistObj := part.globDestination;8 A, l. N& h4 p0 u) s# E% y1 D8 a
assignLObj := rgmanager.rgAssignL;
9 {1 {5 E# w& h row := assignLObj.getRowNo(GlobalDistObj);
; _0 C, l! O" }; z$ N; B/ T if Row = -1 then -- since 70
0 ?# X! W; f) w X: E' W: w. I if lan=1 then
6 I& L" e8 z4 g# G! L6 N( B* y4 C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 Y7 V" L2 i- j: A* V to_str("in der Andockstation: \"",?.~.name,"\""));4 Y1 d$ W4 n" [# r/ Q
else1 h3 \& {4 |6 E- j9 N! ` X2 X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 T6 R: {" L) X3 u9 h
to_str("in docking station: \"",?.~.name,"\""));
% L; k9 q/ i% p9 R" ? end;( c% Z' B# d8 D. U0 y' s% {
else
/ T7 v' M0 @3 `' d5 ~ @.Destination := assignLObj[1,row];
5 O) y+ J" q% Y; l2 i. ]) s end;
! l) l! e t( }0 s" T! [- ]: f newDirection(@);
) |4 e0 S+ X* K6 V- k, M6 l @.HasOrder := true;$ B. k( ^* w0 f- W; h+ W/ x) q" \2 p8 b
end;
0 U) q0 p a% M+ F: Q' t0 t9 X end;
4 |+ D m9 B( G2 S. W+ Q7 T2 `end; -- of the method9 P% z' [3 M2 Q2 @: z6 J3 c: k
|