/* called by: entrance ctrl of the object 'track'7 s i8 |9 H. W g
*/
) X( O; s! Z- v: F" U6 f8 z( fis
5 I# Z& x, {. _/ B$ Y8 m& x; g part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 J, a3 U/ O8 ~* n$ z; H
do
, _% I k# w5 x! n$ l2 r+ E( H Lan := rootfolder.Internal.Tools.AOLlanguage;
+ q7 \) P" _; K: [: [ if current = @.Destination -- else return2 g1 N0 p4 p( v$ m$ L" n0 U
then# C' |2 J4 ]: } `- j$ O S" B/ {
@.Destination := void;) n, u7 ~- Y) I* N# ?/ U
if @.occupied then
E. c" Q; x2 E* k part := @.cont;5 L4 T' h0 o! p# @
@.transpOrder := void; I% O' y, B; \+ F: J. P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ x1 g+ x! A5 F2 A, \: k' V5 e$ c @,root.eventcontroller.simTime);" c* D# L# X9 T# t4 p
@.HasOrder := false;
+ j# H. ^7 n/ R; I" l- G+ _5 m @.DrivingHome := true;; E% c3 f) Y" o/ z
rgManager.tryToStartTransOrder;
/ }( f d# _ ]) k if @.Destination = void9 j4 b3 x9 a9 }5 S
then -- no transport order for vehicle @1 B* z& M) |0 n. w1 s; D; f
@.Destination :=( ^7 y' D' R' C- M/ f8 ~
rgManager.nearestFreeStation(@,track.~);7 w. B' x" x/ V, D2 ~! S3 J9 g7 p: T
newDirection(@); 5 L Q' X$ W( p3 k+ N* R
if @.Destination /= void then
/ |% g6 w: p- m: P @.Destination.NumReservation :=
9 @8 | S8 ~+ F: Z$ G& e @.Destination.NumReservation + 1;
; R! C% T# S0 V9 |( V. G) w end;2 C7 Y% c$ r# s9 s' U
@.CurrIcon := "drivingHome";" b5 E0 `" q P# \
@.DrivingHome := true;
0 ~) X# _( R9 t! _ end;/ C N$ @8 s1 u" |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 F$ n7 {# B, U2 o0 u, y. s part := @.transpOrder;( O/ N2 s( C# h# W
part.move(@);-- load part1 m" N9 |2 B+ ~2 M" T$ F
@.CurrIcon := "load";& |; k, o; t% N" }* L# l; O
GlobalDistObj := part.globDestination;
1 l- x" X. m) U/ o2 I# |$ X+ R- B, M assignLObj := rgmanager.rgAssignL;
: B5 C$ O1 z2 C+ Z; ` row := assignLObj.getRowNo(GlobalDistObj);# H1 \$ s9 u& e7 B, f2 Q/ W# a
if Row = -1 then -- since 70# K3 F( ?& t3 K& T3 @+ u. N; d; d
if lan=1 then t5 V% D3 B$ ? i4 N: _# R% O+ \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# O; d9 ]6 ?- I' \( T8 ] to_str("in der Andockstation: \"",?.~.name,"\""));
3 u! W2 p$ V2 a q% V else& O8 A: R' U6 ` F4 x" G- Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: ]: [8 C/ w( T
to_str("in docking station: \"",?.~.name,"\"")); ! r8 _; b) }, M; {6 i
end;$ Q# b2 E, A/ K
else$ d# |2 x4 v5 }3 }% ^; r
@.Destination := assignLObj[1,row];2 J6 M2 g) I0 d) a" U
end; 4 M2 M7 u7 X2 @4 Q
newDirection(@);
: |) E& g" d% [% V @.HasOrder := true;1 T- o3 M7 g2 L" D* j
end;
2 V. ^- Q6 ]: m end;" h2 [1 q0 |, p4 |# ?: x
end; -- of the method
1 D- _1 X. q1 A; e |