/* called by: entrance ctrl of the object 'track'
% g) }- _- v+ X1 |$ r R. l, W% `*/
O9 o0 A# h5 n+ F! U3 Jis
; N# V9 H1 Y( A% g& e4 p part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% M5 S# [8 N8 m& l( edo* {! r2 ?$ U% B# Z) I
Lan := rootfolder.Internal.Tools.AOLlanguage;( o- u: U: D( ^
if current = @.Destination -- else return
C: k" q' e) G& _% i9 i# V! H0 N then' K8 ~/ _3 u8 S
@.Destination := void;1 A4 a% h' e9 X- o
if @.occupied then
* x: l2 ?7 t; q4 \ part := @.cont;
& I- W9 t& }3 s2 Q( W: W1 v @.transpOrder := void;( Q* U+ u' w0 v7 y9 |+ ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ D* u' f% c: ]9 V9 s% p @,root.eventcontroller.simTime);1 I& j4 S/ S5 o) {2 R( o
@.HasOrder := false;
8 E3 \7 k O6 I H% g* k3 P7 r @.DrivingHome := true;
8 H) A9 g; e- d7 R" l8 ] rgManager.tryToStartTransOrder;" ?2 l' J" v/ E) ^
if @.Destination = void
+ c. S7 S. t6 b8 |, J! P+ R% | then -- no transport order for vehicle @; _+ P3 n) F d0 s
@.Destination :=
4 u! P: R+ H# p' C rgManager.nearestFreeStation(@,track.~);
% d: j" K$ Z3 l) r newDirection(@);
' O' Y. }: k# y+ ~6 x; K if @.Destination /= void then7 a8 k5 X$ [4 \0 ~5 C
@.Destination.NumReservation :=+ N" e7 o, _: ]/ D
@.Destination.NumReservation + 1;) B- x9 r- n9 `8 v# a0 s
end;+ u6 r3 f3 g( L; A5 b
@.CurrIcon := "drivingHome";
2 o+ T: \6 S5 l @.DrivingHome := true;
: q! L$ a6 a) I" Z" N end;* n6 C' l) k/ m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' {! n5 u5 L- F( ]7 J$ {) M+ _ part := @.transpOrder;
5 H4 ~$ i" m' K$ o R i" u part.move(@);-- load part7 O1 f! C9 p6 g A7 X6 h
@.CurrIcon := "load";4 |+ p' o2 g' R& ]
GlobalDistObj := part.globDestination;2 _8 k7 f0 m! e- E7 V, ~
assignLObj := rgmanager.rgAssignL;% E% i) k/ W0 G* I! [, ~
row := assignLObj.getRowNo(GlobalDistObj);
# D$ ]% Y' p: h if Row = -1 then -- since 700 e9 @$ c* x* V' w2 E+ I) o
if lan=1 then% [5 H! }5 w- s, Y- A. w& f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), _( u& k, x, [8 M1 a4 Z
to_str("in der Andockstation: \"",?.~.name,"\""));
! N# _' `' S2 I, r else
0 x- F4 M! Y8 f( f+ a3 S2 a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 [, p* T1 Z5 A' U to_str("in docking station: \"",?.~.name,"\""));
. r/ G0 _/ K2 r, F( V$ V end;- G. f1 ~% z6 `* v" K. |
else
2 K* |. k# @0 |% ~7 o' y- G @.Destination := assignLObj[1,row];
$ ` z9 Y9 O k: r9 ~: Z end; 7 b3 z* T: G3 @* F8 f8 }1 t
newDirection(@);" t# s+ V: J( \' ^+ u6 N l( Q
@.HasOrder := true;. ?6 X$ m5 c' t. ^# ^. a+ f
end;
! u/ |# B2 u j( L end;8 U& O' s) H( w2 l6 Z* U( X0 B
end; -- of the method
3 s: b# T$ U3 Q1 V: |* w! z |