/* called by: entrance ctrl of the object 'track'" r$ ]$ x) K1 v
*/6 U* s5 t( K" b/ ~- W4 m
is9 p( D" j' {% Q5 g0 ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 b9 ]& q% z) m; q) J0 }
do
, a A1 e8 {# ?# I* y, w3 s Lan := rootfolder.Internal.Tools.AOLlanguage;3 U3 X6 y* G, i# O/ U( ?
if current = @.Destination -- else return
+ q" v: W% |( V( A z( l$ q8 K then
* @0 _3 P% O& ~5 Y% ^2 z' N* `* w3 r @.Destination := void;
6 s7 c1 e4 {# c' V+ F7 N5 C) A if @.occupied then
: x' W+ ~" s8 `# Q1 D part := @.cont;
5 P. g+ B0 q- }* u+ o% D @.transpOrder := void;2 |7 p, S" X* |/ f* ]4 g* W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 A. `& u3 S! i
@,root.eventcontroller.simTime);( v# ]2 ]; l& h
@.HasOrder := false;) R: p: o/ M- ^! a
@.DrivingHome := true;
) k, ?3 _7 }0 n I6 h* x rgManager.tryToStartTransOrder;( U: ^5 K* i( I2 ~
if @.Destination = void
- O' v1 _7 h% Y then -- no transport order for vehicle @
7 K% D- t9 W- O; @* A @.Destination :=9 R- K2 ^2 i; B- U& t; R& G5 ]
rgManager.nearestFreeStation(@,track.~);
+ T! t+ r5 E# P7 { newDirection(@);
& ?3 X* A5 k4 t$ Z) t0 X8 ^ if @.Destination /= void then
% x4 x3 v% m' I, W7 y) T2 R- L( ~ @.Destination.NumReservation :=
5 ^/ w9 L9 u" L# g @.Destination.NumReservation + 1;
# ^% W# K4 {4 |0 J8 }0 I2 j end;/ n. I! r$ M' }4 a7 J
@.CurrIcon := "drivingHome";
1 ]5 j9 i! [: {0 X% m( U, N @.DrivingHome := true;
6 B9 u/ }; L( P! O2 A+ b end;) X5 N7 o( Q. E# ^5 O$ K3 Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 U2 R1 e. w& D: O
part := @.transpOrder;7 x( B$ c% A" Y7 O) k6 L; _$ v; P
part.move(@);-- load part
]6 e' K3 ^2 ~+ m9 S% a @.CurrIcon := "load";) G2 [1 i0 E, I% q- R
GlobalDistObj := part.globDestination;: O9 m' ^9 }. N! m* [
assignLObj := rgmanager.rgAssignL;
2 b; U1 S+ Z1 R! w row := assignLObj.getRowNo(GlobalDistObj);
& w$ @- k a1 ~1 _# G {3 q if Row = -1 then -- since 70, B6 O; |7 [: h E5 y$ K
if lan=1 then
! c, M3 @5 ?: @" k4 L5 E) C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 s" u }6 k8 N: b/ X/ k
to_str("in der Andockstation: \"",?.~.name,"\""));7 m' @) ?! `1 E* m4 C7 T3 O$ \9 h
else
/ k3 L% H; }: t- R3 E; c7 s. s: i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# H; O6 S/ H. y/ Z0 \3 W
to_str("in docking station: \"",?.~.name,"\"")); / X: t0 x% K' }0 @/ ~9 i
end;# @7 p* |% f/ Q9 a
else |" x7 e7 t; {* d
@.Destination := assignLObj[1,row];
6 s7 E( o0 G; Q end;
" ]( A \5 @: H& P5 ? newDirection(@);
8 y) y O+ v/ f A( Y @.HasOrder := true;/ G- Y& p3 q& U0 c, q) I0 N" ?
end;
7 G/ n+ P7 x- A; F4 S. }9 | end;
. g6 B& \1 @7 f9 y( Vend; -- of the method" e0 |# }' k" H" _6 m
|