/* called by: entrance ctrl of the object 'track'
3 g: W7 I* \0 y' n1 D M0 M+ J*/
; M u( s7 ^4 ?8 H3 yis
. ?' P9 m1 f/ Z6 R part, GlobalDistObj, assignLObj:object;row,Lan:integer;. e( k5 Y. `- x
do! O" [4 l6 o" e6 k1 I
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 @2 _$ \/ N4 ? i# H2 [ if current = @.Destination -- else return
$ s- Y) \( u t then
: S9 x7 B' A# ^7 K @.Destination := void;( W5 m# ~: v$ b; h8 G5 k
if @.occupied then
0 k, h, Y0 Y- D8 c7 I part := @.cont;: v2 U# q" e- ^
@.transpOrder := void;( v5 v- |0 g- g. t- k) w0 l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. r' H* k; ~1 B9 a$ o @,root.eventcontroller.simTime);
- y4 L; ]) A8 r; u4 |3 t @.HasOrder := false;
2 g/ T8 J/ j$ M" ]" e" e @.DrivingHome := true;
; J4 ]5 J; f; l% ^, L, e rgManager.tryToStartTransOrder;
4 B: l r* p. E3 e$ G. P4 z if @.Destination = void
$ R4 [$ i/ @6 F9 r% l$ Y5 S then -- no transport order for vehicle @
/ l3 e. h5 g x9 [/ _ @.Destination :=
8 D2 v# }3 g& j0 i6 a' e rgManager.nearestFreeStation(@,track.~);
; z+ A+ m' m! w$ L, M D1 E7 c5 r newDirection(@); L1 \6 m$ i, ]
if @.Destination /= void then6 ~0 h8 S" S( I/ I# m: e) ^6 Z2 b7 i, m
@.Destination.NumReservation :=
9 b9 x1 X3 W" h+ t @.Destination.NumReservation + 1;2 c+ g X$ l. |) M( Q
end;
+ P7 l- c. e9 \ @.CurrIcon := "drivingHome";) _. d/ C* @/ K6 W K9 j/ V1 l! _, k6 S
@.DrivingHome := true;
, D$ g; R0 T/ D7 ~+ B end;6 w! \" r7 {; S6 k- o+ N. C( d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 F* p) \6 j5 R
part := @.transpOrder;
9 R: \3 ]7 i; u: a1 X& f part.move(@);-- load part! }2 F$ j$ O3 g* e
@.CurrIcon := "load";
2 @+ |0 b' L5 Z" ~. x GlobalDistObj := part.globDestination;
+ i+ [! D" i @$ A8 \4 h+ q! S, Q assignLObj := rgmanager.rgAssignL;
. L7 Z; w/ b% x* Z0 a0 ^ row := assignLObj.getRowNo(GlobalDistObj);
- P* Z, L- |0 h! x7 P& b. n$ ~. H8 d if Row = -1 then -- since 70' y4 w2 q$ u3 a! e5 }" s1 j
if lan=1 then
+ D& Q( A- k% x& M% N# ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( c* }9 K' l* @: k& s& | @5 X5 z
to_str("in der Andockstation: \"",?.~.name,"\""));8 n! T% }+ N8 \) \7 D6 [+ i
else
7 ^- d6 Q: ^1 F, T% v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 h' G4 j% ~ U6 A4 F* E
to_str("in docking station: \"",?.~.name,"\""));
9 \: f( z( J* _% t9 u2 d9 |, E) [ end;
" [; z R5 z" d* P; A7 `- [: p. c else
5 c2 i3 A6 i/ ` @.Destination := assignLObj[1,row];
( R5 C% v& j: x- m end;
& L2 t& H/ A; C( ~' V# W4 t2 V newDirection(@);
9 B3 d, x1 R2 h+ h @.HasOrder := true;
2 C5 d N; v( a* g ?+ L0 Z% a$ g end;
* c7 d" [7 H" o end;4 D' o: k& _) F$ O
end; -- of the method
# N+ y4 w4 G z8 Z4 u; C! B% ^ |