/* called by: entrance ctrl of the object 'track'
, w) R- E0 W% E8 V- L*/! z% M1 p% d# H' G$ v5 A
is
! ~( `$ M& q+ a v' _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 Y, c. z* |0 M9 [% T! Pdo
1 r8 N. T) g. z# H7 N Lan := rootfolder.Internal.Tools.AOLlanguage;
. k" R$ ?: u% ]3 x. t if current = @.Destination -- else return
$ z- e) W' U5 D) ~& X/ } then
' p: ^. j2 ], y- @6 g @.Destination := void;$ @, O. e& A6 n' s
if @.occupied then
: @: P; b+ F! ?) _, z part := @.cont;2 N2 X. R# K& t$ r) E
@.transpOrder := void;
5 P) F& p! Z9 }6 @7 F. Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& h/ F* A& M( Y. F: Q# q' g @,root.eventcontroller.simTime);/ T, N G7 n# b4 `; X1 e
@.HasOrder := false;' ]$ K2 g5 p6 p0 V; }7 z
@.DrivingHome := true;
$ f* H, |6 w/ H7 X1 Q rgManager.tryToStartTransOrder;
- [2 }0 |, C! I; |1 z8 ~; [ if @.Destination = void
5 t( L2 J7 \5 x, c! Z( Z+ s then -- no transport order for vehicle @
; w) M/ j# C. x" n# O q$ Y& _ @.Destination :=
# n; L, I) x* k$ \" \( D) v+ U6 q rgManager.nearestFreeStation(@,track.~);- G. i. E) @- J: m+ ~
newDirection(@);
2 E2 R' l8 E' e7 _. c0 R/ W if @.Destination /= void then
* |6 s( R) w: @0 a& t @.Destination.NumReservation :=- s% P" A" a. ~9 L
@.Destination.NumReservation + 1;
! d# ?+ B6 C. C end;3 j( E g% q; ^' d& Z# n. E
@.CurrIcon := "drivingHome";
3 f) s$ n$ A; S7 n8 f8 F @.DrivingHome := true;
% l( N3 n& b& h5 k: x- s/ O end;5 h" v; S$ M9 K _3 |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) J2 x' `) m8 A6 P9 A part := @.transpOrder;
) e; @% H3 d. Y part.move(@);-- load part f: F. P% t9 z0 T6 K# q7 l; g
@.CurrIcon := "load";) a6 y c! e% H. r
GlobalDistObj := part.globDestination;
4 V1 c1 O5 v* `! u7 Y# l) P assignLObj := rgmanager.rgAssignL;
& F/ ]3 Z/ K' J9 ~8 y7 ]& \) ]1 q row := assignLObj.getRowNo(GlobalDistObj);8 m2 \: R2 b5 k6 G
if Row = -1 then -- since 70" t$ N- @9 Y T
if lan=1 then7 `* ?8 j% ? z1 A1 G; s( i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," C2 X$ J3 b$ @9 R5 u* }
to_str("in der Andockstation: \"",?.~.name,"\""));
2 q& Q* q5 D) } p: X8 Q) X& W3 f else
; X. X, W9 ?5 f5 l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. i" N5 X1 e# m0 b% F$ P- R to_str("in docking station: \"",?.~.name,"\""));
+ ~# f; k/ ?: ~2 \- E end;
! b" b5 w9 C$ _9 R/ A else6 y2 I# r5 `- m( p3 p! @
@.Destination := assignLObj[1,row];
) n# [: Y$ f) H; d& ` end;
( @7 ^( a2 y3 V# E2 Y' ?8 i; K) x newDirection(@);9 ^- k' ]4 L- T
@.HasOrder := true;
. |+ `5 t3 Z+ \, ~. k- ]& m) c end;; m, |3 z1 m/ H2 {9 H/ x
end;
, a+ _6 T' q0 o$ m; Eend; -- of the method
1 |; H( ^! d; b x n |