/* called by: entrance ctrl of the object 'track'5 {: [1 A5 O0 T; J! W% f
*/
2 |" {. P3 D, P; f4 C- m& His
% m) y0 _# {7 r N part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 Z* }: r. n% S- g: X
do4 _& b) j* J0 M1 }6 P0 q- T
Lan := rootfolder.Internal.Tools.AOLlanguage;; j7 g0 D X* N1 a
if current = @.Destination -- else return ^9 D) J9 h* t" F$ I
then
8 H4 r6 o, P' b. I7 [ } @.Destination := void;/ s+ N9 |7 o* p( d4 n1 g* s! {6 Q
if @.occupied then
: ]0 G: U. ?3 m+ F( y7 P/ ?7 M part := @.cont;
9 T; L% R" H A4 { @.transpOrder := void;; v0 {0 Z, t2 e3 V! s( M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," S4 U8 D5 `! k1 D
@,root.eventcontroller.simTime);
m. V& a5 D5 ^9 W" B+ y) W+ _8 X+ U @.HasOrder := false;' O$ h- ~, G0 U+ \$ a7 D9 o3 H( B
@.DrivingHome := true;
# ]3 W, H. n, Y3 K; t rgManager.tryToStartTransOrder;
3 z, X/ h8 Z6 Y% ^" b if @.Destination = void% Z" c. ^3 A4 N; ?, j
then -- no transport order for vehicle @ Q2 |+ t: V& w4 O
@.Destination :=
1 k' ?) k! g) y( i7 s7 { rgManager.nearestFreeStation(@,track.~);7 Z- U: B1 b+ b
newDirection(@); - W. t+ m1 @- ~) M
if @.Destination /= void then
9 f, [) C6 r" L4 I; r* Z) E* S @.Destination.NumReservation :=
, h& K6 g: h3 { @.Destination.NumReservation + 1;
9 u! @, U& F) q( a. J end;
2 G8 C" l! w6 B5 z1 M @.CurrIcon := "drivingHome";
! d4 ^4 ?, |2 K c" v6 ~: F @.DrivingHome := true;" J0 K5 u* t$ f `2 o
end;
4 g$ Q. D% X) G; }' R: M else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 l, m- C4 D$ M2 r9 p/ ] part := @.transpOrder;/ [' o9 K% k0 n+ G T7 N% M+ W( _8 } T
part.move(@);-- load part3 Z: @2 X% G5 V4 y/ W8 w
@.CurrIcon := "load";8 v) @: H* c5 k6 x+ H4 Y
GlobalDistObj := part.globDestination; ?/ G+ r% t4 H B: J0 X9 \
assignLObj := rgmanager.rgAssignL;
4 A7 ]8 m+ h {0 c, f! V0 w row := assignLObj.getRowNo(GlobalDistObj);, @" N7 z- J# G7 v& P ?* I
if Row = -1 then -- since 703 c+ t' T! G, T+ y0 l
if lan=1 then: f! S" f5 B7 b/ ~7 O. g" x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 Q- F1 w0 b( g% _5 O! v2 U to_str("in der Andockstation: \"",?.~.name,"\""));
: ?* ?9 [9 V' f1 Z7 l else
* T( N) B7 m0 \. I. W$ y8 I( }( @- } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
G; m7 R* t: p% x: A7 e2 h4 ~! o6 C to_str("in docking station: \"",?.~.name,"\""));
# @. d H8 z$ G end;7 A/ k8 a+ p4 \
else
# R- x) L2 |6 r$ Z9 l' L @.Destination := assignLObj[1,row];
2 o% [; ^7 ~" ~: X( |! b# I" a end;
( {3 B) _% W, g$ r newDirection(@);
& w7 f- `- @% k& Z( a7 X- O @.HasOrder := true;/ U5 v. b/ _' C7 c7 }9 ]
end;
* L3 Z+ [" E7 ] end; F. r! f2 E, B( d0 A1 d& @
end; -- of the method
# C! L) `4 D7 \/ n |