/* called by: entrance ctrl of the object 'track'6 o/ ?* U, z, E& g( t
*/
, R1 D3 _3 ]( q( f/ n- a) T8 u# Tis
; d, u( \% |- ^2 M* B$ { part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# e- ]* b4 v$ `" w$ y0 F3 C9 R# Qdo- {- l% o' G$ [
Lan := rootfolder.Internal.Tools.AOLlanguage;
& D2 F- O% R- @ if current = @.Destination -- else return5 b& s! O$ ?8 u+ o
then
% g4 e! ^/ @1 g% N" ^) [3 S. S @.Destination := void;- L; r L1 Q. v. i) |- I% F
if @.occupied then' p% k2 H1 i6 j# c! L5 f4 E
part := @.cont;9 S3 s: a; f# F4 m% G8 U7 E* F4 H
@.transpOrder := void;
% \4 a& d1 R4 g0 Q# H- x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' Y; H2 g* K3 ^" s
@,root.eventcontroller.simTime);4 H# {* c9 {& F% ~5 b
@.HasOrder := false;
# k& l( r3 } J* i! Q @.DrivingHome := true;
5 l) R* e6 ?1 G) z) \0 Q rgManager.tryToStartTransOrder;
9 [; c+ M. F, J# l if @.Destination = void
$ E2 l7 s x; c1 ]$ `% p then -- no transport order for vehicle @
- @* q/ i. R/ M* J Y; ^8 m @.Destination :=
* r4 t. s D9 b6 h% k rgManager.nearestFreeStation(@,track.~);+ C2 v; o/ W+ c
newDirection(@);
) [0 C4 f- S7 `' n& P2 a if @.Destination /= void then5 ?% J$ M w. _! j. `+ C. ^3 c
@.Destination.NumReservation :=' `: t+ |4 V2 q* S6 Q) K: i
@.Destination.NumReservation + 1;" O7 Y% m9 I V' d0 O8 ^) w; `' Z% d
end;$ H( `* j0 H X; W# i8 s& i! y8 ]4 t
@.CurrIcon := "drivingHome";/ g4 b' Z" @. j% U3 F, o5 [
@.DrivingHome := true;
. j' N( e* n: l5 t end;& N9 m+ g4 Y; E! G& @ c* x$ I# H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 i; k) Y0 ?! [4 ]( s9 R- s- ^
part := @.transpOrder;. }0 _7 m: Y! ~
part.move(@);-- load part( Z1 ?1 X) v- b7 a5 k. l
@.CurrIcon := "load";
& P/ l: p C0 d, c; _- s) I& D GlobalDistObj := part.globDestination;
" L1 v5 v3 e6 ^3 h assignLObj := rgmanager.rgAssignL;
6 r2 c- V( Z! o* t9 w4 N. W! z row := assignLObj.getRowNo(GlobalDistObj);
7 P O% e1 g( i; A0 Q if Row = -1 then -- since 70- G% u& X. h- ?# q2 W! y0 m
if lan=1 then m8 U" e2 N8 V% x6 T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 r' ~! T6 v% K3 _2 N7 {0 ~1 z
to_str("in der Andockstation: \"",?.~.name,"\""));
! Q3 o7 a' _: c else
/ e% K4 X% D* g9 b' p7 X* I* ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: B V+ t& h$ D! C
to_str("in docking station: \"",?.~.name,"\""));
* v8 t! Y1 I) z% [$ m" P end;8 y$ `' [9 e3 K9 w8 [
else' f* s) @# D) |. n8 _
@.Destination := assignLObj[1,row];; C# b9 e1 M# o6 o) h8 X
end; 0 s( x1 ?3 r+ d
newDirection(@);
) G3 J: m( c3 L; W5 ~! g; K4 }, p @.HasOrder := true;
8 Y3 @ U2 n+ {: J' h end;; m0 d! E3 `# l, z
end;
1 H' G8 i8 T2 C* hend; -- of the method _: Q' ]: J$ G1 z; l8 a1 x7 d, r
|