/* called by: entrance ctrl of the object 'track'5 i. ~" g/ j8 ]' M
*/7 |4 H( K( Q& V a% `
is
, g" u5 m* K( C part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) B% A; Q( M5 ^+ hdo
' g* j5 `9 N. j2 f+ A1 I& V Lan := rootfolder.Internal.Tools.AOLlanguage;& J" M! i# c) d9 l8 C) O
if current = @.Destination -- else return
) ]8 c& g5 w6 g; y" [ then! M& \: `# t5 k. t7 Q! O# P
@.Destination := void;
) G5 ^+ z# L" b4 a, [ if @.occupied then s G3 p' b' d k- }. b" V6 D, e
part := @.cont;
" ^; a1 J/ D. J/ F8 ~+ T5 K @.transpOrder := void;, \0 O# W$ Z" c o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 ~' c5 z* }- |. z4 `* [ @,root.eventcontroller.simTime);
8 ^. w0 X. G9 ^' l5 @ @.HasOrder := false;
. ?) Z. @) q* x# E: H( B j" ` @.DrivingHome := true;
/ z9 x* Y( R7 ^* d( F, P! z rgManager.tryToStartTransOrder;. y' M5 n8 V K2 B0 h/ w6 v
if @.Destination = void
, C! ? F" h4 v) k$ m( A then -- no transport order for vehicle @
3 m5 ^! P3 n a5 ~" ^5 g8 J @.Destination :=
6 @& {) v Y9 J4 `2 z5 T rgManager.nearestFreeStation(@,track.~);, X! g* h9 i, _6 _7 B
newDirection(@);
- q/ E" w6 u9 V4 P `" `/ q if @.Destination /= void then+ H/ ~# Q. C% F: a/ H
@.Destination.NumReservation :=& y0 P& A. ?! {) U0 J
@.Destination.NumReservation + 1;0 H7 _3 Z- j( a5 |' M u
end;
5 B4 ?4 S5 O. B @.CurrIcon := "drivingHome";
; }4 w$ D. x1 }1 V$ t7 ]8 H4 Z/ i @.DrivingHome := true;
, ^" O/ f) i6 W- s1 m; ] end;
% Z" Y# ]2 K6 R6 g# u else -- the vehicle @ is empty, both vehicle and part are in the same dock station, k! `0 {4 i" o9 `' J! l
part := @.transpOrder;
7 @2 \, @8 T$ N: T8 q part.move(@);-- load part
9 }7 c1 y( { o& L @.CurrIcon := "load";
' a: W( R1 z# c3 v: p: w GlobalDistObj := part.globDestination;+ |" N" o9 e( J
assignLObj := rgmanager.rgAssignL;
2 y0 r2 j# _# ^5 \! `4 x/ o$ @ row := assignLObj.getRowNo(GlobalDistObj);
0 D R% t0 m7 l7 v q% e if Row = -1 then -- since 70' ] d7 y- A5 r- G. R' a ^, j- B0 t
if lan=1 then
7 ~. ~, s# j) y0 G6 h/ Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ X8 H D* N% S3 \% c2 o
to_str("in der Andockstation: \"",?.~.name,"\"")); u6 z7 Z! ]' x/ |- w
else
E0 d: @7 ]) o# T9 ~- i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* h8 g: ~ z y; z/ K( t to_str("in docking station: \"",?.~.name,"\""));
* }5 o" A. \& j- d& R# P* C1 ]* A end;' ~8 g' q3 H, T
else
9 _& N% L. m& C( K$ [+ h+ z @.Destination := assignLObj[1,row];
; a+ ^% X; X2 ^. @0 |8 C, ?* F1 V end; 8 \* R6 i+ ?* ^
newDirection(@);+ v" e6 M. Y9 |7 k
@.HasOrder := true;
7 Q; R& B( L5 s4 ~ end;( T6 J& y# I) A3 S7 F; k& y
end;2 K; P2 Q& b0 a5 b" ~ {( |
end; -- of the method1 S1 q; ]" [# ]) M
|