/* called by: entrance ctrl of the object 'track'
$ q9 ~- l8 l5 C: Z" S*/
, ?# r" b: X' v6 Y* g! `is
4 f( z! e0 w+ f# G. ~4 _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 m; E2 N. C: }
do7 x; w; ^8 H# r0 X' Y: z3 f0 _
Lan := rootfolder.Internal.Tools.AOLlanguage;- k9 }8 V/ A! T$ M
if current = @.Destination -- else return
3 @/ t$ G5 _) C& L2 { then. p5 _! T |) H: H W5 l' K
@.Destination := void;
7 Z5 i l: x t3 G0 k/ Y if @.occupied then
l) v+ F4 p6 D. a* I: N8 f3 D! ^ part := @.cont;9 H2 x8 c/ U; f/ C. H8 P) e
@.transpOrder := void;
3 {. [1 V* q0 i) l2 W: H+ S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 u8 a* A% L9 f% a
@,root.eventcontroller.simTime);9 b H4 g! c- e, v9 c6 H6 S
@.HasOrder := false;
. N/ h, n i" v& ` @.DrivingHome := true;" }$ Z7 D4 z8 i( H( d
rgManager.tryToStartTransOrder;
4 \4 b z9 u- p+ q8 R if @.Destination = void1 o- @* w3 Y9 b& k, |7 }! [
then -- no transport order for vehicle @# U2 `- X% d: k$ D( j' V2 b
@.Destination :=. V3 H) C: W9 @* c
rgManager.nearestFreeStation(@,track.~);$ \. U" S: r$ F/ ?0 X' [# I
newDirection(@); 9 H9 s' Q% t9 O: }0 t/ I: D
if @.Destination /= void then' L; T1 o* G% \6 v2 B( B2 y
@.Destination.NumReservation :=5 C3 F1 u! }+ l3 ?3 B
@.Destination.NumReservation + 1;
9 m5 Y; k6 [1 q end;
/ L! p- B& q( x" V5 O! V @.CurrIcon := "drivingHome";; d7 u+ S0 S# K6 |+ C! V# z
@.DrivingHome := true;+ \$ U1 L; R+ i% O! v+ d
end;, D E9 P) v/ M% y5 C4 ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 o/ h4 q. ^) C part := @.transpOrder;
# i. o% p5 S! s8 J+ H$ X: q part.move(@);-- load part4 x$ ]% b3 D+ t3 i6 H3 D2 Q
@.CurrIcon := "load";) i- ]. n$ y* P$ b) a1 d
GlobalDistObj := part.globDestination;* H2 C) G0 R5 Y: Z, l
assignLObj := rgmanager.rgAssignL;; f1 K# j9 A' h- D8 z2 [& F1 n% A1 O; j
row := assignLObj.getRowNo(GlobalDistObj);
# ~2 Q, @9 G1 a5 Q+ G1 c( g2 n$ g/ j if Row = -1 then -- since 708 B1 S+ O! S4 O# {% @- [% P8 ]; P5 c
if lan=1 then# Z+ t8 W0 Q! x C% F/ h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' O4 Y0 e9 c. x$ @* E0 u) Z2 n to_str("in der Andockstation: \"",?.~.name,"\""));% d6 r0 v: ?5 p b- c
else: m' |; h- v, Q2 h+ J& [& X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' n6 B2 e( g% c( F to_str("in docking station: \"",?.~.name,"\"")); - o. P& E6 t9 N; y* G! H
end;- O9 ]6 e. o& ]1 g* ?8 L* p
else
J* S, q+ V& R6 R0 j3 P @.Destination := assignLObj[1,row];% M o; F+ R; t. v5 U. J7 q1 K0 P
end; . A& |+ }" X3 R" P$ R
newDirection(@);
( W0 d: U$ z7 ~* O% l7 |# t @.HasOrder := true;& w8 e% U/ _& O) N9 f
end;: V4 _5 u5 V- X8 J' |5 o$ s
end;/ D- c) e6 a2 v9 b# V B2 U" F+ g4 p" R
end; -- of the method
" K& A- c2 r, C |