/* called by: entrance ctrl of the object 'track'* [# m; v0 ^3 h: {; Y7 J9 ]0 [
*/0 r. U, M/ I# w8 W; n! J
is
$ H# y1 T4 Z! T7 i# H- D0 B( a part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 \+ B5 I; E# I D$ i
do# B$ X; E7 t- p
Lan := rootfolder.Internal.Tools.AOLlanguage;
" |, U% |- ?/ x. ^. o if current = @.Destination -- else return) N* R6 j- {5 R5 G) a: F5 [- U
then$ P: T9 T6 W. Y# \
@.Destination := void;! ^8 F: S( q6 p* @6 i
if @.occupied then
2 V, A& f, q# X% u# K part := @.cont;
0 N4 n7 A& ]: W3 e8 a @.transpOrder := void;( B' u8 H/ {0 D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 Y6 a4 g6 q- b0 S @,root.eventcontroller.simTime);8 E% v' S/ y- g+ h |- w) _
@.HasOrder := false; s+ s! f, ?! L" B5 s# S
@.DrivingHome := true;
. F* `0 y' ]! ?- S rgManager.tryToStartTransOrder;* E T% {0 s) z1 g
if @.Destination = void
3 i# r3 x( p) h1 A: B; i/ }& w$ z then -- no transport order for vehicle @
& q/ W0 p" m# V P0 n$ Q+ I3 r- j3 a @.Destination :=
! r5 K x l# Y( @ rgManager.nearestFreeStation(@,track.~);
8 D2 U2 y3 j5 @8 B5 c3 o newDirection(@); 0 N: T2 Z- O4 S) b! \0 Z! y, D
if @.Destination /= void then
0 x. x) c. k$ d' Z5 c @.Destination.NumReservation :=2 X4 u* r& k7 f1 k# X" _
@.Destination.NumReservation + 1;" H, h5 U4 q2 L# W
end;
?$ a) H+ z( K4 P" }' E6 w @.CurrIcon := "drivingHome";- g& h4 c; J# J0 p
@.DrivingHome := true;. j1 t# J6 F9 R3 `- q
end;$ @! y3 u# g: |- C! {+ A2 {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 \3 M! }+ b" I! I. j' _8 y, H
part := @.transpOrder;7 \5 I6 Q$ [+ g; ?0 n6 r1 a
part.move(@);-- load part
# R: [; G' W7 q# D) m" m3 v) A5 S @.CurrIcon := "load";: H5 b \+ E' Y2 ~% M3 S1 ]
GlobalDistObj := part.globDestination;
# f7 |# ~ `- v4 L! N0 D+ ~* v0 z assignLObj := rgmanager.rgAssignL;
; u9 o. s# O' T7 [) p0 T' B row := assignLObj.getRowNo(GlobalDistObj);
/ I/ x3 {% Q, O. n o) ` if Row = -1 then -- since 70& e b( L" T% @0 K( a( ?# \9 `
if lan=1 then
8 B9 x$ T1 @, w s! l promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* ^0 l# B0 @7 N8 D" T
to_str("in der Andockstation: \"",?.~.name,"\""));6 b L- V& N0 m' Q4 W8 B0 C; D
else
8 r1 ~1 S& V6 v" Q* d1 f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% D a' o: F$ o1 m9 T6 G6 n: | to_str("in docking station: \"",?.~.name,"\"")); 5 w3 X( n7 V" a. ~ ?
end;
1 U6 I7 l) c* S+ ~) U% [9 Y else/ I6 N' w3 W. B$ }' u' d
@.Destination := assignLObj[1,row];
Y: m1 i0 ?! O( x) H3 g end; & y$ F: p" H( r
newDirection(@);
4 L9 l- Z6 b$ M4 {, P @.HasOrder := true;+ y! F& |4 F/ f" E% N" }0 v
end;) ~, K, y$ V7 l5 c' |
end;% @* V: P. V _7 e7 l- F0 W: O
end; -- of the method
4 t9 z. |+ x* y2 w3 A |