/* called by: entrance ctrl of the object 'track'+ `+ ^' {" @1 F
*/
, q \$ l3 }6 iis; L2 _5 r/ b6 \8 j7 ?! K, N' _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; W! \1 n8 n' g' L: ?do F* C5 B0 Z/ J; E
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 v7 G' Q, B3 S' g if current = @.Destination -- else return5 p! |" M/ k+ r8 V; e
then
_" b8 b+ f0 M3 a O @.Destination := void;
6 o% q+ X, N: u7 y! _ if @.occupied then
8 M3 N8 i* h1 y part := @.cont;
/ j. M* G- S" _" d1 ^* O7 b6 x @.transpOrder := void;
7 x! e& g1 V) n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* V2 t# P2 D+ Y* Z- N6 Y @,root.eventcontroller.simTime);
- K7 n9 h! u- X& a! Z @.HasOrder := false;8 m; ~% w& U. ^4 ~0 w+ [
@.DrivingHome := true;
- t3 c/ x/ f& ]; I/ w/ d# h. X+ e rgManager.tryToStartTransOrder;
3 {8 R1 N1 A! ?6 }) J4 R if @.Destination = void
; ?! L1 r! I' t J+ c5 O then -- no transport order for vehicle @- G6 C/ G }2 Z u9 w6 d
@.Destination :=
* G; ~* L. y1 ?1 W6 G% q5 m rgManager.nearestFreeStation(@,track.~);9 | K l/ ?! L
newDirection(@); 4 Z! Q x$ [) |3 m/ B( _& }6 t
if @.Destination /= void then
$ p* X- @4 r; y. c @.Destination.NumReservation :=( s, J `$ \& d. m5 D9 f
@.Destination.NumReservation + 1;2 c, }7 S' i5 O5 u- R% x: `
end;
1 X# F5 P% p) c( t @.CurrIcon := "drivingHome"; l5 t( J9 | z8 D
@.DrivingHome := true;- J; y& F& S0 X' B8 m6 H9 E! \
end;
5 i N, ^6 _: `& n: ?% N! {6 a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ O6 C A7 C5 B part := @.transpOrder;$ I% a5 ^+ g, Y* }" K' G
part.move(@);-- load part
2 ?4 j3 R1 K4 @* c/ s @.CurrIcon := "load";' \3 [, o" c7 U! R5 Z4 x% f" `
GlobalDistObj := part.globDestination;4 ^& J8 p$ b( g4 M2 a1 J% R' j
assignLObj := rgmanager.rgAssignL;
1 E5 Q' F* ~6 a6 d. N1 ~ row := assignLObj.getRowNo(GlobalDistObj);
& h1 M! d0 w" @) ` if Row = -1 then -- since 70# y/ z7 t! m3 U5 Z9 Z9 ?, b
if lan=1 then
2 G3 y( }4 A3 y& }7 U. w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 Z0 v8 n( L$ X0 j6 p) c; @
to_str("in der Andockstation: \"",?.~.name,"\""));
( b5 I' z2 B; B8 |. ?; I1 \ else: z# r8 ~5 b ?: J: E# L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' P0 M4 K$ W' Q4 i
to_str("in docking station: \"",?.~.name,"\"")); , t1 e& [8 p4 X2 A, p6 w
end;3 A. B: N3 `) w6 C5 I7 x
else
$ k1 K% B6 ]8 n2 @3 C$ k+ ` @.Destination := assignLObj[1,row];" s7 Y' Y% W, W8 M1 [
end;
; u q. ^4 a+ E s( {6 W newDirection(@);3 ^/ p+ g8 R3 d9 ^* v2 s! L& V# k
@.HasOrder := true;
* \, T( ], J8 ~- k% g end;
0 k3 o" [1 j7 m: R end;# N& E( v$ q' [! ]$ p7 H: f. G
end; -- of the method! Q% z. q* N2 W, T* _! K7 K
|