/* called by: entrance ctrl of the object 'track'! W: n3 I& k- E3 c: q- P# ]
*/% E( l0 O' r: U1 O1 n( c
is. Q) m1 ]9 P: t+ c8 S* t4 |5 N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: O( m" p9 E. b5 _
do* V* `3 {( r; x1 ?! u( F
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 K; S) v1 I; Y& ~5 l if current = @.Destination -- else return* i R! G- e7 Y% w9 U
then4 i4 q4 b; I0 A! Q# ^: p
@.Destination := void;
, P! r* T) F, l if @.occupied then
/ H' b5 U. c N0 v1 c& {* Y part := @.cont;
6 l# J. p/ _6 T' S$ ^ i5 ` @.transpOrder := void;
+ @, t( a! \9 p* l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," k8 {! T4 R; }$ H3 y
@,root.eventcontroller.simTime);
! b3 m M$ Q( ]- q: Y' G @.HasOrder := false;! z( Z7 B& a, _: M! A3 \1 b
@.DrivingHome := true;
% o9 _5 W8 j0 \: @1 m rgManager.tryToStartTransOrder;; x' n4 h, x w4 z! B5 d
if @.Destination = void3 F% f: Z, J1 h& h" x* O; s' ` W
then -- no transport order for vehicle @# y5 h) A% q' s& h
@.Destination :=3 p3 H! |5 h% V! Z2 N
rgManager.nearestFreeStation(@,track.~);
2 o7 {3 M& O8 N+ L- _ newDirection(@);
5 d% H! z5 R( D# @- J if @.Destination /= void then
# j0 R1 J2 w/ a% t- V @.Destination.NumReservation :=+ J+ j, ]* l r. o. j/ Z/ Z4 Y: {
@.Destination.NumReservation + 1;
3 Z+ @# r$ x( C3 M end;7 {9 T8 ^ @$ t. T; Z% T
@.CurrIcon := "drivingHome";. J& `1 c7 n6 o/ p- K
@.DrivingHome := true;% J( y! O$ S+ p) c
end;
! m, W/ F% H% w2 @3 B7 L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, @. N7 z& T. y+ k% H$ e part := @.transpOrder;& j- T3 M' I7 E( s5 o1 S" x' H
part.move(@);-- load part# e, a" H% n) L1 q9 p( k! W& E5 T
@.CurrIcon := "load";
$ d( x9 C- n d3 N GlobalDistObj := part.globDestination;
/ z5 {& q) X$ {8 A* Y assignLObj := rgmanager.rgAssignL;
7 @! r6 Z8 t2 ~' E& b row := assignLObj.getRowNo(GlobalDistObj);4 T a& W6 x9 ]/ O( r2 G
if Row = -1 then -- since 70
0 ~ H5 e4 q6 D if lan=1 then3 t: m5 c# K7 u/ O1 W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) E7 ?8 I. ?* ?* L0 ?4 w& M& q
to_str("in der Andockstation: \"",?.~.name,"\""));
/ s. b# q% A- f else
6 E5 }* i6 M2 i+ q9 u3 ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# c0 w' e- n0 D0 @9 C to_str("in docking station: \"",?.~.name,"\""));
) ?) S. C; A" q9 D2 g0 [+ O( @/ v# \ ~ end;, L! I2 k, h$ L& [
else
) |* B3 T, Q8 W/ P0 z @.Destination := assignLObj[1,row];
2 {$ N6 \# C% L end;
2 ?1 B2 M0 L' |2 H; I newDirection(@);
5 p$ g V: l2 n6 Q7 y8 z+ i @.HasOrder := true;; t+ g: Y, _6 U c
end;2 j4 f6 c& a! f* l! i' a
end;1 F+ l$ _ a) D4 m( Y! Z
end; -- of the method- k+ H! j/ _3 y* v* i% x+ S. X
|