/* called by: entrance ctrl of the object 'track'
+ Y8 f9 N2 P1 U9 B! s1 }/ j; P2 M*/2 }, F& q9 Y% p+ Y/ e
is
9 v2 e+ ?) a8 ]0 \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ I1 B: D! w) l$ B0 D9 gdo
& ?" J3 z$ |4 E D4 H Lan := rootfolder.Internal.Tools.AOLlanguage;
1 N" s z) J% y/ L! {2 a7 z& n if current = @.Destination -- else return: x8 k0 W1 E/ \& G
then
' d! f. `4 |. V$ P6 Q @.Destination := void;
$ R4 w* j- w4 S: w if @.occupied then
: g& x) C# C+ i( O2 O0 `# i part := @.cont;
7 n" j' C' l9 c @.transpOrder := void;
6 ^5 v2 D- s! p7 C4 Z# W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( f' F+ X7 V% E3 g @,root.eventcontroller.simTime);1 m* L) G4 n9 n
@.HasOrder := false;
/ Y$ j7 h/ ~0 W. U/ q6 E" i @.DrivingHome := true;
- S. B( _4 ` B* ?: P, e9 _ rgManager.tryToStartTransOrder;
( R- u+ U5 ?: V7 ~% B; X2 G if @.Destination = void* f: Y* ]7 p5 p' k! K
then -- no transport order for vehicle @% g( t8 g# U- |. F2 G( c9 s
@.Destination :=1 q4 S$ O! J) ~* c3 o% }# O
rgManager.nearestFreeStation(@,track.~);$ g/ `% }, q. J0 n+ I/ h. L- u
newDirection(@); 8 {* ?8 d4 ^' U: v
if @.Destination /= void then0 J% a6 h/ T- m, g8 i- }2 a
@.Destination.NumReservation :=
$ F7 g! f q3 h8 W; A4 n2 h @.Destination.NumReservation + 1;
* `- t" b' c6 Z+ s4 a) A end;2 i+ d& ]3 a: P2 \
@.CurrIcon := "drivingHome";$ f5 M- n# q! l$ E" l& x$ c3 U
@.DrivingHome := true;
: o+ e) e. x* h, k end;
, Q. `# E9 f' s: R+ {# u8 i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ h) W7 p$ \8 z2 O! v part := @.transpOrder;
^4 B( g: Z3 y* N! M part.move(@);-- load part2 O, v" K3 I$ B, \
@.CurrIcon := "load";. l7 C( F+ W5 s2 N
GlobalDistObj := part.globDestination;1 q! [' {' q: C3 P( r
assignLObj := rgmanager.rgAssignL;
2 Q0 v1 G+ e! Y row := assignLObj.getRowNo(GlobalDistObj);
* j* W5 _' f5 x2 B$ N Q- c if Row = -1 then -- since 70" }# R2 p6 N: L# l: F4 X
if lan=1 then6 F) ~: T# l' L/ e5 C+ n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- x: [ P/ t% k* M
to_str("in der Andockstation: \"",?.~.name,"\""));
7 O+ D7 e" x% t' e. y1 I" o else3 G7 N8 x/ e0 n" }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 Q$ K8 A. B; Z5 D- v( P7 h to_str("in docking station: \"",?.~.name,"\"")); $ K' d5 U- Y5 \
end;
+ W2 [! z$ I ?; ] else
3 k" E0 o1 \! H8 u @.Destination := assignLObj[1,row];9 _ E( R' ]! I l2 U7 O
end;
- E9 F" G2 w3 c. [/ p: J newDirection(@);' c) J& i5 z/ ?1 o
@.HasOrder := true;4 T4 v$ ~1 R1 U0 S. f
end;
) w9 n3 I3 C# b end;
0 a. d. O1 J* ]& k. K; [end; -- of the method7 R, _) i! \% O! }- Z' T9 O" X0 o
|