/* called by: entrance ctrl of the object 'track'
1 x6 H4 [7 A3 {+ _+ j, }*/
$ f9 `3 r* q# v- Qis5 O# M4 j) @, O9 Y0 O2 B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
k; ?+ x' b- a" q, F3 R! \do
& S$ f1 o% i$ s3 V4 t- d; ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
# ?, f. z/ n& k8 E- o# o ` if current = @.Destination -- else return# O/ S* t6 J5 c7 ?% R) n
then% v) F# a1 H( j1 B5 K U
@.Destination := void;" e ?+ c/ w2 z9 X' ^; S
if @.occupied then
. ?4 U# a% o. g* r; u4 L& T part := @.cont;
! ?5 l( N1 \/ R; O- ] @.transpOrder := void;8 V! O) u/ y9 x3 L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, c1 O J# r! W4 Z @,root.eventcontroller.simTime);9 k9 ^1 K5 A3 p
@.HasOrder := false;
3 `6 @; B1 w v0 u! m @.DrivingHome := true;
( v) I: o! e- d# w3 P/ @% X rgManager.tryToStartTransOrder;2 B, ~7 `) R' Q+ k; t/ f
if @.Destination = void2 i8 T4 u* y. ^3 ^
then -- no transport order for vehicle @1 m5 f& M2 D' M o
@.Destination :=
. F- H& `# j n+ T; ? rgManager.nearestFreeStation(@,track.~);- H# Z4 ?5 Y7 V4 P5 J& Q
newDirection(@); : u# D( p" |7 y$ K
if @.Destination /= void then$ n7 D3 W0 t# ?) l
@.Destination.NumReservation :=
}8 j A. c/ _1 q. @9 |0 x: C @.Destination.NumReservation + 1;
& f g8 ` L e; `. p: u end;
% }1 s3 H5 F# G. L* O+ z3 D @.CurrIcon := "drivingHome";
- Y4 ~# d( z, U4 T @.DrivingHome := true;
5 J, ^7 C! z) }9 [9 U end;
1 ~- E* i- T+ m! @- E- g' x. e else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 N. r* y; | P
part := @.transpOrder;& C8 f) E6 u# ^
part.move(@);-- load part2 W1 t9 j/ u5 e# h* U. r
@.CurrIcon := "load";; Q( Y7 G4 f, k; L3 H7 [' j
GlobalDistObj := part.globDestination;
8 f! M6 J4 c5 k" H! P1 F, Z assignLObj := rgmanager.rgAssignL;3 M$ G( ~ e J" ] R
row := assignLObj.getRowNo(GlobalDistObj);
. Z2 P0 `8 a. J# X. v& M if Row = -1 then -- since 70
9 Y0 e6 w# f8 C, Y/ J( n- t if lan=1 then" ~+ z' W# Q2 e. E! b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 D2 G4 v0 t, v' e$ D I
to_str("in der Andockstation: \"",?.~.name,"\""));
1 q! V& h* z2 ~2 A else
. \* x7 L5 ^0 g8 I b5 T7 w; [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 s; M6 @+ B' h
to_str("in docking station: \"",?.~.name,"\""));
7 s9 u6 r3 e/ ]. b% J2 h) z) X9 Q1 A end;( D- |3 \" E, f- Y/ Y( m
else: \ `+ [% N$ w$ ?: w
@.Destination := assignLObj[1,row];5 p: k5 t8 H: m8 d/ g4 ^
end; + n* M$ s# |4 z+ [( W1 B( f
newDirection(@);2 I) h m5 ?4 f; r/ G3 F
@.HasOrder := true;1 j B0 }1 U h/ I, F) W
end;: l* H5 T1 ?; |! c: c+ V, P" h
end;* s @' _( v6 g& Z: a+ Y7 Z
end; -- of the method1 {2 \4 A) R+ ]* b2 C" g* h0 S
|