/* called by: entrance ctrl of the object 'track'
% x4 n% R# U$ |*/% B6 r) G$ |; [1 N- w
is9 ^/ M' u7 M- @( |, [2 h: ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; u5 k* c2 z/ }do4 U4 t5 O3 ]+ q/ ]" N% A
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ x2 q! e. W" R" Y" [% ?% b$ D P, V if current = @.Destination -- else return
, ]" B7 W% M+ l7 g2 r7 N; V1 u then
7 M2 B& e' v2 y0 k, m2 f @.Destination := void;
2 s! m; j9 L2 J. n) }$ { if @.occupied then
8 h; U7 u& D3 ` m" b0 G part := @.cont;" c- c/ P' d$ N2 F2 {5 ~
@.transpOrder := void;9 x9 V% i$ x! _ `& {# P" r% J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ J( d/ H' D6 h @,root.eventcontroller.simTime);9 f4 W9 W# i5 ^6 u. T- f8 ~. y
@.HasOrder := false;5 w+ C0 c! D; I1 X- C" M
@.DrivingHome := true;: z6 {: r0 N% r+ L, E; Z/ p% Z
rgManager.tryToStartTransOrder;
. J2 T& @: G% ^+ l# T! K if @.Destination = void
. }6 d5 R/ q/ @' B$ f then -- no transport order for vehicle @$ e6 z7 ?% k3 D+ a6 x/ \
@.Destination :=7 @$ x, P) E& V! ?, X
rgManager.nearestFreeStation(@,track.~);7 n- o1 G' J/ O8 C
newDirection(@);
' c2 d. X* D. G3 j/ D if @.Destination /= void then
2 C+ R1 x6 s! k$ } @.Destination.NumReservation :=
! \$ f: f6 w% u: s* g) c @.Destination.NumReservation + 1;9 L0 n" _6 s/ \. B+ \+ _
end;
$ n1 a2 a& m& [! G/ _+ m @.CurrIcon := "drivingHome";& Y# O! U3 m& s) |0 a! Y
@.DrivingHome := true;
) R' D. x7 O! J- J5 t' [ end;
' {: w" ?6 E1 ^7 t* z( ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ f& w6 G& ?% } part := @.transpOrder;
S6 Y9 E5 M6 v# J7 b part.move(@);-- load part
( Q& n2 I. x! Q* w0 G/ `+ l0 k. D @.CurrIcon := "load";
) c# K2 T4 I+ {' i* ` GlobalDistObj := part.globDestination;
& z- q2 _ f; x: f% J0 k2 A' b assignLObj := rgmanager.rgAssignL;. W1 Z% {# u! x- i
row := assignLObj.getRowNo(GlobalDistObj); P$ x$ d- e5 k. I. T- F
if Row = -1 then -- since 70' I6 A! r: ~* p+ S% u% a
if lan=1 then
0 y2 r- Q5 I% L( N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 l3 i( @! S, y7 C; V6 z
to_str("in der Andockstation: \"",?.~.name,"\""));
X3 R" f. K5 K6 V5 Q7 g0 g0 M else
2 k* u+ L$ P* y2 |3 P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ s0 Y. h# a' v' ]. J
to_str("in docking station: \"",?.~.name,"\""));
; N: p, h X( e$ h6 H end; }" n( s% C+ e& z" o
else8 g& W+ l5 |# S& Y- m0 {
@.Destination := assignLObj[1,row];
7 { A# b- ^: p/ O end; 3 \) O, [ o" A- A/ H
newDirection(@);
, T7 i( w/ z' G8 I @.HasOrder := true;
; u M# `0 ~3 |9 E end;
2 G4 }# _) n2 T3 X! K end;: o5 b; h& A! B" Q5 n) S9 `
end; -- of the method& k1 @) F7 y; R$ ?8 t8 n
|