/* called by: entrance ctrl of the object 'track'5 \5 }' G7 V- B% Y; l' P$ g1 m
*/' U) z$ x7 Z, r
is0 T4 p8 D9 {( I- O: Q3 B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' f) u1 H: s$ Q% K2 p3 h$ j
do$ `; @; B$ L8 a/ c$ J- B7 u
Lan := rootfolder.Internal.Tools.AOLlanguage;
% {2 F/ k7 p, i2 a* X- a; I if current = @.Destination -- else return
0 ]2 K& d/ B1 [+ ]# z) c2 B then
" O3 F! c( [6 }/ A/ E @.Destination := void;: E2 k3 F0 q) g8 d9 s3 d9 r& T
if @.occupied then
3 K0 o. B2 B6 f, Y, y$ b part := @.cont;
; f3 e" p+ m' G' r/ z' a5 e @.transpOrder := void;0 [ _- H& A# M) P, V" d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 ]( c+ A/ o9 h J* h8 p
@,root.eventcontroller.simTime);
( j% _$ c* h/ C$ V z, s @.HasOrder := false;
4 p4 b& S, a% ]% u) W @.DrivingHome := true;% \8 Z O4 y+ Q
rgManager.tryToStartTransOrder;
6 Y4 T% c B# x- g, W" K0 n if @.Destination = void- D) e) b( Y' e4 a6 T }
then -- no transport order for vehicle @2 a. J8 y; @5 ~
@.Destination :=
" ] S, t. K" P# w9 D: | rgManager.nearestFreeStation(@,track.~);
5 ~; G, Y7 b( i' |0 ] newDirection(@);
% N1 \4 g& H% _' j- D if @.Destination /= void then. h7 K* i/ K/ _1 v& ]( l! T
@.Destination.NumReservation :=
9 {" m3 x; I1 m4 y5 J4 ^( ] @.Destination.NumReservation + 1;8 f2 {) f% N8 ]% e. V3 U
end;" \4 C6 X+ a; W& I
@.CurrIcon := "drivingHome";
+ f8 h+ u g1 Y/ P# _ @.DrivingHome := true;
/ I7 a" y8 C' N6 u) m end;
0 E: N7 p, _1 e2 q+ S- ]# N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 v/ }* m. o$ j& K) c part := @.transpOrder;
* E7 |8 H F8 Z( [0 t- q part.move(@);-- load part
' Q. q( a T& o! I, p @.CurrIcon := "load";; W. c5 I6 u! r
GlobalDistObj := part.globDestination;
* `+ s' q9 Q; a$ ]5 o% _ assignLObj := rgmanager.rgAssignL;) w# j- n- s: y' M% T- W1 q
row := assignLObj.getRowNo(GlobalDistObj);
0 p* d& T5 _' T6 _" [4 j8 o if Row = -1 then -- since 70
$ r: K" m1 K- d7 T {( p if lan=1 then% r1 e$ J' g0 u: ?. r9 o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! ]& `1 ` k- N. D% a
to_str("in der Andockstation: \"",?.~.name,"\""));! b# M* ?7 F4 \$ ]( Y" [ F; J
else
/ P1 z' a8 \; z- t" a5 J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), t( z! y3 A6 J$ u
to_str("in docking station: \"",?.~.name,"\"")); ( \& m8 _& h1 Q+ g4 q* r S8 @4 |
end;
( F9 O! L$ V* P8 I4 O: z else' w2 o1 ~+ v0 k- X/ H1 E0 U U$ s. r
@.Destination := assignLObj[1,row];7 ~; @( b9 }2 Y! l) `: z
end; % C' f7 s( x3 ]( G0 u1 z/ T3 c3 N
newDirection(@);
/ Z! E: B, y9 F! e @.HasOrder := true;
# W+ ^9 z+ ^; v/ M" F5 b; p end;
9 n0 n4 t% c! \- j# y end;
2 V; u; S1 P0 D" W# Vend; -- of the method r2 V5 W: \3 z7 X( K
|