/* called by: entrance ctrl of the object 'track'
; u& i2 F) Y* W7 \% Q*/' E7 O( s8 q. I
is5 j% J! f2 W# W2 v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 M; V7 f- T& w5 r" [& ~- Odo
7 b% T6 j9 D# x. A# m0 R Lan := rootfolder.Internal.Tools.AOLlanguage;
, b$ _8 O' Z6 X) p; @+ y if current = @.Destination -- else return
+ L+ h% C u6 T4 \5 V then( V8 K% H: d6 i! E1 t. O+ c2 i
@.Destination := void;
5 Z7 T6 D; I( `8 V" L' g if @.occupied then
$ E8 k9 q5 k- x part := @.cont;/ X# R/ b6 g6 O1 b2 Q1 m! A# P
@.transpOrder := void;8 \/ X# h/ i1 R( _% f/ _$ k0 o# i- L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 g0 X( Y0 T2 q$ L3 ]$ O @,root.eventcontroller.simTime);) V: ]( N* ~/ y; C$ F4 w+ R
@.HasOrder := false;8 t& |0 Z7 _% e/ u) o
@.DrivingHome := true;
2 t. t) {& d9 `+ s$ W8 U4 l, A rgManager.tryToStartTransOrder;
* o1 K5 X8 \: R: { if @.Destination = void) m) G3 d; u) O
then -- no transport order for vehicle @$ \ U4 O+ B+ F5 ~" u
@.Destination :=
& o7 F* I" ?3 L1 S8 q" M4 j rgManager.nearestFreeStation(@,track.~);
. }5 T+ U+ @% ?& i7 t" V5 N, L newDirection(@);
b |; N/ s/ R% A' n! X if @.Destination /= void then/ E$ b# T6 K3 _- t2 j4 ?8 r+ | H- p
@.Destination.NumReservation :=" [1 h8 |% W% I* N
@.Destination.NumReservation + 1;7 g5 E0 n0 { i$ ^8 Q: R/ g9 }0 m
end;/ f8 v0 Z: w% @" b
@.CurrIcon := "drivingHome";& S$ T- E7 d: E& H" P5 W
@.DrivingHome := true;3 T4 H0 B% s0 \8 K
end;+ u% A2 i' c! D6 P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. w% z5 {, o' H/ B- E7 Y part := @.transpOrder;
7 K5 K2 V0 Z" Q/ E5 ` part.move(@);-- load part6 S* E) ~; z% r" D @4 F" t& _/ [
@.CurrIcon := "load";
6 Q* ^7 Z$ W* X GlobalDistObj := part.globDestination;
6 p6 z- S1 q4 H$ x$ i# g assignLObj := rgmanager.rgAssignL;
9 x. l3 \4 e; f# Z% @2 f row := assignLObj.getRowNo(GlobalDistObj);5 I; |; v5 E8 B$ M1 F3 |1 C
if Row = -1 then -- since 70# P' @3 a5 G2 ^0 S6 `/ S6 S/ O9 R
if lan=1 then
: j1 v+ ]1 k3 b" A& w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 J3 Z1 h6 b" H# Q
to_str("in der Andockstation: \"",?.~.name,"\""));
2 ~8 p: [0 E/ S2 x else7 f1 t. g$ l2 J8 E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* y4 R4 I P' k e to_str("in docking station: \"",?.~.name,"\"")); - s- B! |5 S- Y$ _6 \/ Z* K) e
end;+ X% c: u- v/ B+ _2 x, J
else
! u! K5 h1 ? l; {% G @.Destination := assignLObj[1,row];) |. _7 m! V W4 `/ w7 F/ `0 j
end; 2 ^* O) d! A V j: ^( i- F9 H, H
newDirection(@);: h: ?. E# x, Q3 F9 l8 t5 R0 Y
@.HasOrder := true;
. }5 S2 X& V( u' \ end;
. W8 v6 V' l" v- Z7 j end;' j$ G. _) _! m) K/ r
end; -- of the method/ i# G) F' w* B' f# W. p' g
|