/* called by: entrance ctrl of the object 'track'4 z. }7 {( R3 k6 Y" I1 U t" h
*/
# i' n9 l0 c5 Dis
: n0 a6 p+ d4 q* p( ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 q2 p( C) K o
do+ Q: u; Y' L* ~. C# ]* N
Lan := rootfolder.Internal.Tools.AOLlanguage;; U- a5 g: B% ~1 {5 e
if current = @.Destination -- else return9 ?" `3 L s3 n
then! U! B( _2 R/ j
@.Destination := void;3 a5 u0 G- q/ M$ g' `" B6 v, x; F7 u
if @.occupied then
$ |) O! u" @( l4 x part := @.cont;
% j4 ~- t }# ^) Q. z @.transpOrder := void;8 H' D3 q$ `9 y, T# p) G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 P, G1 F3 C* J# [, p* ^
@,root.eventcontroller.simTime);) P4 `+ O: M+ v. I& R8 k
@.HasOrder := false;: U4 y. S. U. t- T' ^
@.DrivingHome := true;. ^' [* m0 b1 O# Z+ }
rgManager.tryToStartTransOrder;
' @. J1 H+ F6 v1 p0 v if @.Destination = void0 {2 X/ m' M; g/ v0 C
then -- no transport order for vehicle @
" Q+ v3 i: ?- R) i @.Destination :=: h! }7 N" }3 [/ G: d! x# _2 J
rgManager.nearestFreeStation(@,track.~);
4 u! z$ d% D, g newDirection(@); / Z% ~! E3 V& N, D* Q& w
if @.Destination /= void then
3 n9 t+ S/ x$ R* Y/ O' B @.Destination.NumReservation :=8 I6 A& D; j/ d$ S2 S! F) J" \
@.Destination.NumReservation + 1;
1 p8 M- z% v' |2 f) }" G# ]) _9 y end;
* n, K1 x6 ?2 f7 Y( ?/ Q @.CurrIcon := "drivingHome";# G, C2 Q" e/ k0 ^" t$ F8 @, A
@.DrivingHome := true; A" \0 l7 I1 q: n: g& r
end;1 q- ?5 R$ n8 N. ~' ?3 A1 n. h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, ~/ P, r, ~1 ?$ Q* j
part := @.transpOrder;3 Y, G: i+ @# B1 U$ w0 B& {
part.move(@);-- load part2 E' T$ W- [' O# u% m' p6 a
@.CurrIcon := "load";
1 y% q) |7 x: {0 e. ~5 _" d: {- \ GlobalDistObj := part.globDestination;
" m {% D/ c% h; L assignLObj := rgmanager.rgAssignL;9 H9 M3 k8 @6 P5 k) ^7 a
row := assignLObj.getRowNo(GlobalDistObj);
9 F% b+ H8 m4 r" B4 _; {) L0 b if Row = -1 then -- since 70' g X& t# L" S! Y
if lan=1 then3 e7 O" F+ q! f- _- I% o% n" r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 A& R4 V! |: X- V0 e7 l2 p% K4 W. D- M
to_str("in der Andockstation: \"",?.~.name,"\""));
4 } B+ A( r5 p( ? else
$ }- I- m- t: u" _; R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ Y* b( D6 r% Q7 l+ L
to_str("in docking station: \"",?.~.name,"\""));
* ?) f; Q2 V/ _ w+ R9 o3 K! Q end;
6 G+ o& Y: K9 }9 ] else
R6 w" f/ ]. f @.Destination := assignLObj[1,row];0 D; G) [. }: k9 O
end;
8 ~# k. C" B) m: H newDirection(@);
& B0 v/ t" ?! s- G4 n1 n3 G @.HasOrder := true;
* \$ [ m* r3 y" g0 T1 Z end;1 W# p2 e5 W$ O6 Q) |& ~
end;$ {; |) ~# W2 \# p2 O
end; -- of the method2 d5 o' c" v4 G. M6 j! N
|