/* called by: entrance ctrl of the object 'track'" f* |) _7 e# t w0 J# o
*/
* ?! B' l' F) }2 Lis6 A6 ^" C+ l" X% D! v( i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% s$ |9 {& i& @* g' R9 tdo5 `& k3 k- d9 t! t3 i. `
Lan := rootfolder.Internal.Tools.AOLlanguage;# t& \ \& r4 T+ p* Q5 F
if current = @.Destination -- else return; Q5 Q. ^) b% Z( w5 J) i7 y1 W
then$ B$ u% m2 Z) ~7 x
@.Destination := void;5 i/ c' O- J+ N+ V% r
if @.occupied then
( V# I1 ^! K2 l/ }& v+ T part := @.cont;
/ n3 {+ q8 u) k @.transpOrder := void;! V. a$ }5 H. ~. M6 m9 U% k
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 u9 H( R* V/ z @,root.eventcontroller.simTime);1 x: x& P9 J9 S+ b- m8 L
@.HasOrder := false; ~8 [: z8 l& E: F5 t
@.DrivingHome := true;
2 V. M& J5 ?( @" w& S; { rgManager.tryToStartTransOrder;
+ D" W; k- N! { if @.Destination = void7 g2 t- b7 |0 V+ r0 N/ L/ i, r+ G2 W
then -- no transport order for vehicle @. o v: u" s) [& k, V
@.Destination :=& N8 g. h ?9 O5 F7 B3 c: j
rgManager.nearestFreeStation(@,track.~);
9 ]7 C/ q7 M9 p newDirection(@); - N( Q- r+ E# c9 i5 S# _% e
if @.Destination /= void then
8 s* K" E' @& Q& Q+ N5 B @.Destination.NumReservation :=+ x# d7 h- ^' O
@.Destination.NumReservation + 1;
. E: H p8 |- K8 ? end;
9 h( v$ t" P& [+ ^3 N) a2 { t @.CurrIcon := "drivingHome";0 ~8 l% w# t# O6 F1 Y7 V
@.DrivingHome := true;. F3 N/ j: j/ P) O7 t; m
end;6 t" l8 H1 U+ `, Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: K0 R+ h! J+ O0 b! \1 t- Q( |
part := @.transpOrder;+ o+ T. p! q% M& W' @3 ?
part.move(@);-- load part
7 I R" n/ a& E% U2 V @.CurrIcon := "load";
8 m6 c& P, v$ a; K GlobalDistObj := part.globDestination;
/ L/ G# L# I) { assignLObj := rgmanager.rgAssignL;
' H' _; ?7 {7 z: m P row := assignLObj.getRowNo(GlobalDistObj);; l5 c) o- p9 @- e7 ~
if Row = -1 then -- since 701 j" Q% z/ f6 B$ z" N
if lan=1 then
+ L* n Y7 k. ^8 o0 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# r# ]2 w* J5 K/ H% a& ^1 U to_str("in der Andockstation: \"",?.~.name,"\""));! p4 N- j$ H2 @* t5 T
else
5 a- L% A0 a) j, a8 j$ u1 I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" j) j% C$ d) `) X' R, d4 S- b to_str("in docking station: \"",?.~.name,"\"")); ; f) c$ S: @. h3 m- F
end;3 J* R0 L# y) p) \( a* |! q3 j5 ?
else, X, }* |/ I$ ?7 W
@.Destination := assignLObj[1,row];7 t: }" R# [ _5 y' W# H
end;
7 ^5 k- o- @ R4 b newDirection(@);
8 _$ B( x2 H+ H) j& ?! X4 w @.HasOrder := true;: d$ w/ F- Y d) u2 n
end;
1 z, \2 @5 h% `$ j end;
; N. s. I% o! ~3 T, ?* |3 _end; -- of the method
- `; v9 a' W. h# w5 J; S |