/* called by: entrance ctrl of the object 'track'
% M8 v3 J$ ^) q7 _' B0 }1 q. G*/
( b+ ` \& v! J: _6 ~is
$ c; f" Q a2 Y0 a: f. J3 `/ D part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 g$ H6 [& ?+ K' I! F. W9 g4 Qdo
: }( C8 q, U, t' Y9 ^2 C; ]' o# X Lan := rootfolder.Internal.Tools.AOLlanguage;
, x# _) Y5 W2 }; |6 A- L if current = @.Destination -- else return+ T8 c1 X: ?- Z- ?$ u; J( u) z. @# u' `
then
5 H& E1 L# \* q& k @.Destination := void;
( r! O- R( w, [& M$ g if @.occupied then
4 P8 x1 ]' U$ G! ~ part := @.cont;
7 @, S. z# t, ~ k+ c2 i3 r+ a* [; h @.transpOrder := void;1 v- h& G# {$ @- I6 Z1 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# Z: T: m, q8 w5 W* F* d
@,root.eventcontroller.simTime);
* X0 a0 L* S# ^1 ^% d& u @.HasOrder := false;( j1 M' O' W6 ^3 h
@.DrivingHome := true;1 ]: A. R: d9 X; m. G3 I
rgManager.tryToStartTransOrder;% p' w) l' X+ F# u0 a
if @.Destination = void
1 z" u8 J+ o2 j% j) d7 A then -- no transport order for vehicle @
q2 J2 s& S) O# p: c1 ` @.Destination :=
% ^$ k5 k: z- M+ b rgManager.nearestFreeStation(@,track.~);3 x- M% }2 X, E# B' S
newDirection(@); # c- {5 i1 ~! w8 ]" e
if @.Destination /= void then
9 b# O/ l0 s) U4 c }$ F: { @.Destination.NumReservation :=4 ]: J% H' u) \6 _
@.Destination.NumReservation + 1;. K0 T) d! [# V! U
end;
( | Y: \/ h( q: ~# h @.CurrIcon := "drivingHome";# J' u* J+ `/ H
@.DrivingHome := true;
; m# m* u2 B; z- P5 c7 M/ m end; t# m% c0 e8 l. i1 Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ w- l1 ?$ v ?* R* f part := @.transpOrder;( t! ~3 }5 a2 s
part.move(@);-- load part
$ A& r3 a% E3 `2 J9 x. M( d/ b/ X0 T @.CurrIcon := "load";" [. [ p* S7 b( s$ o& @2 J! e1 g
GlobalDistObj := part.globDestination;
( U4 O9 B1 i7 r7 M: Y assignLObj := rgmanager.rgAssignL;( w7 _/ p7 C! z# b& S$ b/ i
row := assignLObj.getRowNo(GlobalDistObj);2 Q3 |0 e5 g: r
if Row = -1 then -- since 70) Q& {% x6 T% T! I( g! Z+ i
if lan=1 then
5 n7 T( e0 C- G! }7 C( M2 k% i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 i. p5 n" |8 g" I to_str("in der Andockstation: \"",?.~.name,"\""));9 y, x+ i1 i% N/ G0 l
else z3 e3 A5 k3 L! @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# O' K# r. C9 P, l; [8 @
to_str("in docking station: \"",?.~.name,"\"")); . ~1 n7 z6 i# C8 U u
end;9 x) a: Q1 I W
else
a- |" u" K1 A3 b c9 B @.Destination := assignLObj[1,row];
) X$ c/ [8 R" D1 |, m' o4 J1 f' S end;
( D v5 M7 l: t& U* I5 F* T newDirection(@);
% ^1 l* x! j' R, v: a' ^- | @.HasOrder := true;
- G' x$ x) c1 ?- c0 m* J1 P end;- e* [0 y) f4 _! c* J) i
end;
4 a9 O% ]! W3 A- Xend; -- of the method+ F, ]/ ? I' `, k9 T; ]) P. F
|