/* called by: entrance ctrl of the object 'track'
$ Z) {: \ `& H, `* ^: ?*/
7 ^1 r; j/ Y8 [is9 C9 J2 a- `& {- G V4 A: T) c) ~; p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& o+ O6 M. |0 X1 M2 p& C; \/ o. Y
do' L1 h' B. o; _6 E; n) p- M/ d6 b
Lan := rootfolder.Internal.Tools.AOLlanguage;
" Y2 `2 B# S' _( ]& ^' R if current = @.Destination -- else return. q/ g( C* I: O' I" @! S
then
2 `4 S5 ?- E, v. ` @.Destination := void;
. n" _9 m+ v0 E7 v3 { if @.occupied then* a! H% j% O+ o( ~1 X9 D: U6 I
part := @.cont;
+ ]( I7 K1 g, T, ] @.transpOrder := void;$ y" k- |, J+ |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- Z' o: ^6 @! g! I0 ^4 e* r' o6 P
@,root.eventcontroller.simTime);
% ~6 O5 [. I+ J* V @.HasOrder := false;5 K2 ?$ W0 i9 Q# x: Q
@.DrivingHome := true;" C# ^% z. w* h4 ]+ B
rgManager.tryToStartTransOrder; D% q4 c5 \( a! W5 R8 @
if @.Destination = void! G) j* y5 _ W, S7 W" B/ Q( v
then -- no transport order for vehicle @
9 U# [1 s& b4 n3 R @.Destination :=) l/ {; t: p4 r0 E
rgManager.nearestFreeStation(@,track.~);" u C+ [) @& m7 }" l
newDirection(@); 7 ~$ r; ~: v* q9 n, f) o1 i3 m
if @.Destination /= void then
' T; h) e& W+ U: c7 h8 p+ d @.Destination.NumReservation :=$ |& l W0 A3 l( w# q9 R. r" e
@.Destination.NumReservation + 1;
1 |* E( P! y6 b3 ~5 j$ g4 ^, ~ end;3 h. `: B8 O0 h! l, i9 O
@.CurrIcon := "drivingHome";7 D3 P" \' }; K; B" W
@.DrivingHome := true;
: \1 R( f( C# L+ F& z3 g end;
r% O+ t& Q2 G( f& z" v3 a else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 t1 e% \: K+ d9 @5 _
part := @.transpOrder;
( P3 z2 K/ W+ T part.move(@);-- load part
& l: `4 ^7 [0 d- [: J @.CurrIcon := "load";
, ], l" Z+ O8 R/ E7 W8 h3 o* H GlobalDistObj := part.globDestination;
( D$ q! U/ ~3 L* I% F. z. N2 `- O+ ` assignLObj := rgmanager.rgAssignL;
9 k' h/ C; U" r h& O. J row := assignLObj.getRowNo(GlobalDistObj);
3 K% R2 U, |( }) V( D7 Q if Row = -1 then -- since 70/ h1 m& d3 D9 P( A8 n/ J, m
if lan=1 then9 b" e6 z# ~5 @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 _6 V) V' ~( |* V# D0 _ to_str("in der Andockstation: \"",?.~.name,"\""));
( V9 d' J, Z6 T5 y) P3 k/ i* t- l else" b2 p: v' B( B5 d s8 ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 O% i3 |+ X% h1 I& I, K) T
to_str("in docking station: \"",?.~.name,"\""));
. n( U) z8 F6 h& p$ S& Q end;
. p6 ^' `% A/ U, d- ?8 P else
1 @8 H" o8 U* I7 J: K @.Destination := assignLObj[1,row];7 J0 j! E( p! r) J$ W* V6 t
end;
{8 {. X+ L+ x% ^8 w" } newDirection(@);
& v3 X5 p7 N& { @.HasOrder := true;
4 t" Z) H' _4 b) T2 [* Q end;
% X* P" v& l7 ~( b, S, [) I end;1 ]5 d x) J+ R( a
end; -- of the method
4 a1 \/ J# \, b# f! E |