/* called by: entrance ctrl of the object 'track'
+ f& y. I3 I: m' E7 p*/
K6 x1 {; e- S" e! U9 Nis- s/ I9 a9 Y1 ~' g% I" H3 j
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 r+ G/ C" E" s6 Fdo
[1 B8 E% a9 C/ L, ~: {. p7 ] Lan := rootfolder.Internal.Tools.AOLlanguage;
& B4 M3 V: s9 D if current = @.Destination -- else return
" Z4 k! g+ G) g then
8 Y/ D4 @2 \. c! d/ d# O3 W4 i @.Destination := void;
% e6 {, T" c1 v; o. f if @.occupied then! r5 }& r ]7 X
part := @.cont;
- r j3 {- c0 m- i1 A- U; O @.transpOrder := void;
) q$ ?- h4 ^; b! Y i ?1 ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 ^9 Y+ o0 a6 m! G, e
@,root.eventcontroller.simTime);# X1 `* \5 l: o+ e8 A
@.HasOrder := false;; M6 k5 D7 g* d) f) S
@.DrivingHome := true;$ N0 M' J% S! `+ m6 B
rgManager.tryToStartTransOrder;
8 C/ ?% a; t7 Z( _& [, _ if @.Destination = void( z& y1 A" y6 q- |% }
then -- no transport order for vehicle @' B8 Q5 C2 i( _3 X
@.Destination :=7 \, m+ @7 k3 q# X0 o3 c V9 @
rgManager.nearestFreeStation(@,track.~);' J# O7 M% O$ O8 S3 C
newDirection(@);
0 Z+ {% s/ M! k if @.Destination /= void then- Y- L2 b/ ]; M0 B# M+ R
@.Destination.NumReservation :=0 C" k& L7 @2 `9 h- d9 s4 `
@.Destination.NumReservation + 1;
, W; F _+ y$ ?# c6 @( A end;
. A3 M* {. f. T8 s: F @.CurrIcon := "drivingHome";8 y) s$ r0 M& c3 [" i( m
@.DrivingHome := true;
! G3 J! u" a! X* C) z4 b end;
3 m: D9 I5 j8 d& ~! M else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 @8 C* B# Q6 v5 j5 u; u
part := @.transpOrder;
+ U9 |6 T5 ?5 [7 q6 c( T part.move(@);-- load part G) X) z- i- i% S2 F4 W9 i
@.CurrIcon := "load";: A: c( ]( q0 i" L" d s
GlobalDistObj := part.globDestination;5 X- C/ p0 a) s- s- s' m/ i
assignLObj := rgmanager.rgAssignL;9 U7 e& [7 p, N, Q. P! U
row := assignLObj.getRowNo(GlobalDistObj);! Z5 q# [+ Z1 C0 m
if Row = -1 then -- since 707 k. B7 d r* Q
if lan=1 then
8 i4 K, R1 P: \4 r9 D+ [$ V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 _4 S* E7 d+ C
to_str("in der Andockstation: \"",?.~.name,"\""));
$ ^7 {6 c+ Z6 ~# F+ B/ f else
* c6 u/ x/ U6 C9 _# u4 G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. }" w+ A; |5 F, D) [ to_str("in docking station: \"",?.~.name,"\"")); $ s1 R6 x& o' y+ A: f, P5 M! S
end;4 @; Z# F# @9 u$ o8 i; g$ S0 m
else. `& M4 M* F5 K1 M
@.Destination := assignLObj[1,row];
' v( {7 Y1 e* W" X: r% v& z2 ` end; ! J+ Y1 @6 A/ t, a: [
newDirection(@);
5 g3 c8 Y7 e H5 L( u: | @.HasOrder := true;
, {( `/ v) I+ v8 ?% k6 v1 X g; F end;
2 V0 w. W4 p" Z8 D9 ?# t3 a: P end;
4 L9 h5 v2 B7 T0 v9 M% y) e. ~" z2 s# gend; -- of the method
- h H/ P" x4 {8 E y L |