/* called by: entrance ctrl of the object 'track'
# ^6 ?9 j# z: ]# k*/
6 ?1 A. [; m3 P5 N5 _ {; ais
4 G2 n2 M; g4 ^ N+ x part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" e6 D! @4 G, ado
1 Z% Y0 L+ _ Q# o! @3 @ Lan := rootfolder.Internal.Tools.AOLlanguage;
3 b( L0 F* y, B$ t- v if current = @.Destination -- else return
0 Z% F' K. ^8 c" Y5 a then, a$ k5 X/ g, u Q/ G3 F
@.Destination := void; R, z$ H* l" E
if @.occupied then. f" R' H( d/ A" o3 d; _# f
part := @.cont;
9 z* G4 L; |9 M4 H% V6 G6 \7 D @.transpOrder := void;
& ^: i5 [. G7 \( m. J5 o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& t' B, E+ f6 S4 s/ |
@,root.eventcontroller.simTime);9 `$ b$ V$ F* \4 Z. o
@.HasOrder := false;
; [8 `$ w, M3 T, u' K. H/ N, {) { @.DrivingHome := true;: z+ | o: O* @
rgManager.tryToStartTransOrder;
, [: G, Y4 Z! @: D( R. P7 i* A if @.Destination = void
5 G" b9 A, ?5 z/ i( r+ |. Q6 ] then -- no transport order for vehicle @
8 E3 v# e" c" A @.Destination :=
/ D4 ^! Q& D% e, b rgManager.nearestFreeStation(@,track.~);
6 h4 H0 G$ z% q4 ]* l% `& ^ newDirection(@);
' ^ c: H$ y: d3 t/ u, L) a if @.Destination /= void then% V$ F2 S& T. V( D
@.Destination.NumReservation :=2 r' B6 D! X8 w. ?
@.Destination.NumReservation + 1;6 ?( {; Z' w6 G- X
end;
1 u; s' q2 F/ l/ D/ n4 M& u# ]$ Q @.CurrIcon := "drivingHome";
" l& U/ p1 {" F @.DrivingHome := true;
/ S4 S4 {5 L2 M$ D) y end;
1 @5 R; z. q6 R% h3 P else -- the vehicle @ is empty, both vehicle and part are in the same dock station, I/ W3 I9 z( h: e: K
part := @.transpOrder;/ ?2 K/ |. @* t1 p
part.move(@);-- load part
7 v" h% g6 E Z @.CurrIcon := "load";( `( M+ o* o1 o4 M4 e( ]+ s+ }
GlobalDistObj := part.globDestination;' N4 s' M5 c9 r& C% L
assignLObj := rgmanager.rgAssignL;
+ ?6 R4 x9 q4 a0 Y5 F row := assignLObj.getRowNo(GlobalDistObj);
1 V. S6 B+ j3 {4 K; F% j if Row = -1 then -- since 70
8 P5 e& `; o8 D if lan=1 then
3 g" c( u2 j: Y7 U) ^# J8 s7 c& g0 E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* d, _9 V6 s1 o7 g" \0 s) T
to_str("in der Andockstation: \"",?.~.name,"\""));
0 R+ @, H, h4 w. k/ r else* Z7 F/ C9 f1 @3 }& f1 a% B6 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! O/ A/ p( e, T5 s
to_str("in docking station: \"",?.~.name,"\"")); 7 N; c. H7 o1 |4 d0 O) Z& v8 z. {
end;
+ g1 _4 g/ ], l0 ] else8 p! `9 |1 B1 @8 g
@.Destination := assignLObj[1,row];! T# z- U! V* c# i6 Z
end;
# {+ S$ i4 l$ j newDirection(@);$ N& c, P- m- i$ @
@.HasOrder := true;
. B1 w! C3 W# r end;6 p1 l' Y& V' p7 O6 Q, U$ r. ^
end;
6 D7 P! A0 e. Z0 J" v, G' Bend; -- of the method! M6 l$ i# U8 |' {3 w- l
|