/* called by: entrance ctrl of the object 'track'6 r- |# }3 d# [+ @- _
*/. `/ v' R* G# O
is
3 {9 e, w& h. _7 d% C1 @" u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( v2 J* ], N: @% b# N \do$ g) r7 I$ ~3 c
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 {: C8 ] u% L& O if current = @.Destination -- else return% F/ m$ o1 u/ Y# k- P" [/ i
then
6 X% h" z1 Z1 H) w' ? @.Destination := void;" \- B- S8 I' N" r9 P
if @.occupied then) d% i0 ^$ a) t# T- d$ _
part := @.cont;
) W* f* V6 V; V# G1 s/ j! ` e @.transpOrder := void;- W9 P/ y7 t! Q2 n8 [0 ]7 J7 N" N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 |9 z v$ Y6 ~ @,root.eventcontroller.simTime);
# h/ h. q+ u+ b) \. i- V( H% { @.HasOrder := false;) O6 `+ }5 v) Z( ~$ H
@.DrivingHome := true;
3 \) V+ Z/ p5 \% l& U rgManager.tryToStartTransOrder;+ B: `; p9 \1 S, Z0 e7 `( P2 S* U- i
if @.Destination = void/ j* `9 u" ^! V2 e: J% W3 p7 T
then -- no transport order for vehicle @
7 u& B ^) V4 W% j( U @.Destination :=
4 x% k9 M6 L Q% u/ P rgManager.nearestFreeStation(@,track.~);
. o1 E3 Q6 J2 e4 z! U3 G% O newDirection(@);
% R- Z; \5 Y ^. W if @.Destination /= void then
3 p! F4 }9 E" H* X; Q @.Destination.NumReservation :=4 U4 h( W5 g4 a B! `* O7 p$ [: @
@.Destination.NumReservation + 1;
2 _4 t1 o A& l3 s end;
1 q1 e7 Y- U- F' k( b& a7 K @.CurrIcon := "drivingHome";
1 u2 v( J" J2 [& E1 c3 g$ | @.DrivingHome := true;
- x# f% d/ |2 J3 |% J end;6 |- t5 y% N7 Z1 o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 o% d* e* y t$ w1 ^% Q' R
part := @.transpOrder;
) P* _4 H# |$ q: b1 u part.move(@);-- load part" `" g2 f1 ~1 E" {/ }$ o4 V* _' `, |; [
@.CurrIcon := "load";
2 g, } R8 C7 y+ I" Q* } GlobalDistObj := part.globDestination;/ [, H. J" g* E
assignLObj := rgmanager.rgAssignL;+ J K' }$ v6 a7 Q5 k" C( \! y- M$ j
row := assignLObj.getRowNo(GlobalDistObj);0 a6 l. n" D7 t8 G. e1 L
if Row = -1 then -- since 704 l. f( _2 A& R% b e
if lan=1 then
0 ^, N$ z$ v7 O% S9 r0 B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 G. u' c4 F* Q- J to_str("in der Andockstation: \"",?.~.name,"\""));$ o' J: i3 q( u9 J. ^) w$ n
else6 C, K1 p! K1 u- l% S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 b$ j! R& h0 S4 s9 S7 `% _- U8 j
to_str("in docking station: \"",?.~.name,"\""));
' q7 P) v3 O5 \; f, s end;
) B9 x/ v% F7 i else/ S, z0 h. q! d. j) Y- L) J* v
@.Destination := assignLObj[1,row];9 h+ x( W2 ~3 r
end; # f# r! o4 Z5 h2 E6 t
newDirection(@);
! d5 j' r4 o/ U) G7 y: k @.HasOrder := true;
9 L* W7 \9 E+ C end;! G& k7 K* R0 r) g
end;
# J+ H9 r9 K! P" s- a9 Jend; -- of the method
4 t/ l# N/ Q( | v( Y |