/* called by: entrance ctrl of the object 'track'
) i5 M' n% w1 S' i' z7 i*/
0 d$ u! a, E+ s1 C. tis2 D$ w2 u0 `/ J# w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ o, W& U$ R$ H$ ]2 h" q$ x0 _
do
) _( w5 d6 l& v# [ Lan := rootfolder.Internal.Tools.AOLlanguage;
$ X6 i1 v; t! w if current = @.Destination -- else return
; N# j. z/ b# | D7 p then
* c& Q* \6 `6 a! q$ y' [/ y6 o @.Destination := void;. ~6 W- Y, G8 r) I+ V, o
if @.occupied then& y6 ]' L) w9 N2 m. s( K; w2 p
part := @.cont;
* b$ A/ w& ?* l( C' B5 H$ l0 \ @.transpOrder := void;# T- N) ~- M* m4 r9 r7 n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 s; I' A, L; n; R1 y
@,root.eventcontroller.simTime);
% P$ w2 l: [' e& n ^7 F: [' l @.HasOrder := false;
5 U" O8 {1 N* x# W @.DrivingHome := true;) m! ^& P7 X$ x" s I* P) F
rgManager.tryToStartTransOrder;$ C8 J% ?: R! j, {
if @.Destination = void0 a4 l( g% X+ }* W
then -- no transport order for vehicle @3 Q3 Z. b% E n" P) x4 }
@.Destination :=
/ R( j$ @% U5 s+ ]( n6 N rgManager.nearestFreeStation(@,track.~);
1 P. U$ a2 G( E7 M, y newDirection(@);
' k" M! h/ G2 F+ u3 }# ?- W if @.Destination /= void then
4 P3 I% p9 Y/ O# | @.Destination.NumReservation :=
& W. R- j3 s& b: x @.Destination.NumReservation + 1;
0 [- G7 j4 T8 n: T* l) V end;: C9 [, g, B, X& i
@.CurrIcon := "drivingHome";9 @- c$ r( t6 E% s/ R: w1 Y' T
@.DrivingHome := true;
/ [" G% u' D2 `5 W% | end;- E! G7 W0 F2 l% h' Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 D/ p8 ^0 [; C
part := @.transpOrder;7 I; R2 k( P& q
part.move(@);-- load part5 K( X5 B/ z( }$ b# V/ Y
@.CurrIcon := "load";& x( [ g8 P5 e; H* }8 \/ I
GlobalDistObj := part.globDestination;; m* C" L( @: T. F; r: |; q3 f0 T
assignLObj := rgmanager.rgAssignL;
, f9 b0 I& `& q" w' C row := assignLObj.getRowNo(GlobalDistObj);, [, B) o- A4 p) V2 v
if Row = -1 then -- since 70
5 I$ V0 o& l/ S% t: ? if lan=1 then7 | o9 w4 B5 h- T5 w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* h8 d3 H9 M; M7 u9 ^" e to_str("in der Andockstation: \"",?.~.name,"\""));
8 k# ?. V) X! |% S" v! n else
$ Q0 {9 s8 v- k3 s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% |6 D2 m! x3 Z# g X
to_str("in docking station: \"",?.~.name,"\""));
5 o* T. G% a. R0 D2 P5 Q) B9 k end;
2 [* ^3 W+ I$ h else9 m1 N% A, u: Y7 J
@.Destination := assignLObj[1,row];
, { u' [2 t# K Y end;
8 Y6 b$ |4 j5 K. v, m newDirection(@);/ v9 w k& F8 d1 }' F
@.HasOrder := true;
5 ~7 q1 J: f: A- n4 v# c! g end;2 n0 @" b! }3 N$ T$ \. v
end;4 ^5 k3 U3 I2 u
end; -- of the method, `) w7 F. e. T- [6 y
|