/* called by: entrance ctrl of the object 'track'
- ^. ?9 V: `$ m( N7 G# U; ?*/3 t/ S* T, j0 i2 Z: t8 a1 D" m
is9 N7 D6 I% W5 V( F _ }/ |. c, q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 A* T5 g) L( |+ h6 wdo
# ~- D5 l9 U) r7 e2 D$ ] Lan := rootfolder.Internal.Tools.AOLlanguage;
5 z* h; C; i2 x' R if current = @.Destination -- else return! W/ k6 B% K o5 p' O
then7 i* _# j1 ]( X( L6 t
@.Destination := void;2 K2 k0 ?9 g( ?) |4 @$ e. K1 l
if @.occupied then% s, V% A+ c& U! o
part := @.cont;/ j, T- G1 C0 F
@.transpOrder := void;4 j6 ^/ i* k6 z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 m: G0 ?! H" @( C) s
@,root.eventcontroller.simTime);
8 |2 @$ S7 W J/ ^6 c @.HasOrder := false;
; P/ R: Y6 x) M0 W' K& v+ }' `+ a; g @.DrivingHome := true;
8 }6 C- v7 l* ?7 g$ o rgManager.tryToStartTransOrder;7 o; ]1 r" k# q: J {1 G# b/ N
if @.Destination = void
0 K4 _+ m2 R- I then -- no transport order for vehicle @% h- A2 @# [; e4 n8 n% t% z- e
@.Destination := E+ B& B5 U7 g
rgManager.nearestFreeStation(@,track.~);1 S/ T. V& j( w
newDirection(@);
, X9 A/ s+ p$ F1 t z5 ^ if @.Destination /= void then
( j# v9 x, ?5 B @.Destination.NumReservation :=+ ^( `/ Z; G$ d* v
@.Destination.NumReservation + 1;
8 f( ^8 N6 }, i2 g; V end;+ Y+ [; j+ ] N; @" T) F" e
@.CurrIcon := "drivingHome";
$ j$ x$ c+ s8 ?( ~" K1 g @.DrivingHome := true;
8 g, S! L9 d0 Z2 v3 Q4 K end;
8 P1 ~( N) @: F9 @! a3 G else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 C: g2 f3 [. ?
part := @.transpOrder;0 q( B& G" _3 Y9 o0 |6 \
part.move(@);-- load part
6 w. I: N1 f: Z. r @.CurrIcon := "load";% E0 P' N1 K" ~: J, H
GlobalDistObj := part.globDestination;* z @4 S' Y5 S5 S6 N A) \* s
assignLObj := rgmanager.rgAssignL;
7 Q/ k* y L" q5 J row := assignLObj.getRowNo(GlobalDistObj);3 f+ w2 m) G( h! m- l" @4 V. n
if Row = -1 then -- since 70
' A4 E8 d$ x7 g& d1 s; U if lan=1 then4 b% {9 v/ B \* D9 T, T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! b2 _5 I# E4 P5 H( l
to_str("in der Andockstation: \"",?.~.name,"\""));/ V. R4 w$ \3 Y8 F6 w3 ~4 e
else! E$ p4 y* G3 i7 @* }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 M1 V; C& n' L* I1 |8 \% m1 o
to_str("in docking station: \"",?.~.name,"\""));
, ? o# G( P$ x( M9 B, X end;
# I' V1 V% n H3 n; h# E: ^( \ else/ e6 R7 D" n5 M2 h2 M6 s! C
@.Destination := assignLObj[1,row];
8 U( G; D* j( ~ end;
3 P& T/ W( I# x& X* ]: l5 j8 w E! T newDirection(@);' g' e, a+ I/ a" D) g# X
@.HasOrder := true;
4 I5 m5 B$ y5 ]1 [) S( i7 j* e end;
* `3 _# m2 E0 o4 b end;
) J1 }; F$ z0 f- k7 U2 jend; -- of the method
: D" w7 I/ |- d: B1 F |