/* called by: entrance ctrl of the object 'track'
0 U: \. i( q/ }. J+ Q2 E*/
4 X* I/ s) m. fis0 A1 f `$ Q X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 W' i7 U/ H( H/ m- N2 Rdo1 V( ]6 [* F0 A" n- ~
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 H) x# b) Q% K. g, Y* p) A* L6 S. a if current = @.Destination -- else return# }3 F' x. k6 d! ]
then
. @4 L6 T! P" [$ | m2 D4 q2 _( f @.Destination := void;& H) u7 n7 L3 K' e# r2 [2 ?; ]& {
if @.occupied then" U( g! t+ Z, t3 |* k( U/ r% A
part := @.cont;
. @8 _( o. k# ^ @.transpOrder := void;$ c8 U) T' _0 j5 m2 t2 i% Y" J; f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 g5 g, I, C( ]5 v- X
@,root.eventcontroller.simTime);" Y+ Y4 S9 Y! `; h0 }1 u+ d( X0 I
@.HasOrder := false;
' t2 H2 r% f) M+ @% j9 T6 {& V @.DrivingHome := true;
% V- N `- i B" _. v2 a, T/ ] rgManager.tryToStartTransOrder;
" r7 P% i7 v8 _, V, o. o2 P if @.Destination = void
8 p: ^, \' V! O& ?# a ]+ s% l3 W then -- no transport order for vehicle @+ Y V6 S( Y, g# D) r, b& n
@.Destination :=
5 L% Y3 F8 p1 W9 Q. { rgManager.nearestFreeStation(@,track.~);) q( X2 r) j& B- ~, L# E+ i8 ]
newDirection(@);
# c& W" c( F9 I4 ~) Q, a if @.Destination /= void then3 s% }! D* ?7 M) W. p/ q- H
@.Destination.NumReservation :=3 k9 O7 u8 ~0 |& k
@.Destination.NumReservation + 1;3 J+ |, `8 ^) l' M; H
end;: z" q, W& x9 T/ N1 O
@.CurrIcon := "drivingHome";
4 D8 t' t0 m2 Y# m& x @.DrivingHome := true;. o, A& G S: d2 _5 k# v
end;+ u4 r* F F, M! s" Z7 U4 E9 E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# A" N1 _$ Z/ _" I7 B5 ] part := @.transpOrder;
8 P1 {' A' u+ g( ?$ w part.move(@);-- load part% _% d/ ~2 r X3 i" N
@.CurrIcon := "load";- |0 Q% F0 d* Q0 G W4 Y
GlobalDistObj := part.globDestination;+ a* U' T. }7 l0 b
assignLObj := rgmanager.rgAssignL;. l- t+ Y* }# i, R4 X/ F
row := assignLObj.getRowNo(GlobalDistObj);) l- j! c7 q/ j. a9 q% y
if Row = -1 then -- since 70! D8 Q% r/ q; H+ ?( t5 N* S
if lan=1 then
+ e; @; u8 H) D6 M( i% n2 [: _ q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. }, X0 D7 R, U; R( q$ q
to_str("in der Andockstation: \"",?.~.name,"\"")); y# K% i7 L$ D E
else
# t- V0 r) p; R+ n% Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 H! G4 R L/ S
to_str("in docking station: \"",?.~.name,"\""));
7 Q7 E3 r/ B' s1 A, A% t end;9 T: `3 g( }* A( ?, K7 |$ K
else) m0 e0 u6 W4 [2 X/ v
@.Destination := assignLObj[1,row];% [7 ]4 p) q; ?4 J! H
end; % A3 h N+ x- S9 i
newDirection(@);) D4 s. A2 W0 p
@.HasOrder := true;: J" Z- l$ @; T- J
end;4 v/ i; R% D C% G
end;
1 ]0 \6 ^7 ^. A5 U$ Hend; -- of the method- l T6 X4 Z2 U0 T! {) B6 [) P
|