/* called by: entrance ctrl of the object 'track'
* }+ r, B j+ ^( A# m; P! r) i*/
' R* Q, y9 U; Z$ z& M3 Cis
! @0 I1 y1 _7 t8 ?6 ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;' f7 C, W" }3 @8 k
do; q! _6 S% z6 V8 [" c( ^
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 B3 }/ T8 I. C) B+ e7 {) s2 @ if current = @.Destination -- else return( T2 Z. M8 n& X1 ]$ e' f k) m
then8 d2 T$ M1 f) v# Z
@.Destination := void;) Z& E! H$ a1 n, a! x$ U
if @.occupied then
% J. L L w- r5 W. o6 _$ m2 v part := @.cont;4 }, V+ m! S/ Y% }: |
@.transpOrder := void;
, O. G5 ]7 d3 }# V" k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" K: h0 Q& Q) A% h @,root.eventcontroller.simTime);7 s8 o k U( o; z8 a
@.HasOrder := false;& d' P7 n) Y7 H! r/ l) s+ x
@.DrivingHome := true;
% p7 G' ?, d5 q! H8 n1 T9 x rgManager.tryToStartTransOrder;$ ^+ D5 K7 H* o: ?
if @.Destination = void# x# n0 K5 d2 F! }1 k7 `8 }0 w0 G
then -- no transport order for vehicle @, X1 T e. E" X1 C% H
@.Destination :=
9 I# H2 Q/ t0 q) Q rgManager.nearestFreeStation(@,track.~);
7 `! G& B" a4 j2 V+ a+ F# s newDirection(@); 5 C( e) y( M+ T. R: \' q' r+ y
if @.Destination /= void then
) d0 |6 {& ]( W: z @.Destination.NumReservation :=7 V/ |1 o/ ]* ^" `7 ]
@.Destination.NumReservation + 1;8 P1 I2 O' n0 ]' t5 X
end;& Y) @# L4 `1 J& H
@.CurrIcon := "drivingHome";+ T$ p, d6 N" a7 ~5 o$ y9 C
@.DrivingHome := true;
2 I% z; d7 b& C end;
3 [8 h4 f6 Y. L: N/ D) B; n3 p: Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& S9 ^2 I7 _9 ^. a% W; S part := @.transpOrder;
- U0 U4 L' `' T% n9 ~1 v5 ~ part.move(@);-- load part
* n3 u9 v% X& R4 U0 o% r @.CurrIcon := "load";
! w1 v) K1 W* E3 ~* [ GlobalDistObj := part.globDestination;
' E5 u5 S3 }0 a s% `9 R assignLObj := rgmanager.rgAssignL;
: z$ m# G) B/ e- J; C8 a3 X. U row := assignLObj.getRowNo(GlobalDistObj);
. W( }) A( d! F8 y7 Q5 X/ { if Row = -1 then -- since 706 e: N" S1 \' Y
if lan=1 then2 ^3 m4 E1 o3 q: ~& ` u; p$ T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) t( H: I. ], z9 B6 v: y7 n to_str("in der Andockstation: \"",?.~.name,"\""));- e1 P4 s6 G9 E' v! \1 a$ _
else
1 Y# `5 I S5 P! y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," L2 t/ z" I6 k* z+ L
to_str("in docking station: \"",?.~.name,"\"")); ' H8 H8 _- k9 i) V, E: P. y
end;
' m9 `) l% V2 x& _' `5 ] else# \$ X" M, B. ^: [( l; m
@.Destination := assignLObj[1,row];. i; B4 G( V# v: x+ f
end; 7 y% t3 P" B& R$ r. i# J
newDirection(@);
1 @) g" p/ L% y8 ?: r) W @.HasOrder := true;2 c2 Q3 S* @& |
end;
3 U) l, K J1 c- t+ h& C" [" O3 j end;9 x/ y, g2 a0 z' o; o& q; {
end; -- of the method7 E }, q2 f& |" R
|