/* called by: entrance ctrl of the object 'track'
% X7 F/ ], W! G7 Y3 C# M*/& h& L5 K0 W' ]$ x
is( N- D" ~9 Q) V. K* _: ^" _- }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. i1 q% @4 S8 V+ ?9 ?- N3 D# Ydo
3 V7 |0 Y) ]" a5 j' i Lan := rootfolder.Internal.Tools.AOLlanguage;" k! h" J# a. w5 k9 f4 `
if current = @.Destination -- else return
" k) G% j4 v \9 w; n9 G$ d6 ` then
# R( x) T8 o# z0 W' k @.Destination := void;
# i. H, y. L( b0 X$ C1 ^ if @.occupied then( D& q6 E7 m; {1 ?, d: {# H
part := @.cont;
/ j, ]) P E0 V+ M1 r1 a( C. V @.transpOrder := void;2 R$ R i6 v. y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 c1 h: g L- U: ], n7 r
@,root.eventcontroller.simTime);
3 S- j* E* f+ C @.HasOrder := false;) s* t6 _0 s8 w4 X1 Z
@.DrivingHome := true;
( D- }5 i; m0 A3 ^ rgManager.tryToStartTransOrder;
, o% D3 \# r* j4 c' W$ K/ Z if @.Destination = void ~. v1 W1 y8 ?+ e9 c8 }2 O4 p( _
then -- no transport order for vehicle @$ o4 K- a0 X) o8 r' S, A9 s8 Q
@.Destination :=
: I. v* I0 O1 n+ k0 ]) ` rgManager.nearestFreeStation(@,track.~);
" V0 \+ e1 |3 B9 G4 \0 B newDirection(@);
_+ e$ Y$ ^+ ~: T, t8 P5 ^ if @.Destination /= void then0 f1 T5 A8 q2 W' @. W" E, s
@.Destination.NumReservation :=8 d: V, _8 ?4 Z
@.Destination.NumReservation + 1;2 E" K+ O# { i, ?% Q3 j+ ?
end;! `; q+ W2 |4 ]! e. U* s; Q
@.CurrIcon := "drivingHome";7 G; o: H G6 n# f) @
@.DrivingHome := true;; [8 p" w" J3 ^: C9 k/ X3 n
end;
" ]6 V$ c4 {7 t1 _+ B else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% Q$ r/ Z+ I E% W part := @.transpOrder;* B( D N3 C' r& l
part.move(@);-- load part
7 c& S( a% G4 D8 i. g" h% a0 j @.CurrIcon := "load";" [ }$ s; s' ~: s3 k
GlobalDistObj := part.globDestination;
8 k+ U8 \3 _- G) b- q' H assignLObj := rgmanager.rgAssignL;
" c7 a$ Y# u+ U* R) Z# B row := assignLObj.getRowNo(GlobalDistObj);
. D0 ^- H2 u2 c7 k# e if Row = -1 then -- since 70
[+ a9 b/ B0 b" j) g) O3 t1 i if lan=1 then) T, P X2 q1 X, c+ E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ @" o3 w, e. U
to_str("in der Andockstation: \"",?.~.name,"\""));9 R, D/ v; K' J# y3 U: N
else
5 u9 o) I! c- z( r0 ^. z: M f6 ^5 ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. ?, o& {7 W! y6 o
to_str("in docking station: \"",?.~.name,"\"")); 4 ?& ~. r3 d, P. E8 L& T# @. ?- d
end;
& j+ W: Y8 N3 X G! ?3 Z; v else
# }1 B2 f1 Q0 ]; |1 ?, H @.Destination := assignLObj[1,row];9 k- g- I U$ q/ [3 r- W' O/ [
end;
5 s0 a' p, ^) v' B8 {3 ~ newDirection(@);
( w' F" x' ~+ U3 k! i @.HasOrder := true;
+ z. a) V4 z9 e i- r$ B2 n end;6 ^$ j% w8 u; \( r+ \4 G6 M
end;3 g) u: b. O5 ^% {6 _
end; -- of the method ?' U; B4 p. |1 z* ]
|