/* called by: entrance ctrl of the object 'track'
8 J% F/ X8 ]- } z) k$ N; J3 w: v*/
h& n. i- [. a: Nis
& }# n0 r$ h0 [. M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- C. D+ a% t! M# _' c, jdo
1 a3 ^5 M. R B- g5 |- }( K Lan := rootfolder.Internal.Tools.AOLlanguage;
. K5 d; D* j2 @! `4 s if current = @.Destination -- else return
5 T8 T1 H9 R1 Q4 {8 F0 N+ R then6 ?7 z8 F' P& f* t1 H! N
@.Destination := void;
# f6 V+ k1 X! k0 @& b$ A5 t if @.occupied then
[- r; P* P f$ |; z1 s part := @.cont;' I$ D) @" q2 p$ a3 A, G
@.transpOrder := void;
2 q& s; T$ u% O5 f. X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 L: s, e% q5 |
@,root.eventcontroller.simTime);
; `* x& H1 o ?$ ^+ l @.HasOrder := false;. b4 l8 c d' u% C
@.DrivingHome := true;" w1 q/ q4 K/ F3 x
rgManager.tryToStartTransOrder;5 v) S% m1 P6 c: R
if @.Destination = void! w0 D# k$ _1 b- d" L% [
then -- no transport order for vehicle @
1 U/ Q* c, m# D @.Destination :=
9 m! z6 v- H5 C% e/ V# C7 ?: q; f rgManager.nearestFreeStation(@,track.~);
' b& ]0 z+ \3 u9 | newDirection(@); : U+ z0 X& \* ]: z+ I6 b
if @.Destination /= void then
4 y8 ?( J- o6 P2 h- z. X @.Destination.NumReservation :=
% k0 T" B# {2 {5 ~" g1 l: \ @.Destination.NumReservation + 1;9 Z; z& `" G4 C
end;, \& v7 W/ k) \2 D
@.CurrIcon := "drivingHome";
% `1 v* V R5 u$ f3 j4 o- @ @.DrivingHome := true;
+ {- L" T2 Z; V* D8 J' u3 j7 C end;
u9 b( W; R% m& | else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 R2 f" X2 i3 ~2 i
part := @.transpOrder;
@- m8 O0 g f k part.move(@);-- load part
* w4 {6 L: S# R! Y2 Z. s @.CurrIcon := "load";
7 [ D% e4 Z+ G; n! P GlobalDistObj := part.globDestination;
& T% Z0 v. O$ O+ i' D assignLObj := rgmanager.rgAssignL;
: \9 y- I" s2 y" x1 z1 B row := assignLObj.getRowNo(GlobalDistObj);) T9 Q7 ]0 F# X0 K ]4 l& a
if Row = -1 then -- since 70
2 q, n7 z# B8 J, H: h3 C if lan=1 then6 X. a% D+ D5 T2 D& U* ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: Y- ?) F6 [8 O7 S# R% h/ k
to_str("in der Andockstation: \"",?.~.name,"\""));% F' _( x5 a! s) |4 A6 |
else. @% y: V$ Y/ y% S8 P4 g4 J/ D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 t' O. i, h& |: r1 w5 H6 p* z. b
to_str("in docking station: \"",?.~.name,"\""));
4 P2 k/ w l$ K6 A& X2 W# m) Y end;6 t/ D) `$ `7 i& M7 h1 w! [+ S0 U
else
2 B6 M, t* f. L& M% |/ B @.Destination := assignLObj[1,row];, a E5 |+ N2 u1 v
end; 3 ]$ n. |. m% p+ P( X* r! G4 D/ T
newDirection(@);
* a) r! ^3 r9 w+ q @.HasOrder := true;
& D: Y. h/ F! u4 V end;
' m" O: S5 S; r9 L% B6 r end;
5 k$ ]# E, X2 H9 v$ L! U1 uend; -- of the method2 O6 r/ B/ n& U! I% }0 s. y. }- {
|