/* called by: entrance ctrl of the object 'track'7 b6 s1 o) \- r' @
*/3 w3 l4 Q( Q1 N, v2 o, X
is) m6 T, D8 D* R# i5 U; s+ |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. V) S' K" @' j4 B9 H0 ]9 Q
do! R- f- \; o7 t2 d( M8 P
Lan := rootfolder.Internal.Tools.AOLlanguage;# e7 H) [! D* z3 J$ C: o+ w
if current = @.Destination -- else return
$ u; ?% D" M4 P6 D) y then
. D: g' @8 e) i, N1 c+ A9 |9 q @.Destination := void;
! Y5 u3 b) L0 D u& ?1 T if @.occupied then
6 E( L7 { e/ f8 t1 k- Z part := @.cont;' u) B @7 ?6 x" D% |, N' t0 T" q
@.transpOrder := void;4 L- ]( x! z0 S3 S, G( e) ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
Y# o. v1 F+ y+ w* N @,root.eventcontroller.simTime);1 m9 V8 I! n# S. N
@.HasOrder := false;: p& L' J# U: y6 Q9 |. o* Y
@.DrivingHome := true;
$ S, z, R, y+ b3 Q rgManager.tryToStartTransOrder;
7 ~5 ^" V, I4 ?4 E- C8 [ if @.Destination = void
9 c8 Q. V( P/ o! C; x/ a3 N3 }* | then -- no transport order for vehicle @- _- p* G$ l9 b; c4 ?! i
@.Destination :=: Y! z% v8 c1 l, ^& E' d
rgManager.nearestFreeStation(@,track.~);( X! G0 p0 R" B) W1 i* P: z7 s
newDirection(@); 7 z+ x; k; ?' E" U/ k
if @.Destination /= void then6 I# i) V- ?0 Y' G: g( F& S) w
@.Destination.NumReservation := ]% B; `7 @: b" {8 s% m0 Q& n3 m
@.Destination.NumReservation + 1;
5 j! z! ?$ T6 Y, E8 e# S end;+ w* [ ?( Y& L. r. X8 Q9 |% {
@.CurrIcon := "drivingHome";
1 V4 c) n+ \& e$ L' W! j @.DrivingHome := true;
6 S: {: Z% f) ?: L) V end;
! m; V i% O* R% _* m- |/ y" @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, H2 T& Q" N3 R5 o+ j3 ^# \0 M part := @.transpOrder;
" V, \: r. [7 E part.move(@);-- load part
* z9 M' J S% @' a @.CurrIcon := "load";
, f+ E" @' K; s; R6 W% d2 V GlobalDistObj := part.globDestination;
! p% e2 \/ u/ Q' T2 n: x assignLObj := rgmanager.rgAssignL;. h& q' g3 ^8 v4 M9 Y; q
row := assignLObj.getRowNo(GlobalDistObj);
$ Y4 |6 m( d. a/ z0 E% h; p if Row = -1 then -- since 709 N, ~3 }9 p7 u3 c. Z; q: n
if lan=1 then+ p/ X+ O1 C0 H" n9 P5 E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 z% K7 W* I7 j to_str("in der Andockstation: \"",?.~.name,"\""));
4 K4 A( g8 m e else: u' x2 D+ c1 {. R0 A* u- |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' o7 H, v, ]4 m y+ v i! S2 J to_str("in docking station: \"",?.~.name,"\""));
0 Q$ h6 O! I# A# B ~" ?3 k0 g, O end;( x' n0 M: q+ K
else" e( ^7 M. j0 F! s- V. H9 O9 l
@.Destination := assignLObj[1,row];) f' r: V! M/ I) @! _
end; * |% v) @; O' E: Q' S: \
newDirection(@);
) ^( p7 g5 i7 ]5 Z1 |! g @.HasOrder := true; b7 C5 ~% L# g1 E4 ?1 r
end;
9 z; q" A# i# `6 |& L q6 p end;
3 m4 Z1 p% a7 w) B! w* ?; xend; -- of the method
- v7 P; `- B9 |! j- }2 k. ]# ` |