/* called by: entrance ctrl of the object 'track'
5 n5 e7 e, l l*/3 _$ ?* l6 J" S; S, R
is5 { p- P0 Y$ |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& a, z4 F9 a+ G# c3 m9 {4 pdo# e- G$ F% W6 ~+ [# c; z* S' C8 g7 ?
Lan := rootfolder.Internal.Tools.AOLlanguage;
) t7 ?2 y! u) A3 g! w; `5 h$ v if current = @.Destination -- else return) X) a8 F8 z4 L1 ]4 |1 k0 h8 a
then
# j9 E% a% t5 C3 b1 T2 [ @.Destination := void;
, `/ E2 n# a; ^ k if @.occupied then, S" S' c5 [4 s6 z' S |: V
part := @.cont;
, z& F. O2 f+ p' V @.transpOrder := void;) ?4 G) Z% R& d2 |$ x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% P k! ?- ? ]5 ] o6 M
@,root.eventcontroller.simTime);
! @! ~$ R/ g a2 U6 U* Y0 E @.HasOrder := false;5 p4 t1 g& y& j
@.DrivingHome := true;
k9 m$ B- M% x& ^1 ]) _- K rgManager.tryToStartTransOrder;; j. [" `2 d" e4 B) B
if @.Destination = void$ m. T- U* G" Z$ b
then -- no transport order for vehicle @
+ ?7 s4 ]" v4 j3 t d% d3 ] @.Destination :=1 w' i& E) T/ i9 |3 ?# K0 M# d
rgManager.nearestFreeStation(@,track.~);
: u% g: \+ _. d* @) f, K newDirection(@);
* y1 @4 G; C" m G! R if @.Destination /= void then9 I' I7 X& y) d3 G; F* R
@.Destination.NumReservation :=
0 M7 y% k4 |. w0 v @.Destination.NumReservation + 1;
+ ^+ a5 A2 P+ z$ h6 s" {# g end;
9 T" j( h8 i: [& s$ X @.CurrIcon := "drivingHome";
! q, H- j: q$ g @.DrivingHome := true;% Q" a0 Z+ J, z5 R. h, o6 ^' f8 _
end;3 k& Y4 _4 u+ I( e& l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! G" Y+ |* o, F: z
part := @.transpOrder;) ?5 s6 q3 w- t
part.move(@);-- load part
& F+ Y# ^, m O4 m) y* o @.CurrIcon := "load";
& h. Y1 X3 u/ B& I8 P GlobalDistObj := part.globDestination;
( }8 C, o* i8 D/ \ assignLObj := rgmanager.rgAssignL;9 s$ v% f+ W5 D, m- k2 b2 E* v
row := assignLObj.getRowNo(GlobalDistObj);: n' F( r/ J8 [/ g4 Y& x& z, S
if Row = -1 then -- since 70, I7 ~* h/ n4 s! r
if lan=1 then% z# S2 M3 M0 p# \" c) |8 M0 \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ Y+ g6 @' G4 d: J/ w0 D" l
to_str("in der Andockstation: \"",?.~.name,"\""));
7 t% F9 r' Q; r. k9 Y% _1 v else8 _; `( n( J4 d1 J/ l1 ?: k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 t& ?2 \8 d# B& y; ?
to_str("in docking station: \"",?.~.name,"\"")); ! D+ C) n: h+ o) x" g2 L
end;& y$ m+ K5 H Z" N1 k1 z* I
else
6 X: A! e/ ]% L6 X- w& s0 k9 i! s @.Destination := assignLObj[1,row];
2 g; c3 w- v6 a4 e& i/ Q. G! b end;
) P1 o' ?, H# ^0 ~# } newDirection(@);
+ ]5 ~% k* Q$ ]+ V% B& R: @1 Q @.HasOrder := true;
+ J3 N/ b8 Y* S end;: a5 w2 L$ k- k. J/ a8 j6 M
end;# q+ p+ B$ W( C( f M( T* _
end; -- of the method- Q- O J ~+ u2 a; l% i8 `+ Y' V
|