/* called by: entrance ctrl of the object 'track'+ w. S$ r+ \4 W( `# ?* B$ k/ P& X
*/
# Y5 V- H' n( P: `, E3 J) eis* e! ^+ C' {* c9 l* Q" I/ s( y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# w8 r% R7 \6 gdo8 G, l# }% q% R
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 ` s a) f: w; C3 W if current = @.Destination -- else return
- g# m' R( D5 l7 s5 U) |9 T% P) N then6 c) D( e* z* M0 Q, R- v& U
@.Destination := void;
$ t: p, M1 j: E" @4 ?$ O if @.occupied then) e1 S, a# q2 p, C ~
part := @.cont;& L: ?5 P/ M2 F( c/ M1 m5 S" T
@.transpOrder := void;" Q0 m1 \ N' Y+ Y1 t) Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' x- c, o1 U- }% g @,root.eventcontroller.simTime);$ Y& j# M$ W( H' s, m
@.HasOrder := false;
4 X4 i7 d) h8 r" {$ d; l3 Q @.DrivingHome := true;$ ~% a' Z7 V& E
rgManager.tryToStartTransOrder;
. {$ J0 D7 j5 x* ? if @.Destination = void
* u) N" Z, A9 O; K; W then -- no transport order for vehicle @' c& c+ ~& {4 B& F1 [* T7 O5 \; L. H
@.Destination :=
& D+ F4 e2 U* u' f) Y# l rgManager.nearestFreeStation(@,track.~);8 g6 P. k. z% t- I% K1 p
newDirection(@); 2 W# {' {4 R! G% l3 m4 H( g. _3 ?
if @.Destination /= void then4 n" s* `9 d. e! o3 C0 x) T
@.Destination.NumReservation :=
( j9 z* G$ Z4 i! P @.Destination.NumReservation + 1;
2 `: p% C+ }$ l end;
) G' {9 o. ]$ m7 `+ d( J* J' L @.CurrIcon := "drivingHome";
/ u4 o8 |5 O# Q5 X$ ? @.DrivingHome := true;
+ Z( C. D3 D7 P) i: H b end;
9 p% u- c7 @8 Q" a& ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' i6 d8 l6 B) V; b part := @.transpOrder;
' s9 {) Y; l8 D/ Y2 h) {8 N/ ` part.move(@);-- load part
% V/ U: d# }2 c$ Q, ^ V* ? @.CurrIcon := "load";, y9 w# W" g; r1 k8 ]* \
GlobalDistObj := part.globDestination;
6 N; M9 J: z! B9 ?& h4 J assignLObj := rgmanager.rgAssignL;
9 J- H# D: E7 @/ T row := assignLObj.getRowNo(GlobalDistObj);( k) _7 ?+ \, p& \# B, g. r6 X! E0 i
if Row = -1 then -- since 70
% J) S* P$ i9 w2 } if lan=1 then6 B! ]5 P. G3 G: R3 n9 c5 B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. O d, f9 u% R, r- s
to_str("in der Andockstation: \"",?.~.name,"\""));
0 @) f; Q) q* ~# o6 Z else
* B M+ E% W7 p! ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# P2 C, A, G0 Z R! g to_str("in docking station: \"",?.~.name,"\"")); 4 f% d3 E( A3 B1 D
end;; }5 [. e3 w6 z( b. @, p6 V
else5 i* b$ X S/ L0 O) B
@.Destination := assignLObj[1,row];- O' i1 F2 s W& t8 s
end; , c6 m7 b& t3 ?" t' @; L
newDirection(@);
9 z9 S) Y) e6 L9 l( r6 V# Q @.HasOrder := true;. Q# p* k9 Q, L- H
end;+ o1 F! X8 L2 c8 z
end;
( f6 X; ~4 }8 h7 y/ oend; -- of the method
8 H% l3 J- a/ [5 v |