/* called by: entrance ctrl of the object 'track'
% r% i% O/ K" ?& d3 F- H! r*/
; @% x4 L% A. h0 Pis
/ y' [& _1 o( O3 _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ n* I8 U3 I9 t! N
do
. b) f( [7 U1 O' l Lan := rootfolder.Internal.Tools.AOLlanguage;* w/ c- k1 G5 m6 @1 T1 _
if current = @.Destination -- else return
$ g9 C6 F: z3 D& v then
8 m0 Z- I1 k E+ D @.Destination := void;
, @% Z6 H: \$ \+ S& T if @.occupied then
; Y. }/ D' t9 G) n- n5 l) T8 \ part := @.cont;
0 S9 ^( i$ N) ]( l @.transpOrder := void;
& _) b+ P; ?" Q5 S( J7 n0 G part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 m0 c2 t5 X$ U* P @,root.eventcontroller.simTime);: w( l$ M+ h& \, F+ S/ K3 l
@.HasOrder := false;( Z3 g/ L0 p6 i) n% v9 W
@.DrivingHome := true;4 [6 W& w' ]* z, j2 S
rgManager.tryToStartTransOrder;
5 }2 f/ t/ G: Z3 v# M0 A7 I5 b2 [ if @.Destination = void
% h/ m2 t9 u- @5 V then -- no transport order for vehicle @
- J- v+ H3 n6 V3 P9 D: m( p @.Destination :=" j/ Z8 T7 C/ q; c; P
rgManager.nearestFreeStation(@,track.~);2 j% z4 @- J+ ~4 R
newDirection(@); # C: ?3 h r7 o" v- C
if @.Destination /= void then! O; c7 O0 D2 a; X. q* q
@.Destination.NumReservation :=
6 D H3 g9 I3 ^# R- L @.Destination.NumReservation + 1;2 L6 C2 Z5 o; j ^. a7 e- q
end;
5 U" J+ t( o6 F z& C' i; ^ @.CurrIcon := "drivingHome";* N: R* a& E5 g. ^5 B5 _% \1 J7 Y
@.DrivingHome := true;
2 U* j# o) j! k1 M% I7 Y6 p2 Z end;
. l1 u! x+ Y& b else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 x- @$ b* Y1 J$ c0 v' t part := @.transpOrder;1 c9 m+ ~! f! W F' c
part.move(@);-- load part; n9 b+ w' f( m9 T3 e( M
@.CurrIcon := "load";
% i: f8 s) z" H- S. G X9 n8 v) c GlobalDistObj := part.globDestination;
. v* x- C' Z. [8 c assignLObj := rgmanager.rgAssignL;% l4 `5 `' @- r9 Y# B# d9 X, Y2 u1 Y
row := assignLObj.getRowNo(GlobalDistObj);
8 W0 c" }- G) f7 W `8 F if Row = -1 then -- since 70
# [2 G7 z7 ]4 L/ {' ^2 ?9 k7 p* f if lan=1 then3 t" ?8 ?) a1 F' R; g' V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ \) k- d+ t3 D
to_str("in der Andockstation: \"",?.~.name,"\""));
7 B V; z1 t% ^! m5 c else+ m. V- \+ p6 ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! P/ |% n3 I1 o" K( [$ } to_str("in docking station: \"",?.~.name,"\"")); + l7 p& t) z0 s4 e3 t4 T2 t& R
end;; i6 o4 V- q3 C9 R
else
! o: C5 Q/ C* Z: N8 [ @.Destination := assignLObj[1,row];0 ?+ e- @" d4 W3 b1 B
end;
7 ?" O8 C9 X. h newDirection(@);
5 V/ t2 X' j3 {0 S$ r5 l1 p, G @.HasOrder := true;
2 W5 L! X/ z) l& H1 U end;- p0 [9 c. A; G3 e
end;9 Q% w* U; [9 E, g, N5 @9 p
end; -- of the method, o0 \+ `5 @1 W6 v
|