/* called by: entrance ctrl of the object 'track'
( Z- z) i9 v7 f*/5 C- X' j, V" f! V
is
( X7 ^( }) R" @/ ?9 w! Z, S# y; | part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 q' \9 l1 ~8 `
do
9 \$ Y0 t; [& j' v$ r' J Lan := rootfolder.Internal.Tools.AOLlanguage;+ g5 S9 z7 \, O/ l5 Q! G" [* a
if current = @.Destination -- else return. L5 i" O" t) i" [( q. x
then
9 [0 m, ]4 O5 \& n, }; S @.Destination := void;
1 r( o! u# q5 n" p4 l if @.occupied then# }9 _! {' B) w) s0 v6 V n7 t" C
part := @.cont;5 I1 @: s4 s. ^
@.transpOrder := void;* m* e, S' E- @" |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 _/ B- J) g( n5 s) [. }6 q @,root.eventcontroller.simTime);* R- `, t* j, K
@.HasOrder := false;
' F3 z5 c* p m B+ s @.DrivingHome := true;# U0 ?) O+ |& R( K
rgManager.tryToStartTransOrder;4 D7 P Q1 b5 e) E# b* H
if @.Destination = void( M$ g7 o8 q1 r. i9 U
then -- no transport order for vehicle @
2 ?& n" P! P5 j3 l+ q- N @.Destination :=8 C3 @# e6 x9 X: M3 q: I
rgManager.nearestFreeStation(@,track.~);6 t! x2 O/ C& f
newDirection(@);
4 _0 x3 `; c7 n if @.Destination /= void then
4 i* n3 b! O }* y" \; h @.Destination.NumReservation :=
4 w% K$ v; ~) r8 s. s! T @.Destination.NumReservation + 1;
$ X( w9 t& C2 k end; |5 W: u8 l, f2 E3 `' k
@.CurrIcon := "drivingHome";" s, h y5 q# _. d! x
@.DrivingHome := true;
& X& s4 S i$ K, a9 z* y' z end;/ b% H: Q) j- `0 i' ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 ]- g( z( [% h2 U' ^
part := @.transpOrder;
, C4 h# g! r* S8 q% R+ D# S part.move(@);-- load part
! n' T! M& b( z2 a/ j @.CurrIcon := "load";
0 X. ?3 k2 Z) g( N) n, p GlobalDistObj := part.globDestination; t9 w- B+ X2 G, `0 d
assignLObj := rgmanager.rgAssignL;8 v# I3 B4 v( c8 \* \7 R! Z" H" R' o
row := assignLObj.getRowNo(GlobalDistObj);2 }: ]! r: H# ~7 N$ ~3 f
if Row = -1 then -- since 70
' R/ Y0 ~/ Y$ f1 W! Z; L7 k8 j if lan=1 then
. g1 H ?7 d' B/ ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: G& t" a3 ~, t* K' A2 Q to_str("in der Andockstation: \"",?.~.name,"\""));' t, _1 \# e+ R8 m: o( d- m# q
else
* m6 T4 j( f& D T- l, F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 k/ D# P# h! I- j! m. m
to_str("in docking station: \"",?.~.name,"\""));
, E9 E# G3 [- j- ~4 `$ k' u" Q end;
3 ~" Z+ i4 F8 F% Q# x else
% Q# s. E2 E- U* |, P @.Destination := assignLObj[1,row];
% _5 R1 k7 U: k end; 0 e- a" Q7 L2 \4 g( b
newDirection(@);
/ T) |' G/ ]) w, d- T: @ @.HasOrder := true;
, n( r, a2 x" Q' g8 }8 O9 G+ \ end;; s) ^! l3 X" K! w
end; b9 J M0 X7 v; `; y. E, m
end; -- of the method2 e* f9 a6 b. j, q. R; n1 L
|