/* called by: entrance ctrl of the object 'track'. m" g% b$ B0 d; V2 ?0 J) d( W
*/. B r% B3 q* e1 [' e- Z. j$ ^
is
9 ^1 S& X/ |7 ?7 L: V I part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# v. N4 f) D+ Z% z0 S3 Edo
" ]! Y& M6 b' F' Q Lan := rootfolder.Internal.Tools.AOLlanguage;2 Z9 Q' u {9 p8 n
if current = @.Destination -- else return
H: J& A. O. Z+ J: o1 s- r6 u* J' G then4 D1 \7 e. |# i3 ?
@.Destination := void;
9 E; y, t9 H# d4 S/ X if @.occupied then5 Z9 @: Q# P( [: X, g! Z' r0 e
part := @.cont;
! w5 U0 o l3 V& V$ `1 N @.transpOrder := void;
" N" G- `/ G( h) D! S- } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 x: D! {' w0 f6 {. X+ [
@,root.eventcontroller.simTime);
, ^! r0 j8 }/ E2 M% b; E- L/ M1 y @.HasOrder := false;
m8 i! c8 [7 Z \$ u @.DrivingHome := true;; z6 {0 p. X: I- f: z9 V s
rgManager.tryToStartTransOrder;
' O- Y; o5 F) I. h if @.Destination = void
9 `* a- M0 K% A, }0 _0 p/ l then -- no transport order for vehicle @
' _4 q8 V" I6 y: ~1 H$ w @.Destination :=
% R- O& l8 S/ p rgManager.nearestFreeStation(@,track.~);
( b8 k& X: ~2 g4 S newDirection(@);
" t" r% D4 x+ e8 n$ V2 H if @.Destination /= void then- }; Y+ V( ~, n0 k7 N8 `
@.Destination.NumReservation :=& |0 C4 {% n1 X
@.Destination.NumReservation + 1;
% \- h* _6 j! y R; F0 X end;, ~- @( B6 O9 N7 `# T- {7 z
@.CurrIcon := "drivingHome";
+ ~( _( n1 A2 X( Z0 K @.DrivingHome := true;) P8 k7 d! b( c: u) z
end;* G% k i5 v2 m' k+ X0 u) \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 B8 }% } ~; @, a+ R. m
part := @.transpOrder;! A" G4 [% B$ v
part.move(@);-- load part5 M$ p3 l8 G. T5 h, w: D( z
@.CurrIcon := "load";
" L* Z( z% o# X5 N: d- a& N GlobalDistObj := part.globDestination;
/ x! | K# E! u M! M# X! y assignLObj := rgmanager.rgAssignL;
2 C, {% `4 B& [4 a. l2 g/ w* g+ D row := assignLObj.getRowNo(GlobalDistObj);6 Y5 \& {- C# B9 b( y# v/ J
if Row = -1 then -- since 70: L1 r) P% y/ j& Z
if lan=1 then' R, [5 A! N' U8 X+ m3 [- v' h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," _) S- i* g% C; m B7 n
to_str("in der Andockstation: \"",?.~.name,"\""));
1 X# ~1 J) H9 J/ C) M else
( e# [& _# i/ u/ ~) K4 G! i7 w1 r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 r& {! j: K2 a# }5 Q8 u to_str("in docking station: \"",?.~.name,"\"")); : u, y- Q7 a) \
end;6 @8 @( K# k9 a, M' u! [
else2 d! G% y+ u K1 Z
@.Destination := assignLObj[1,row];
% x* K# f' i+ {/ S- X1 c end; " u1 B& l5 {& v3 h
newDirection(@);2 X! x& M! Q G5 |
@.HasOrder := true;/ P4 P n" q4 g0 D C" v& g
end;4 T: @8 r8 e; o+ e
end;7 u9 e9 x9 Q( S; e% M% b$ c
end; -- of the method# [2 |+ g. V% r- O6 a* c7 Y
|