/* called by: entrance ctrl of the object 'track'
1 i+ |( p( K' Y8 N0 u*/' f6 o- s0 m+ @5 ^9 `3 T
is7 m) i2 ?8 ~6 D) T4 c: g' _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 L2 H. j9 F9 [! Q" m+ O* t9 b2 C& \$ R- G
do7 B- P1 X$ g7 {( W% ~
Lan := rootfolder.Internal.Tools.AOLlanguage;
: D2 B& d* _. n8 s' u i if current = @.Destination -- else return
" V3 O% q3 Y! r. j1 X2 D1 ^ then
0 O: c4 e# _1 W8 A3 k @.Destination := void;2 `' x5 w& _1 O- o
if @.occupied then! z+ M+ f9 p- B# w
part := @.cont;
* Y- w( T2 f" @9 d) } @.transpOrder := void;
# {& b2 u6 o$ T; V3 _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% \' l) U& j1 z @,root.eventcontroller.simTime);3 W) C6 ]$ A; q) N/ A6 \/ g2 \9 W
@.HasOrder := false;
I* l3 P) B% m8 {3 m$ A& d9 p @.DrivingHome := true;8 L0 s, T. E. k" Q! ?% c( l
rgManager.tryToStartTransOrder;
8 f% q2 l) y8 l* s if @.Destination = void' d: [2 S9 E4 b+ F! C1 T
then -- no transport order for vehicle @
& R7 r7 z( Y, @6 M* Y" ^* F) w @.Destination :=$ R+ C7 a/ Z% g7 `8 z0 r
rgManager.nearestFreeStation(@,track.~);2 P4 U7 w% V! g$ Y5 b* T
newDirection(@); $ Q; Z. x0 E8 j1 F& y
if @.Destination /= void then
: x0 m( z5 N6 A; c% j @.Destination.NumReservation :=- r9 t" ?3 V+ N/ b) c
@.Destination.NumReservation + 1;% B! b1 D f& |4 u. ^& y- X
end;6 m) l; F. B) K- [ t; E
@.CurrIcon := "drivingHome";
, J' ~0 L/ y: e( j0 E; w @.DrivingHome := true;
- @0 u( v) _. X% h end;
4 k1 i0 S2 S6 _4 q6 Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 L9 m8 h- U L- B# n
part := @.transpOrder;
( Z5 x8 b; N" T; J1 f/ G8 ~ part.move(@);-- load part9 x/ }- D6 b' h' L Z2 m
@.CurrIcon := "load";
5 k) Q. u( W. C0 d! g# c GlobalDistObj := part.globDestination;
( ?% k! X2 j# a& Q, b" y( H4 e assignLObj := rgmanager.rgAssignL;- E# u* k {5 k. b$ V2 ]
row := assignLObj.getRowNo(GlobalDistObj);8 @3 ?7 T; f( t% u/ F
if Row = -1 then -- since 70
6 ^( A! Y' k" t" p+ o; D1 D if lan=1 then" d- b- p! C9 n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, l# ^) V+ `1 a6 v* C" s s
to_str("in der Andockstation: \"",?.~.name,"\""));
( l% A- t+ u' X, s4 o! T else0 x+ ? m2 y% G* ^7 e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; L6 j0 Z, z2 p4 l to_str("in docking station: \"",?.~.name,"\""));
$ K0 A4 H% @1 z" Q$ a' C% Z end;
' ]2 k. c" U$ `4 K else
* ~3 m: Q; p( P- `4 } @.Destination := assignLObj[1,row];
# J! I; w/ p# E4 n6 n1 I1 m" } end;
8 S& ?/ E. w/ y1 K newDirection(@);
# A h! y. T0 Z/ h9 `: I @.HasOrder := true;. v' a6 X( F7 p; L% d
end;. B% t, r5 C; t# L: a
end;' ?7 t. V$ g0 W, K x0 E' P, l" \7 e2 n
end; -- of the method
9 l" m% _8 z" e |