/* called by: entrance ctrl of the object 'track'
5 L* }. {7 f7 b# U" ?*/9 }& l/ g7 Y5 Q) m& ~( T% S
is
6 o3 _2 `! t& K' n/ ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
{2 B/ `* d6 Xdo# Y6 ]1 C3 L! E7 B
Lan := rootfolder.Internal.Tools.AOLlanguage;9 L4 d0 U" D$ S3 d, a3 h
if current = @.Destination -- else return
( N' q( C8 ^ r, R6 V+ F: V) M' l then# t% K" I; y8 h/ c; g4 k
@.Destination := void;
4 g) K4 U" U4 x! S0 |' x if @.occupied then
5 g+ F ^& b1 Z- B1 G part := @.cont;
* l& G9 e( i: X9 P8 B; f- s0 S0 H% i @.transpOrder := void;" E. [( M \. S4 |. D& d* @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. T5 t: q8 Y* {& p% M
@,root.eventcontroller.simTime);/ |' h+ d; u0 P3 Z! A9 q0 E1 d
@.HasOrder := false;! ]% {4 @6 N2 |& a: Z* T
@.DrivingHome := true;- L0 j+ Y0 o- @( n! ?! Q8 A: {
rgManager.tryToStartTransOrder;
' S! e' N A. D" C: P2 q% C5 m( q if @.Destination = void @% _) X: e( p7 y1 C# l* h% P% k
then -- no transport order for vehicle @
( J) @* V7 m5 j @.Destination :=5 E0 ?- h% |8 J! {, c! m
rgManager.nearestFreeStation(@,track.~);
1 U l: d. ^( `7 B newDirection(@);
/ N+ p; X7 ?( B+ G$ } if @.Destination /= void then5 C' @- Z5 R9 h; K) e- c( _
@.Destination.NumReservation :=
. z' ?! d" A8 W( R9 P- { @.Destination.NumReservation + 1;- E3 i4 Y3 J% O F4 @. V1 E
end;
7 F' p; i4 I7 M& @$ O! k6 s2 s, L @.CurrIcon := "drivingHome";- `2 y, i- |# e0 l0 f
@.DrivingHome := true;
; ]2 u0 X# q* k end;
) y0 _2 S! h! d% H else -- the vehicle @ is empty, both vehicle and part are in the same dock station% `2 v% C6 q: I. H1 }+ s) n# X
part := @.transpOrder; @) S h5 a7 z
part.move(@);-- load part4 O! n9 @. S. p k: ]6 W* g
@.CurrIcon := "load";
1 Z6 t- Q$ U7 j: h0 E& p0 y& ` GlobalDistObj := part.globDestination;( U9 k& X. ~, i& r& X; m" m0 r8 {6 Y/ v
assignLObj := rgmanager.rgAssignL;
+ D* W3 D' N0 S1 y P) X row := assignLObj.getRowNo(GlobalDistObj);
! f$ d+ X/ e$ E7 J' S if Row = -1 then -- since 70+ Q5 ^ _* W- q0 Z; h5 d
if lan=1 then
T4 l$ i. M# e1 ~) U+ |' u+ m2 ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
r& N6 c1 O8 p4 A6 n to_str("in der Andockstation: \"",?.~.name,"\""));
/ c- U0 `* [) u. A4 E else
j r$ N8 h2 l# S& o3 j, [4 O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. o9 p: X: i& K5 x
to_str("in docking station: \"",?.~.name,"\"")); * @. j; _5 B3 F1 b: g; J" {0 D
end;
) ~) h' d9 x7 y1 c3 {/ p( r4 \ else
8 Z) X. _+ ~1 P6 e7 g( p+ o0 B" p @.Destination := assignLObj[1,row];
' B1 L3 j+ R2 H" I3 p' [. ] end; 6 j! n8 T9 Q& S6 R' E/ I
newDirection(@);2 u B9 Z7 ]2 T1 x+ {, v3 \
@.HasOrder := true;
4 J. n- Q$ B, t- `7 q8 }5 X* I end;
) N$ f' H$ U% F end; H+ {# B6 E# }6 u
end; -- of the method
6 e# f/ P, S# i9 a& o) w5 i |