/* called by: entrance ctrl of the object 'track'( D5 }6 L6 x/ d) r+ B* X* `. E
*/
( W a6 v# s8 l# I4 [/ d4 Eis
6 u4 Z/ E$ C- @. p2 B } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
F* G1 n7 n0 C2 s9 m" ~% H% @do# z F1 y8 a8 H, u4 l% N
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 u% F- N4 W4 u) Y i if current = @.Destination -- else return. Y( U. B% V1 B$ s' S
then3 g, \% l' U7 W) `& o- g1 {
@.Destination := void;
- E+ t# D* V: j if @.occupied then
: q8 ?6 l% K8 g% _ part := @.cont;
A# ^1 Q# G% V! p$ ? @.transpOrder := void;7 h/ A' C* P1 }& ?( d9 i( T( d% m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% [" F4 H( h5 H
@,root.eventcontroller.simTime);- b$ b" N1 L+ k% J0 T
@.HasOrder := false;
+ p+ w _, L9 p# k; h @.DrivingHome := true;
& A5 D# K: [& T7 _( _* D rgManager.tryToStartTransOrder;
: ]. Q. T7 Y$ g N8 l3 O# O5 D if @.Destination = void
8 I! `! }( f ?9 { then -- no transport order for vehicle @% i' |, y9 Z1 O0 E* t7 c
@.Destination :=* Q, w( Y& ^! Z: |% G& C9 h0 W
rgManager.nearestFreeStation(@,track.~);
' v5 O" G- w0 a' A newDirection(@); / k. k: k U& A' q' u
if @.Destination /= void then
& |# Z. M C! A& `: `& M @.Destination.NumReservation :=$ _+ X; i* G8 j+ R/ {+ T
@.Destination.NumReservation + 1;2 T- ^7 Y3 b# E0 H9 y
end;/ Y1 x X, g, d' e
@.CurrIcon := "drivingHome";- N3 k0 T% Q3 o( z9 B1 H
@.DrivingHome := true;
Z {+ g$ Z3 L/ [2 P6 x% r& J5 T8 d end;
& a4 W" m* n0 C- U/ q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ k' T& g# f$ W c5 L part := @.transpOrder;
9 {$ g" Z$ v- R part.move(@);-- load part
1 P" z2 M) N. n9 ~9 h8 G4 D; ~3 {" t @.CurrIcon := "load";
& j; ]9 W* c4 g* @. @; m GlobalDistObj := part.globDestination;+ k3 \1 I2 j8 I# ?+ t1 Y6 `
assignLObj := rgmanager.rgAssignL;3 q5 G8 w1 j- v2 Q' b7 |
row := assignLObj.getRowNo(GlobalDistObj);
}1 g7 `1 a& O$ g6 l if Row = -1 then -- since 70
" w) k6 z3 J' i c9 y) i6 L if lan=1 then
/ V' u+ g$ Y& |6 B$ Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. P# e# c2 u4 N: ?: h9 S to_str("in der Andockstation: \"",?.~.name,"\""));
/ v- ]" f9 j% y( x8 X else
4 d3 H" H/ I7 W$ L' y. _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& K% h3 T4 u0 C6 G/ m/ r% U, e to_str("in docking station: \"",?.~.name,"\"")); 1 t8 `5 q% t; z2 ]) P7 {$ L
end;
: M; J9 y; i; L( H" L& }' [. B else/ R+ D/ R) @8 k+ P6 \# W) v
@.Destination := assignLObj[1,row];$ N, X* Y( C* v8 n! y- M+ i
end;
~) e3 b. |/ l5 q5 t newDirection(@);+ n4 j( v5 H# g0 m! t
@.HasOrder := true;
! ^; ]- ~; `& l end;) D6 J8 W( v; r. S2 `' b& n: c
end;. s0 O q: S4 J7 i( u( {( c
end; -- of the method
, [" h' W9 _, J2 L1 C |