/* called by: entrance ctrl of the object 'track'
& b1 Z0 f3 h; ?*/( C6 E% Z! P3 u1 S. y: [
is+ o* ~; W( S2 x# U3 k% B' ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# U& u7 V/ K$ ^( D* ido( p( ~$ q+ m) O1 ^6 r5 M
Lan := rootfolder.Internal.Tools.AOLlanguage;$ _1 o8 M" z( w
if current = @.Destination -- else return& t S4 r i/ F3 s
then6 x+ ?- w4 X5 C# Z) [( f6 Y0 V
@.Destination := void;! Z! [% }/ E: h+ ]' |+ Q8 T' S
if @.occupied then# t/ n) @4 L4 D3 H% d- z7 ?4 c
part := @.cont;2 C3 O6 W; w; W: r
@.transpOrder := void; O8 Z5 K: M" }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, u6 q h- X, z- f% J
@,root.eventcontroller.simTime);3 B0 _, h f" r2 ?. U x4 n
@.HasOrder := false;$ u2 i. g( \" l2 T& [$ O
@.DrivingHome := true;7 j1 @" f" \/ Z* k. D
rgManager.tryToStartTransOrder;4 J. {. E! {5 j0 X
if @.Destination = void" O5 e: A6 ?& \2 f5 ]3 P
then -- no transport order for vehicle @
V" k' K( z' R @.Destination :=7 i U" l7 {2 C1 m- j4 |3 G! V
rgManager.nearestFreeStation(@,track.~);
* u0 g( a- r0 [# E; }' _ newDirection(@); % w5 ^/ n8 C' ?. L9 B2 G
if @.Destination /= void then) A1 {& y6 H$ T0 ?* F. R
@.Destination.NumReservation :=9 s$ o( y5 r/ _4 U+ Y) {
@.Destination.NumReservation + 1;2 o0 _* O9 @% g# _# S
end;
, b! x/ @' Z! Y0 N/ y& j- M& B @.CurrIcon := "drivingHome";, b- u( X* u. Q: x" J6 G
@.DrivingHome := true;
5 Z( [# n- {/ N* v) B end;- Z }% P+ k/ s; [; I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 O7 u+ q( N6 Y& D) c- Y' s$ I8 r
part := @.transpOrder;/ F: }# \/ B. h/ `; p1 E. I9 |
part.move(@);-- load part
' _6 |9 D3 g$ Z4 [2 t @.CurrIcon := "load";/ Q! {3 x9 w8 r3 o
GlobalDistObj := part.globDestination;
; H" s: O& {+ r assignLObj := rgmanager.rgAssignL;: a: m. C& }$ g; D
row := assignLObj.getRowNo(GlobalDistObj);' X8 M" t4 i2 _% a2 _3 D, {- A `" L
if Row = -1 then -- since 700 G) M {: {# R/ I6 U2 Q
if lan=1 then
$ Y$ S0 S% m; L5 S7 ^$ J. J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 x9 ?6 q2 u9 {2 L+ [
to_str("in der Andockstation: \"",?.~.name,"\""));) L; H4 s- m% }4 w- Q
else B! ] }2 B5 Q; \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 s! }2 N8 m! o1 W to_str("in docking station: \"",?.~.name,"\"")); 8 G& B+ t. J: p$ e5 K
end;
7 j1 B3 ^' W C; \9 { else
2 w& S& I7 m7 | ~ @.Destination := assignLObj[1,row];
1 F) V+ W* c* T" g& u% M2 U9 \ end;
4 p3 M# U( r6 }5 V* K* G newDirection(@);
1 \! y& J: L( e9 w0 z; w1 { @.HasOrder := true;' ^ X* ~' ^. O2 ~
end;
+ y. H1 M* }. P) M+ w2 f8 Q end;
; ?. [1 ~. `: k! }- Yend; -- of the method- q9 C7 Z! f9 h* D
|