/* called by: entrance ctrl of the object 'track'
" e+ @" [1 a% i% T1 C) O9 |*/
% e( E% l! L3 B. a, mis2 h+ T1 k8 p g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; [2 |0 }5 k0 e! M5 n7 V6 o
do
: Y+ w( e. H+ }- m+ V# R Lan := rootfolder.Internal.Tools.AOLlanguage; h/ {4 K1 _; @( G
if current = @.Destination -- else return/ M) I, J7 F$ l+ h! z0 h
then# b4 T D) Y' }9 i! D# V% s9 G
@.Destination := void;
$ v7 X9 n4 V+ X if @.occupied then
2 Y* |+ o$ y9 E$ f! Q part := @.cont;1 q- E8 E7 G# f; c
@.transpOrder := void;
$ p. W2 z+ C5 ` S5 s+ N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ h) R" X) C: |( `" N
@,root.eventcontroller.simTime);
+ E; a5 D- E$ @3 n( s @.HasOrder := false;
6 L H4 R4 V; s$ V @.DrivingHome := true;% u3 a1 e, T+ E, |; q! b2 K. C9 W
rgManager.tryToStartTransOrder;6 a% Q, ^! h" I |& K4 d
if @.Destination = void
! G3 X5 P5 S# E1 s& _8 z then -- no transport order for vehicle @% K6 S: O c/ x- `$ r; P) O E% O
@.Destination :=
* g! H" h* L* P3 L9 x. J; l$ Z rgManager.nearestFreeStation(@,track.~);$ q, B/ w9 F0 b* g: U
newDirection(@);
& F, M$ ~- @/ q if @.Destination /= void then
$ o+ `* k% X/ l @.Destination.NumReservation :=
3 {6 U; G0 P1 h1 W @.Destination.NumReservation + 1;
- H; n: R' b! P8 M0 I. v end;0 F+ J8 u! l9 D9 V9 T" l7 ]
@.CurrIcon := "drivingHome";
2 V" C8 Q6 V5 v9 `. Q @.DrivingHome := true;( Z' {! M& E* L+ `$ O
end;* m$ g% k) t) ?2 O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' w: X) K; y9 m$ p8 m! j# R part := @.transpOrder;
- y% W ?) ]* m6 w9 B part.move(@);-- load part
4 I( t& _6 {% B; [/ b2 S7 t @.CurrIcon := "load";) I: {3 v( A4 A! x
GlobalDistObj := part.globDestination;8 R9 G; j' j! i4 z. q0 O
assignLObj := rgmanager.rgAssignL;$ ]" k5 R3 ~7 F8 ]% m
row := assignLObj.getRowNo(GlobalDistObj);3 a5 u8 w2 O5 [1 b
if Row = -1 then -- since 70" z5 Q0 L% _% E1 L; X5 r
if lan=1 then
$ Y+ i7 W! \% N* v M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( t* A/ s* S2 Y/ }2 q! z' ` to_str("in der Andockstation: \"",?.~.name,"\""));! Z) V6 M% C6 W; b1 J t1 O
else- t: w& e9 P# p" {, i, A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 X. g# F* I1 |( w& G! e
to_str("in docking station: \"",?.~.name,"\"")); * R% X, S& n5 g8 N: T( e- }
end;
B% T0 ^ `; n9 v else
$ G7 |! { l# I0 [! g, d H8 y @.Destination := assignLObj[1,row];
, }, w$ H( [, W1 T" x end;
- T! K8 t) x: }; V- H7 P newDirection(@);
# S2 J8 h+ [' P @.HasOrder := true;
8 l! R/ q5 o) v( R1 C. ~ end;
& [1 I, ?/ J8 r- G end;2 B! D7 I% t3 t2 S7 D& Q
end; -- of the method3 X/ L" p) Z1 @2 g* l+ c
|