/* called by: entrance ctrl of the object 'track'. m" j H" h/ p3 s- n2 @; I* R
*/' m2 U5 r, j, l8 H) h. V
is
5 b5 ^' @' t1 @* X9 M) F part, GlobalDistObj, assignLObj:object;row,Lan:integer;: D' m0 l' r# h# R" D- F9 M
do. y" p7 ^5 c: [4 h4 }
Lan := rootfolder.Internal.Tools.AOLlanguage;
: z/ `0 T7 v" d& [2 L if current = @.Destination -- else return
T6 ]9 I. \8 Z. Q$ ? Y- X" { then
* u+ D0 ^9 P- o2 f1 G. d @.Destination := void;
7 H7 T5 |# t! \8 \: a9 f if @.occupied then
3 d" p4 W6 r. U9 w2 Q3 M part := @.cont;" s# _; M }9 f/ H; `, s
@.transpOrder := void;. e) d8 [0 i% i: I" ?0 S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& ?7 E# S% _/ l; _5 |/ R
@,root.eventcontroller.simTime);9 e2 H! x) } H. Y6 I* t
@.HasOrder := false;
9 ^+ y; r- k! N9 o/ ] @.DrivingHome := true;
; a' S5 I. B' B rgManager.tryToStartTransOrder;
% S/ I- P! m$ Y: w: P. y) E if @.Destination = void
, a4 N J" u/ i then -- no transport order for vehicle @1 [4 l) M1 d, z" w' |
@.Destination :=
% w# p# P) f. i) y, r: E% N- h6 P rgManager.nearestFreeStation(@,track.~);2 |6 E5 S& ~; L# e- h
newDirection(@); ! p% R% n2 W( [# l9 n
if @.Destination /= void then' m D N& H9 {' N
@.Destination.NumReservation :=
5 Q- ^7 r( M: k* G5 } @.Destination.NumReservation + 1;
. k& F5 P' t3 a, I1 V end;
9 Z9 p( w6 n) d @.CurrIcon := "drivingHome";# b6 q, w4 n+ P! o* Z- b& k
@.DrivingHome := true;
- g. B/ |) X x5 Z end;- S" y" M! H- W) Z. ^; U( j. q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 y W# W1 s- t5 l) a' Z( B
part := @.transpOrder;( K) R5 S M- |. a1 {4 O# z: o0 F. W/ o
part.move(@);-- load part
+ B2 u- ?- K" m1 w @.CurrIcon := "load";
0 P$ W* Y- w8 _" ~. O6 w6 M& c GlobalDistObj := part.globDestination;
+ w0 h8 ~" z9 w. d* V assignLObj := rgmanager.rgAssignL;; O7 k8 \. z+ `
row := assignLObj.getRowNo(GlobalDistObj);3 M1 S" X) n# R5 C
if Row = -1 then -- since 70* [" i% @+ n; b' {& j
if lan=1 then8 B5 k7 Z$ n% w7 S5 j* a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 ]/ z- O5 v; A% C to_str("in der Andockstation: \"",?.~.name,"\""));
# @# s# u2 B! B0 n' H$ A+ c else
6 r4 G1 w2 i5 L9 v7 S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( L% x1 }/ q# @! u
to_str("in docking station: \"",?.~.name,"\"")); , N! |4 |% ^8 C/ k Y2 b* V/ i4 U
end;
1 z0 }& ~) V& n! T" e else
0 @6 v. ]- g2 H8 | @.Destination := assignLObj[1,row];; E$ \& h' ?$ q# Y/ u2 E, c2 }6 n
end;
2 {9 V: R+ p8 O3 \: s newDirection(@);5 c) D" a4 K& L# o6 K! y5 f
@.HasOrder := true;4 K1 s" H9 _& t* R8 M! y
end;
- H+ \' U1 S: l end;
D q# h S( O" {' |end; -- of the method+ a+ L' F5 o3 K0 E+ `/ k3 v
|