/* called by: entrance ctrl of the object 'track'1 y# s1 V1 G% n" w0 G9 w$ X- L |
*/
2 I9 c1 j/ o% A i& y. u: Q- gis
. Y0 k( ]- X, M6 ~" a: P part, GlobalDistObj, assignLObj:object;row,Lan:integer;# V( E& V. v$ f; X8 I( Y4 ^
do5 d; m# A) Q/ S: Q
Lan := rootfolder.Internal.Tools.AOLlanguage; G9 |& L# w/ {
if current = @.Destination -- else return! z0 X7 H3 ]" B9 _) J
then* G8 O; b* T+ H' |
@.Destination := void;
- n. `- ?3 k$ o9 f if @.occupied then
+ T! A9 A/ d) c4 b part := @.cont;
" e* [5 v: z ^/ t1 o @.transpOrder := void;
/ A# |2 ]* @! a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 j4 @3 P% Z5 g8 G. ` @,root.eventcontroller.simTime);
) ~% q9 |* L/ e: L @.HasOrder := false;; U" u# i: l# _$ t' Y
@.DrivingHome := true;, c/ C* b9 o! h! ?
rgManager.tryToStartTransOrder;/ T% K# @% w& @$ f
if @.Destination = void3 e. Q6 c# {- Z
then -- no transport order for vehicle @! ^* n: D1 B, h1 T
@.Destination :=
: h' J6 a" z2 F- u' j! j rgManager.nearestFreeStation(@,track.~);" M1 V( v0 x% M# B" ?
newDirection(@); k7 n q1 o8 Z0 k3 s7 R5 w
if @.Destination /= void then" B W! |2 n! p. c
@.Destination.NumReservation :=1 i. Z5 e5 z6 x. j; V( N$ ?
@.Destination.NumReservation + 1;
2 l' ]7 r: D9 E3 t) k end;( X3 m* Y/ P2 c- G+ x
@.CurrIcon := "drivingHome";
& K' ?) m6 E6 J. C2 @ @.DrivingHome := true;$ }3 S( _. h8 P5 P: y. e# k" _8 K
end;
5 f, W# R6 w! n2 q; p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( `; K& b g+ ^/ z+ J' B2 X part := @.transpOrder;) {9 E/ r+ s( _6 u8 N+ h1 E
part.move(@);-- load part
7 n& j0 _, F o$ I @.CurrIcon := "load";# a& i* n+ w/ L8 |
GlobalDistObj := part.globDestination;+ _ y7 T$ O* I1 Q' s
assignLObj := rgmanager.rgAssignL;; a* c3 ^3 g$ a" S8 X
row := assignLObj.getRowNo(GlobalDistObj);* `: M; B% {% f0 _0 p/ }% m9 I( S: V
if Row = -1 then -- since 70
5 n+ T" `) u* X: ?* T, y/ M if lan=1 then
9 Y5 t; M$ M; Z& ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- F; i5 H$ p; u+ q* G$ S9 H to_str("in der Andockstation: \"",?.~.name,"\""));
: p. ~* T r% L else6 k+ C) Q; P; |0 |; b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& K4 P+ i7 Z) Z4 T. E to_str("in docking station: \"",?.~.name,"\""));
5 a1 v3 v$ m M( [* I" m) v end;
) i( {8 X- j# a: Z* }! R8 L else! i5 Y: N) H7 \
@.Destination := assignLObj[1,row];, A/ k S2 \9 y8 X4 v
end; ) O* V" _, a" y: d+ Z6 [9 u& G# P
newDirection(@);; c$ I7 O9 }& { }& U$ E( {8 v
@.HasOrder := true;* m. Z V, y9 ]) r( J5 g
end;6 j6 @' U6 K7 Z
end;
( y5 [+ ^1 |, @# { Cend; -- of the method, _6 Z6 E* E( \
|