/* called by: entrance ctrl of the object 'track'
8 E/ v4 O, m, U$ H*/$ Q" Q. X8 i" H, e: x, a
is
, | t7 c0 F1 D4 u2 O, j part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 e2 s" D) W" J2 j* n9 ydo5 e8 l) b7 M- z) J7 d8 Y
Lan := rootfolder.Internal.Tools.AOLlanguage;3 y. I9 j' n8 N
if current = @.Destination -- else return9 o1 x) ~4 s, n/ C
then4 k2 R: k7 J) j- B
@.Destination := void;
8 u+ W9 n* i' o: }/ U if @.occupied then
( F7 V' o6 F) t! j: R" v) F part := @.cont;
8 Y' ]. h4 K9 @/ V+ L# {% h2 ~ @.transpOrder := void;9 s% O' g. P5 P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 Z5 p3 Z. f" b( L: f @,root.eventcontroller.simTime);
6 t# S$ h% J. V: F) F @.HasOrder := false;6 b% d, M1 \& h! L0 D, O/ [6 D/ N
@.DrivingHome := true;
# ?- R$ }& \; b: N% C rgManager.tryToStartTransOrder;4 z! q$ B' ?( z# M9 {
if @.Destination = void
' f% r* U; L2 }* h$ p3 g then -- no transport order for vehicle @
/ I4 F u( i( c @.Destination :=7 U* h( P% \! F9 @# w5 u6 Y
rgManager.nearestFreeStation(@,track.~);& ?+ X' z. d1 s" I
newDirection(@); , i( K+ N) e# t' B
if @.Destination /= void then+ R2 ?) j% d. n+ R/ W& L
@.Destination.NumReservation :=
! ]% J7 K* L; p) ^4 ~! u @.Destination.NumReservation + 1;
- W3 ~) t2 n. t. n' D. ~$ K end;
) W7 H8 B2 q. l; b( b' C) w, N @.CurrIcon := "drivingHome";& @$ ]/ N& @' k
@.DrivingHome := true;. Q$ y: d+ |; o( [
end;/ V5 C1 ?# a; t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, W3 c x; b; `8 o z# [# b
part := @.transpOrder;4 [% X0 H& ]% Y4 {0 O" R, |
part.move(@);-- load part
7 J& ]. c- T' n$ ]. ]9 l4 L3 l2 }$ E @.CurrIcon := "load";
" |. V: P* U" j& C. Z GlobalDistObj := part.globDestination;
( p2 L: \: ?3 t; ~ assignLObj := rgmanager.rgAssignL;! ]3 U. ?; {3 x# m$ W
row := assignLObj.getRowNo(GlobalDistObj);
' f9 [, p) J7 k! {& [$ r2 [ if Row = -1 then -- since 70
2 L, a, o9 |4 e. c; k/ ~ if lan=1 then
( A1 g x% c6 X0 a1 [1 J' D: s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 b5 @+ p4 ~( m4 C* ~7 N
to_str("in der Andockstation: \"",?.~.name,"\""));' O' J4 B4 f8 f1 i H* _) O V1 [
else4 z* p+ A% s: H$ E5 t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 x `6 o9 N3 ~: @5 v to_str("in docking station: \"",?.~.name,"\""));
% Y1 b ?3 I4 `( X) q end;
7 T" `: G: ], Z7 V ]/ }( D; [! W else: M3 a& _- L$ K$ J( J- q9 E4 v$ `9 U
@.Destination := assignLObj[1,row];2 }3 ?' n) `( y. ~
end; S F/ d1 }( V! P+ @. z
newDirection(@);
2 @: c9 F! h9 F( W2 l @.HasOrder := true;' S, f' ~( [% y/ ]9 i4 m7 z1 Q# x
end;0 z1 c* C9 `7 p# E9 _, U/ C6 r
end;
7 h9 R9 r! M5 _+ Wend; -- of the method) z) q9 d% P$ N
|