/* called by: entrance ctrl of the object 'track'
v$ v; k- e% L" l$ A# A# z6 K*/
; B; R' d* N1 L2 Y: Eis! [" B# f# H% o8 E" L. x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) u7 @$ z4 P H- c Jdo" s: _9 A! W! [
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ n+ a e' A5 Z$ }9 {4 I3 ~ if current = @.Destination -- else return
. P' N0 {) W& q$ n& u/ f then4 e+ N8 B8 F# z6 {& m
@.Destination := void;
* L0 o# H8 |( f3 `: m if @.occupied then! \4 Y3 w! ^: |- o3 Q
part := @.cont;7 o2 O$ Q Q4 l& l& E d
@.transpOrder := void;( r! h* F5 U. P0 a6 p8 G5 N. P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, m, `# T( Q# R' ]$ K9 G! B' _6 x @,root.eventcontroller.simTime);! ^8 N/ E6 K. K" O: e* v
@.HasOrder := false;
4 U- \# x2 @$ P- K1 d) L+ G @.DrivingHome := true;
9 K L. H! ^% t rgManager.tryToStartTransOrder;# k, M/ {/ W' H, E
if @.Destination = void
" `' m. C; p+ Y! N* W, E& K g then -- no transport order for vehicle @+ f8 e2 U( E6 g8 N+ V/ ~
@.Destination :=
+ w% L% P5 H7 O/ ]9 \3 w0 U% v, f rgManager.nearestFreeStation(@,track.~);
$ k1 x# j# M, W: G newDirection(@);
% I$ s _5 i E4 ? if @.Destination /= void then
3 @: ~% U$ j- V @.Destination.NumReservation :=) m6 O) j2 y+ q8 |' o% J
@.Destination.NumReservation + 1;
. X% y$ d1 p4 S+ B end; q, w$ P: V, P
@.CurrIcon := "drivingHome";# _0 @$ o; J% L
@.DrivingHome := true;* Y9 A! U* Z% A; I. p
end;
2 v, @% ^/ G: u6 F else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& J! [0 ^& g$ m2 E- I! y part := @.transpOrder;/ X% V& U" C% ]. d5 O& ]
part.move(@);-- load part r" V1 k* h, ~& G, A5 _
@.CurrIcon := "load";- V) L s4 w$ q8 C
GlobalDistObj := part.globDestination;/ e. p+ L0 Z+ c( f1 ?
assignLObj := rgmanager.rgAssignL;' w' C- A/ I- Z% {1 Q# C4 j
row := assignLObj.getRowNo(GlobalDistObj); C, @6 N# v/ C) o
if Row = -1 then -- since 702 g8 J; S3 K( A- o+ a2 ?
if lan=1 then
* z1 O- _4 Y4 e5 v5 F. V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( R7 [7 Q4 f' j" Y! q1 S, s, f$ ] to_str("in der Andockstation: \"",?.~.name,"\""));$ `- a1 H3 i( ^ T
else
( \4 [: g4 {0 E" M1 v3 m; X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. I$ y5 ]" _* q: m8 A5 m4 B% {
to_str("in docking station: \"",?.~.name,"\"")); $ _ B d8 Y& E2 x( E4 h3 `0 x
end;6 _$ E; ?/ Q) i: w0 F
else
- [1 ^+ ?7 O+ c+ _9 Y @.Destination := assignLObj[1,row];
P/ J( D) i/ y6 z4 l+ Y7 A end;
- R' n/ w( D: A; _. g2 F2 Y newDirection(@);
- S. y! y7 P3 |" d( z @.HasOrder := true;
; U& Z; X/ r" b+ z% ~6 W/ ^ end;
- d# Y$ X% ^ K u" c/ Q% h, S( e end;
+ K* T: T n0 ^' Aend; -- of the method
. b0 z1 e$ m, G" S5 i; H |