/* called by: entrance ctrl of the object 'track'
( Z; Q z0 y9 f: z! W# S*/
: H* R5 |5 Q9 \# ois
+ N) P; W9 x0 A$ T3 F1 A part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 d$ Q u7 _, l" O( ^4 q5 {5 Bdo
1 k; ]2 b1 K% L' I: ~ Lan := rootfolder.Internal.Tools.AOLlanguage;/ @0 K1 q+ K q* s& T3 q
if current = @.Destination -- else return
( ?8 K W/ G1 j! @ C5 l then
' `. {4 B" w9 p; o @.Destination := void;
! a7 t, i) A9 o* [6 i if @.occupied then5 s( ~3 \& ]+ j3 }
part := @.cont;
" _# Q! V5 f% D, x' b @.transpOrder := void;
! @, B9 Y' _* c4 s- j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 W" p) t, A3 c3 |, w @,root.eventcontroller.simTime);+ V; p- v4 K3 S/ L
@.HasOrder := false;
) `# F# h; M, J( D% T2 {* F; @ @.DrivingHome := true;; L: h. t8 L- l) r4 ]9 H
rgManager.tryToStartTransOrder;
* o. g# F7 W8 S$ e2 [1 W if @.Destination = void
8 C2 [' G5 [ A. u4 Z/ l9 f then -- no transport order for vehicle @4 A2 \% r7 _( H0 O: _2 O& T
@.Destination := t2 H3 C9 p( O& s. D
rgManager.nearestFreeStation(@,track.~);! T, t3 T# R! I& p: f
newDirection(@);
, [, d6 [; P& X& P* t if @.Destination /= void then
) E. H' y3 N# v! D# y9 y' n4 _ @.Destination.NumReservation :=# t$ {1 d% C( P" t5 j
@.Destination.NumReservation + 1;0 v4 g2 X- l4 q) q E; T
end;0 E; m& Z* c9 p7 W* e/ }
@.CurrIcon := "drivingHome";
0 F/ s5 S* a; n( t; ]% L* C& t @.DrivingHome := true;
4 i& ~6 N* ~+ B/ _ end;
+ |0 e5 C' H' v' g* s n# i else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 e) w/ d7 [8 k8 @3 G, \3 v5 H3 M8 j: v
part := @.transpOrder;" }$ V: V9 b0 ^0 D) X# F
part.move(@);-- load part
) j* S; Q. h9 q, f0 n @.CurrIcon := "load";
0 Y# f& [9 M8 l# C Q: R1 Z2 i. Z GlobalDistObj := part.globDestination;
* [9 g' ]5 i9 P+ I assignLObj := rgmanager.rgAssignL;
5 ]; C+ B3 @! r0 u; B row := assignLObj.getRowNo(GlobalDistObj);+ ^ T2 \7 h- ?4 L+ r+ m
if Row = -1 then -- since 704 Q& J5 [# F# ~( {! Q
if lan=1 then
" k+ B8 k. \1 y6 P3 }; ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 @2 C+ p% v6 \, _1 y5 @8 E to_str("in der Andockstation: \"",?.~.name,"\""));! s& |/ {2 F* `; `; n
else* X' z, C5 m) J# H! _& g3 R' V! e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* h q8 h$ D9 k7 d' a% u- K: v
to_str("in docking station: \"",?.~.name,"\""));
! c; Y! f- Y2 ?/ \- J end;1 C! B A% m! N. {1 r2 e
else; S3 R8 A+ C( z z1 T
@.Destination := assignLObj[1,row];
|4 u& _1 Z, ?" S& s end; , ~' R" t/ b6 B; R& _- s( t
newDirection(@);' z4 o9 b5 {, f7 d# S N4 \2 f
@.HasOrder := true;
0 D, N* o0 N2 h3 F end;
9 H6 L* [2 D. \ Z+ b5 ]3 f end;! l3 [7 w$ W9 R( n! e' \
end; -- of the method' f& `* P+ j9 p* c
|