/* called by: entrance ctrl of the object 'track'/ }8 C, g7 G0 s
*/
/ l( z7 b! p5 \is
5 V5 B5 E( G6 e: B part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ C P2 E. O! T+ D& I. d" z' Wdo
! n0 ~; Z4 t# w. R: o8 z# X% B Lan := rootfolder.Internal.Tools.AOLlanguage;
/ H3 j- M5 d. r5 a if current = @.Destination -- else return
+ i4 I. W& e: Y% S then% H! b9 I( _7 b; k$ N
@.Destination := void;
V1 ?+ e6 u/ ~) V5 l9 H( H* n) y if @.occupied then
1 `5 Y- ]+ [2 K5 E5 a& p part := @.cont;
3 t( ^5 ~3 e$ j3 }0 e @.transpOrder := void;2 r. g$ o7 | I# l% v' w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; j( U& a8 ~" R; }3 A" ~0 d @,root.eventcontroller.simTime);4 N$ v5 i" B9 K$ O5 v3 G5 F" P f g
@.HasOrder := false;& w* r1 l+ `9 i0 | n5 P
@.DrivingHome := true;3 d# K' S2 m9 w; @% ?! i
rgManager.tryToStartTransOrder;/ ]& g4 s0 l1 z9 H! K! K+ [% c
if @.Destination = void Y7 f2 x4 G/ |9 x3 F; c, y. v
then -- no transport order for vehicle @& q* c7 h: V a6 u( K' j J4 y
@.Destination :=- P3 ~9 ^: r" F: N* n1 p
rgManager.nearestFreeStation(@,track.~);
% a0 L" G) h* I- c! ? newDirection(@); " ]6 v# U6 Q4 s( ]3 t4 k
if @.Destination /= void then
9 u; T* j5 K9 K! o; j: P @.Destination.NumReservation :=$ _; U: O; O0 ^1 a2 s% ~% ? P
@.Destination.NumReservation + 1;) f6 G% k5 d8 y
end;" c, C# P; p, P+ H
@.CurrIcon := "drivingHome";
. `3 Z$ c0 d! F @.DrivingHome := true;$ {/ G2 [% v# `; ^& G
end;9 g4 Q) l9 _$ ^# h7 U0 o: T; C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 q! p# J9 K4 C1 h5 [ part := @.transpOrder;/ j1 ~" {& B# x
part.move(@);-- load part
) Y# z7 P, S: z: f* W1 { @.CurrIcon := "load";1 M, a e" Q, E j
GlobalDistObj := part.globDestination;) c9 \8 [ s, i! B8 u2 J
assignLObj := rgmanager.rgAssignL;
$ {4 W) O# {' f row := assignLObj.getRowNo(GlobalDistObj);; V/ n& k H* v$ X5 f- G
if Row = -1 then -- since 70: z& U' N$ C' ]. B) d
if lan=1 then" P5 _& {: d O: F3 x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 n+ @1 y3 t" N, I. L
to_str("in der Andockstation: \"",?.~.name,"\""));( M5 `/ P7 O6 M+ k
else% P- q( ~5 r$ J" m" A8 K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ T. n: A' g0 k7 y
to_str("in docking station: \"",?.~.name,"\"")); # E; P {5 y1 y) R9 o
end;
- f4 o0 ^; ^+ P" `( x else* T5 j8 P( @0 I$ F; a
@.Destination := assignLObj[1,row];; | [* `# X6 D# X$ r2 G0 Z
end;
- k( o+ u3 u) V6 e+ m' i# w+ H newDirection(@);
% w4 h6 S& ?: g5 a3 P; k @.HasOrder := true;8 M+ q/ v% T2 V& |" k
end;
7 _7 k4 m% [) B; l end;& _0 ^* c1 m3 c( p
end; -- of the method1 H$ i* o+ f- K: C6 a9 P" ~* K. u" G
|