/* called by: entrance ctrl of the object 'track'- A/ S3 M$ F1 e! l% R
*/
; e8 `5 H0 u) u6 u6 }, w% Q @is/ |% |5 N; J- d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 r$ G3 U2 }- H6 m; @. Odo! q* F& L. M% D8 A9 m
Lan := rootfolder.Internal.Tools.AOLlanguage;( ]' u8 S# v7 p% c, u7 c7 q
if current = @.Destination -- else return5 B7 ]: X9 d1 B, b
then
. o$ j1 [9 }- g, K @' A! { @.Destination := void;
2 Q0 q% p) R( J( I2 P' z if @.occupied then( g! U8 p5 } Q7 e
part := @.cont;9 O4 {& c) y4 @+ c9 {
@.transpOrder := void;
- ~1 @4 @$ ?+ {+ N5 @: K" z$ d! \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; X5 t' c* N& a! O2 A) d% @2 {
@,root.eventcontroller.simTime);$ r4 C5 Q' ?9 F
@.HasOrder := false;! L1 K. i) _* A' _
@.DrivingHome := true;7 P. d; H$ H( S# c8 k' G
rgManager.tryToStartTransOrder;
- q2 z8 j+ {6 C: \8 b% J if @.Destination = void% D% `% d9 I' O6 R. }1 b7 T# Y* U
then -- no transport order for vehicle @
* ~* \4 L& W. c# t* B: p @.Destination :=
9 a2 u; F' x6 ?/ o) k/ p! {; Q5 m rgManager.nearestFreeStation(@,track.~);, q- L6 w u8 t; d ?# U. I; h9 m
newDirection(@); ( H% Z6 r' t P1 |
if @.Destination /= void then( d, c$ x$ z( h
@.Destination.NumReservation :=
& ?8 J1 @3 g/ r- _( m @.Destination.NumReservation + 1;
, x1 f# H) O1 a end;
; Z' [4 |9 S+ n) E4 T& u @.CurrIcon := "drivingHome";
9 {# l0 O8 l4 h. E; } @.DrivingHome := true;
7 K+ r T! f0 ]- }/ Z" b end;' R5 G/ ^* W/ g( t+ _8 T1 |4 m; N4 G) K/ h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 a/ x! R( U! ?" P1 [- W0 J1 b part := @.transpOrder;+ H/ M* |/ P! x* U) V6 I; X
part.move(@);-- load part2 U& I! q& I ]
@.CurrIcon := "load";" _ U) E0 t# x+ T' o# h& s3 {
GlobalDistObj := part.globDestination;
9 [$ G0 R/ i: R | f" y( @ assignLObj := rgmanager.rgAssignL;4 C. f$ ~' F: p8 r
row := assignLObj.getRowNo(GlobalDistObj);
8 @; G5 f5 e* B/ K# K& M if Row = -1 then -- since 70
: A, t- I5 W* v5 b: b4 ` if lan=1 then' r* A" _) m4 z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 [/ D2 A/ |4 w$ _8 W
to_str("in der Andockstation: \"",?.~.name,"\""));1 b ~% f8 E. R
else
% ` x8 e7 ?1 b: O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% _ }! J! X. d5 S( y* O
to_str("in docking station: \"",?.~.name,"\""));
3 Q0 }8 k! Y! l& U, H! ]( I _% C end;! W/ B1 `( T1 V- ], i+ N
else7 p; t2 P$ {0 @
@.Destination := assignLObj[1,row]; w k/ M+ I& t+ d% f" B
end;
- F! p. z' U8 b) w9 B0 [; Q1 d newDirection(@);
) h$ P( w4 g5 ~6 p1 r1 Y* E' E @.HasOrder := true;/ t* f/ s" |6 `! s
end;
$ c* b |: D; J0 I- U end;
7 f2 _% v+ [/ K% J3 R8 s; Dend; -- of the method) w$ U6 j2 e" D2 d0 `
|