/* called by: entrance ctrl of the object 'track'3 f! |, v% ~% y
*/2 a5 j" q6 @* [" [. o
is7 f8 T- I8 a5 g6 W) Q8 _* T; ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 |% g6 s# i# b9 J- P4 r6 k5 Z7 Xdo
5 a7 N% L( Q% z1 X5 q4 l Lan := rootfolder.Internal.Tools.AOLlanguage;
" M: P0 \" i w if current = @.Destination -- else return
; o& R3 |+ ^( X' H, `& q then
2 E! Z. a/ S9 w/ c9 z9 i6 n9 n- k" e; l @.Destination := void;
# O8 ?" q8 L7 t& l) x if @.occupied then
0 e" n0 W& v! `/ N0 P7 ]" @ part := @.cont;9 _- b% d( ]% A+ u( H1 Y. q7 L
@.transpOrder := void;& w# N0 r3 x) _. }& {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 j) c: [2 ~0 f$ `# l9 @5 o @,root.eventcontroller.simTime);$ W1 ^1 T4 V) I% B
@.HasOrder := false;
& u E6 M0 V' J, X" O @.DrivingHome := true; [& |6 r: i' v
rgManager.tryToStartTransOrder;
6 Q5 w# E6 M* L if @.Destination = void+ F3 _" s2 R; S& B9 Z: q% [9 |
then -- no transport order for vehicle @4 U( g. H6 i# Q1 ^* A
@.Destination :=
m* H! S6 u3 a0 A* W rgManager.nearestFreeStation(@,track.~);
& `- x4 R$ n" o; O. M g' l newDirection(@); + G7 r8 m* e: l9 j3 c
if @.Destination /= void then/ W" K! g2 Q$ O6 {" C' b5 x& g
@.Destination.NumReservation :=! x( Z% g0 v5 r, o4 p: T
@.Destination.NumReservation + 1;4 a Z! q( ]% R5 A* w
end;2 w- X2 W& d2 i! {
@.CurrIcon := "drivingHome";
- P# h& f. u7 o* @+ r2 l! b @.DrivingHome := true;9 d# O k ~' ^; I# b, S7 k( |
end;* n) G6 J) v# h( _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! I6 @% q* v& X0 y9 c- P' F
part := @.transpOrder;# e c4 x) n% }$ w4 }- X& N: {7 H
part.move(@);-- load part
: z8 v0 T! ^* k. B @.CurrIcon := "load";
6 x0 ~* S8 M2 f$ _: u( d7 y GlobalDistObj := part.globDestination;6 s8 X9 t% S" J' T
assignLObj := rgmanager.rgAssignL;
5 @% m- y8 a! O2 L' f+ D" n1 |0 Y row := assignLObj.getRowNo(GlobalDistObj);* s0 e- w5 q# y, m, p
if Row = -1 then -- since 70
$ z/ u/ H: w; v' \4 H' Q if lan=1 then1 ~6 I8 B9 t, b8 s) w: \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) H; m4 Z" V# N4 d to_str("in der Andockstation: \"",?.~.name,"\""));$ X8 \, \; _# F9 A- E
else
! q# n, Q, s- h5 l- x6 V' b! Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 P( D( G8 g% {9 t to_str("in docking station: \"",?.~.name,"\""));
! f2 z1 v2 ]6 Q! j2 q/ ]1 ~$ { end;
4 K; T) R, _9 C; Y8 Q# w) U6 C1 \ else3 U. c' L3 y) {4 g& U" w
@.Destination := assignLObj[1,row];
$ S4 ?1 _. H, q! }" ~- M' } end;
. d: q. L$ V; ]" ^% y, C z newDirection(@);
: [% i( p. Z' q- l, T5 A; q @.HasOrder := true;( x3 m( j5 [/ _/ |: L
end;7 {- Y) {, v1 s- b
end;! m) F) v! [" V0 Q& a
end; -- of the method7 q! k! l2 R$ l J
|