/* called by: entrance ctrl of the object 'track'8 ^: ^- \+ E3 N0 f, d1 d4 Q, j$ `
*/
0 K/ h/ J4 J f; Dis2 K) e+ h1 |) D
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. x: ?, b; `7 F! h
do& ~# P3 ]) J# h- f5 |% D2 [5 V$ ?
Lan := rootfolder.Internal.Tools.AOLlanguage;, E0 U6 R2 W, O2 L
if current = @.Destination -- else return$ ~9 M( m, V, R) m5 s8 Q
then9 e5 l k$ ]. A! {: E' C
@.Destination := void;6 E# @, Q1 h! r- A) n2 o
if @.occupied then
7 b4 h' `6 u9 \$ o part := @.cont;& S9 m1 w( V" i# ~
@.transpOrder := void;- ^5 N8 w3 \8 J. l( g5 R2 l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 O! Y0 }3 J8 B3 W' Z: D$ s4 X' d @,root.eventcontroller.simTime);- Y. b$ d5 m2 I9 ]3 L2 O2 \
@.HasOrder := false;
5 I3 U* J) u/ |1 c! l; W @.DrivingHome := true;" I6 w6 _. n( E' d4 @
rgManager.tryToStartTransOrder;0 x L$ H/ N; P0 o
if @.Destination = void
: l5 \6 B. e( u7 o) u then -- no transport order for vehicle @
# p0 K% f' D7 ?1 V* b/ j, T/ e" ` @.Destination :=
2 p* G F: B) Q rgManager.nearestFreeStation(@,track.~);( [! s; Y3 j! f: U7 g
newDirection(@); ( V. } E+ T2 P
if @.Destination /= void then
' ?" d0 W7 S) r% j8 q2 {2 m ?5 R @.Destination.NumReservation :=( }1 v8 ]- e$ M
@.Destination.NumReservation + 1;
]# T y. L7 E& z end;/ c. d* f% z- B* S- i. x
@.CurrIcon := "drivingHome";- i& N. _( b( a
@.DrivingHome := true;
: k! P9 E& s% M( c end;
$ s# A2 Y0 t' j2 F' T+ G R* v else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ |" A$ _, U/ L, u8 C2 Y: \ part := @.transpOrder;5 ?, C F2 p( t
part.move(@);-- load part( z# F5 u# B( b: }7 t5 ?# }
@.CurrIcon := "load";+ o0 }& |4 p7 B6 e- C- x
GlobalDistObj := part.globDestination;
' n5 z1 o" ]6 P- ]* @% j assignLObj := rgmanager.rgAssignL;
/ h! }# E" v. t row := assignLObj.getRowNo(GlobalDistObj);7 R. C- Z. u- k0 ~5 |" g4 n: N
if Row = -1 then -- since 709 N5 e5 E9 j% F
if lan=1 then
6 `7 F5 {0 u d Z3 m9 {/ t, [- k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, u$ H, m& Z5 H$ z% l8 v8 G6 m+ S2 q to_str("in der Andockstation: \"",?.~.name,"\""));
# A8 B. J& g: s0 w9 U else
' P1 x* b6 Q1 p5 ~: | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 r* w2 k6 M0 ~9 n2 [. d
to_str("in docking station: \"",?.~.name,"\"")); , w5 u, V$ ~0 t }7 D6 ~0 @5 t5 X
end;
: D+ B6 |+ j0 [4 u else
2 }+ u; B: H W; X @.Destination := assignLObj[1,row];
3 Z: \( ]7 n% I/ @5 m8 G end; + ~( C' n ?* @) U
newDirection(@);2 L+ y; Z( ^" P. l$ C5 Z
@.HasOrder := true;
4 q U1 d/ A! A$ i- p9 F! a end;0 y- w* K; ~3 M/ e) ?' }
end;" n+ w, {$ Z$ F1 B r2 }# c. ?& ~: t
end; -- of the method3 C/ t/ k" J! p6 U1 O4 {4 O$ m' B
|