/* called by: entrance ctrl of the object 'track'
, o7 o+ ?& x% J! W. e* A, C+ q*/
" Q# g6 I5 |) _# m. Ois- y1 U& g9 Q! F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
g& e( M" F# @* m' v. F8 Ado0 _" F6 Q; t0 c- S% E. y4 S
Lan := rootfolder.Internal.Tools.AOLlanguage;; A2 Z8 r# L, f4 p, ]
if current = @.Destination -- else return1 l8 ?& _% u' V1 O2 V, X, F
then
9 S' c( A7 O6 A3 f2 @4 h: \% L: R @.Destination := void;
1 Z P) [& p* q2 ?$ J if @.occupied then) _0 z* y5 a* a: c5 H0 j
part := @.cont;
8 o1 a2 ?. t+ Z0 }7 r) n% p$ r @.transpOrder := void;* e/ n' n5 N9 n9 S7 S9 l ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: E( S1 ]" i5 K/ ?% w @,root.eventcontroller.simTime);6 e9 Z( k4 e5 o3 G# Q; Z& e' K
@.HasOrder := false;0 j1 B& V0 _; @" }8 \; x5 w9 F/ J
@.DrivingHome := true;
J1 R) ?2 ^+ L rgManager.tryToStartTransOrder;# I, y5 G! d$ |% L
if @.Destination = void! N& p$ A1 i# F8 L/ j9 R
then -- no transport order for vehicle @
$ |" u6 a- O. P, u7 S, n. g- F. ~ @.Destination :=% Q$ `$ w* j3 M
rgManager.nearestFreeStation(@,track.~);) Z. P' X- ~0 M, A
newDirection(@); 6 q( _1 K! }) m2 N
if @.Destination /= void then
! x( C4 b8 L' }* P @.Destination.NumReservation :=
: @6 o# R' H' x" g+ h$ i @.Destination.NumReservation + 1;
' X- x( N% d: \( k7 u# Y0 I& d; a end;
9 f' S6 p! b) K5 G- ~/ a @.CurrIcon := "drivingHome";
5 l9 a- D2 @4 t" ]/ L @.DrivingHome := true;
5 K4 B6 i5 O; o. g0 T/ Z end;
8 @! J5 D# n: w/ X- U% z' W else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 |3 O, g% }% P) p, G9 H/ b7 N part := @.transpOrder;0 u- J' N G( T
part.move(@);-- load part) M$ e) T6 v- T5 Z7 X5 ~! x- o$ _
@.CurrIcon := "load";! T8 S" e5 a4 |
GlobalDistObj := part.globDestination;
, T- W" V4 w5 f" i assignLObj := rgmanager.rgAssignL;
! W# Y$ B5 c) ]& ] row := assignLObj.getRowNo(GlobalDistObj);
& ^- |8 A( i1 q if Row = -1 then -- since 70
. B' H @# t" b* |# z, V( J if lan=1 then
2 x X' h0 x6 P* J1 a/ G) J4 b$ b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& x# m/ |7 e r" ~
to_str("in der Andockstation: \"",?.~.name,"\""));5 k5 B9 _" A- i
else
$ i i) a- Q, a$ ~0 @4 |2 N. v+ y! s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 h, W+ s: _) I, _0 ] to_str("in docking station: \"",?.~.name,"\"")); 5 `3 E: ] c+ ~0 f7 c
end;
$ g" a5 S4 M9 D* ]2 j else, ~2 I" b" D( w* R
@.Destination := assignLObj[1,row];
+ T5 t" j/ L# W2 q; M end;
5 N0 @ [2 z# Q7 d) P newDirection(@);$ A. p+ A8 Q3 k( T) b2 a6 n4 g. e
@.HasOrder := true; s+ v& J% Z0 l+ A
end;7 B1 s" M. Z* c% S' p% h" @! A( }# z; X
end;
: E9 X: S. ^' W: H; j9 gend; -- of the method
6 W) y3 X l% B1 T |