/* called by: entrance ctrl of the object 'track'1 h2 P& c1 I! [/ c+ q# `& ?( Q' g
*/
3 b9 ]2 m: X0 }4 y7 s& s: Gis
- W+ o. \" L+ x( W2 @0 }9 j part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 P# |( L% S1 p
do0 U7 t( Q9 N! w1 @. ?. |& n4 {
Lan := rootfolder.Internal.Tools.AOLlanguage;0 H' k$ A* U7 w: b
if current = @.Destination -- else return. F( E. [7 S- J: j7 H
then; g4 d1 |- Q5 R5 n9 O5 u
@.Destination := void;
0 } d8 n- [* p* e; D/ ? if @.occupied then3 d. k, F4 \ v* J3 x
part := @.cont;$ L: U/ g# s' D" w: b
@.transpOrder := void;6 i. `/ R3 B% o0 S5 g7 u0 m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: E, w4 i$ g. b0 [' i9 E
@,root.eventcontroller.simTime);5 L8 q# [& R; U8 b" j
@.HasOrder := false;# v5 p( j& O* G9 G- c1 q0 i
@.DrivingHome := true;" r/ e% H* S6 i
rgManager.tryToStartTransOrder;$ I) `8 k( ` H+ |3 _9 n8 I
if @.Destination = void* o, Z9 t1 C, Y6 \4 ]* L
then -- no transport order for vehicle @4 Z _$ b) ?6 o# j. l8 r/ g
@.Destination :=
& }, P/ j9 S3 X% x2 q; s, L5 }! n rgManager.nearestFreeStation(@,track.~);9 h6 c) Y# `6 b: a- @! i' b
newDirection(@);
& }$ m5 J5 O% x3 b+ Z. P. ^ if @.Destination /= void then
* U& Y* X2 N8 R6 k) G) p+ K @.Destination.NumReservation :=
2 U; r6 i0 P; h) X5 t( R) i @.Destination.NumReservation + 1;+ _* N T! h& d% @
end;+ d/ T- @+ q2 H8 m/ ^/ h
@.CurrIcon := "drivingHome";: ?2 M! E. |. z8 J% |, m6 n
@.DrivingHome := true;9 A# ^ w7 n+ M9 N5 K$ b$ k3 `
end;& F$ a" @- I* U, U$ n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ D% Y5 b" C0 ^5 D4 K
part := @.transpOrder;+ ?7 B* C k1 G% O8 A
part.move(@);-- load part
/ K3 `2 G& Z" y9 p: T4 J4 |2 O @.CurrIcon := "load";
& H6 g/ Z4 X+ ?3 v5 z- ^ GlobalDistObj := part.globDestination;
! g0 c. N4 H8 c7 [6 v& \ assignLObj := rgmanager.rgAssignL;/ H n: j- `5 h- g J% q4 i
row := assignLObj.getRowNo(GlobalDistObj);4 a9 P* o& w% \/ ~
if Row = -1 then -- since 70' C; d% [# m7 {# |$ U$ x
if lan=1 then! C/ J0 g2 k" n7 W& U" N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 p9 r5 t# T& S to_str("in der Andockstation: \"",?.~.name,"\""));
( R5 ]4 j% S; Z, g else' G$ q% e) f$ n; \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; o; B. J$ M, P, Z9 y# M: z I0 @ to_str("in docking station: \"",?.~.name,"\""));
( u- |2 v3 J5 }) B+ f end;7 a, M/ o2 {' y, O- k$ m
else4 G5 ?& c* v# b: t
@.Destination := assignLObj[1,row];
; M9 _$ h* h2 b B3 q9 t8 Q- w1 ^ end; 3 i4 r5 g7 d: j2 x3 A/ A# |
newDirection(@);
: }, \9 K- R4 @+ d/ G! k; n @.HasOrder := true;" a" J7 Q7 Y4 R( Q8 W
end;+ b* |% u& W4 a
end;
4 t. O# m6 t# @! D- gend; -- of the method
% a' Y8 z, c9 U) \% j% B |