/* called by: entrance ctrl of the object 'track'( u& t4 Z7 ^8 X' F# b
*/
3 X5 u& c" N7 T ]+ s# W ris: [+ m. X# v3 d1 k. s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 p5 b# Q6 q1 O9 E! Xdo9 K6 M' _ F9 ~5 l
Lan := rootfolder.Internal.Tools.AOLlanguage;' T4 i4 Q- e, [# ]# u' [0 n1 a
if current = @.Destination -- else return
# h1 |) }7 \; {9 j6 u1 G then" b+ a, N3 c+ ~
@.Destination := void;
2 }: K/ y6 Y- E) {6 g if @.occupied then" s9 Y" m. M8 ^0 L/ k
part := @.cont; m* V, u1 e$ u2 ]7 s
@.transpOrder := void;
8 ]) m) r- l" S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ ^: r( b+ ?: G1 x+ f. G$ u1 L @,root.eventcontroller.simTime);
9 r: O# b9 L6 J5 H8 i5 z @.HasOrder := false;
5 J0 Y# a N# C/ C7 r9 Y2 S0 f @.DrivingHome := true;* \' _# F5 y# F4 c
rgManager.tryToStartTransOrder;2 t. |1 ~. l$ I% Y0 [: A+ q
if @.Destination = void
% C$ k' o# e% K3 g' W# C then -- no transport order for vehicle @( }. R2 p z/ T( B6 Y# s
@.Destination :=3 p7 i( W5 u0 v$ u. p* B
rgManager.nearestFreeStation(@,track.~);
! d! B* u8 m. x) i2 x+ c$ ^& v newDirection(@); ! G9 s! ^! Q3 i" w- v
if @.Destination /= void then$ `0 o8 {- k g: C
@.Destination.NumReservation :=) e5 E* g7 Z+ j( L* |. j4 T
@.Destination.NumReservation + 1;
) [+ e9 j. @) }9 t) E end;
9 e1 b( h& [3 x' f/ s1 [6 { @.CurrIcon := "drivingHome";( C E) }3 W; ?& |5 v9 p
@.DrivingHome := true;2 i) d8 u2 M* c: e
end;
) P+ f5 ^% T/ s) e( w( Y5 O6 p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; v1 {) A/ t# H( R3 L part := @.transpOrder;
& N! z Y. \. V6 |4 d part.move(@);-- load part
6 c+ \/ r6 f4 I, l6 a5 h l& Q @.CurrIcon := "load";
- \. ]. w/ M6 [3 J( S. q7 C GlobalDistObj := part.globDestination;1 |- N7 R, @, s7 M4 t
assignLObj := rgmanager.rgAssignL;9 v: g/ b+ V& \$ ^) k
row := assignLObj.getRowNo(GlobalDistObj);1 ?3 ` I, W* g% T+ z) M4 x) Q
if Row = -1 then -- since 701 G+ y3 D- B* B& H5 k* D
if lan=1 then$ I# g2 T1 D" l! r0 e: r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 s: t3 T. l" x; c; T
to_str("in der Andockstation: \"",?.~.name,"\""));3 L( p8 \/ q* n7 |
else
9 L( Z% x9 X( |# C+ t. a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 A5 p8 a- p- q E4 L to_str("in docking station: \"",?.~.name,"\""));
8 u2 X4 k7 J$ E; ^; A end;2 E( t( N; z& ^) E
else
& d4 [1 m+ u8 v+ p4 H( Y/ d3 m @.Destination := assignLObj[1,row];) U; D7 J; E% b1 R# ]: s
end;
1 t8 l' |( J# H+ A2 l newDirection(@);
s* o4 X7 H4 t/ S3 T2 b$ P @.HasOrder := true;
) S7 P C( j, | end;
$ U _3 Q$ J5 _ end;) W' c& s. w, W5 S
end; -- of the method) n6 a4 R( L0 u" K2 E! S6 r- e
|