/* called by: entrance ctrl of the object 'track'
8 j/ C$ u2 J# [& a( i. f*/! i/ i C! h. x6 r
is6 u0 g- K4 o3 |2 `! b0 S* H2 L& h6 H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: {% K. T- K; P4 ~- M1 v
do
) |7 r2 O0 i$ J4 k: c Lan := rootfolder.Internal.Tools.AOLlanguage;" A# V) ~2 C4 ]( p
if current = @.Destination -- else return0 _- U) R$ j0 k9 I
then8 H, @4 w/ D4 h
@.Destination := void;$ Q. V! ~1 N7 S$ O" w8 ?9 ?
if @.occupied then
# y t5 D+ D+ f7 M( v part := @.cont;: H/ k8 D- D+ d+ F7 n
@.transpOrder := void;2 B1 o r i9 ^9 K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ U3 j8 M( Y0 _1 r @,root.eventcontroller.simTime);3 I% f e5 H/ h/ X3 v7 s" F) I
@.HasOrder := false;0 K3 O9 i3 N P. `6 n
@.DrivingHome := true;! k0 t4 s+ Z2 C; W2 r
rgManager.tryToStartTransOrder;
* `' t4 e! o) m F1 S if @.Destination = void
/ i! B& q* ^& z. `4 a! u then -- no transport order for vehicle @
) m' H0 q+ W1 f% f4 M7 | @.Destination :=
; Y3 f/ g3 |( `; Z7 g. ~0 r rgManager.nearestFreeStation(@,track.~);3 {" K' ~+ z) F
newDirection(@);
4 Y3 x& l, Y7 d if @.Destination /= void then* K* B( b! N( m
@.Destination.NumReservation :=5 s0 n, u8 [# U2 p0 O I% o5 |7 H8 @
@.Destination.NumReservation + 1;
5 h1 ^( b4 ^* w1 V4 S1 m6 M8 `9 b end;' b/ ^6 t* U9 ]
@.CurrIcon := "drivingHome";
( z8 Y* v. P/ @5 m `7 C @.DrivingHome := true;" K- v2 j: \( z6 `( J5 D* J& [. e
end;
$ [+ p) f! @3 T+ g" ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station# G6 V2 S# b6 r& X F+ N: ?. p
part := @.transpOrder;
# C& ]$ y; K; x# P, _9 P9 w* c6 s part.move(@);-- load part
5 o2 a9 C0 ]/ J9 O T' y @.CurrIcon := "load";
! N7 i" L7 Z5 `( {% N" [' v) V GlobalDistObj := part.globDestination;
1 q d, C, g7 a% _$ S) f2 C assignLObj := rgmanager.rgAssignL;
4 `( E" Z: K) J/ a9 K' `$ y row := assignLObj.getRowNo(GlobalDistObj);
% C6 D2 F: f9 a; S) v1 I4 D# R if Row = -1 then -- since 70
& [. e a9 W' u, ~* |8 a" h if lan=1 then
5 I" h W& J9 y' y' F: R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 G5 _" `$ m% E! Y. d to_str("in der Andockstation: \"",?.~.name,"\""));
* _/ _9 x3 n% x% B+ E1 ]* C$ V( K else$ ?/ g- J$ l0 a* M( c, x$ t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, p0 v* y9 h% D, K. I, F! M
to_str("in docking station: \"",?.~.name,"\""));
/ g5 D& T3 f8 L0 S! d end;
0 n3 Y# J) V9 | F) L else
# f, {( X1 Y( ^# R- D% p @.Destination := assignLObj[1,row];% n9 m0 T+ w1 N2 M8 ?
end; / ?" |" ^& p! |8 H
newDirection(@);/ z* k" X/ w. N. G# M' j7 {
@.HasOrder := true;5 |- @; C7 Q3 I
end;& E6 \$ k3 s& c: f; P+ Y4 S- H
end;8 T% S a& d( d; n+ h
end; -- of the method
2 p; _3 _8 |; b- x |