/* called by: entrance ctrl of the object 'track'& ~# w$ c$ r/ F6 P" d& y
*/
! l. I4 F; U" Z `' ?. p/ v% Jis* M9 D: y) [/ a' c& N% c% [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# E/ N: m+ f7 j
do; j. j; }/ Y) T, ^" l
Lan := rootfolder.Internal.Tools.AOLlanguage;3 P% j# t% Q. k* |( Y3 X# ?
if current = @.Destination -- else return
% Y0 K* d. }# A* G1 M# B5 f* ^# B then
+ r4 g$ E% p* ~, U+ C @.Destination := void;- X& I- U$ p9 y6 O2 |
if @.occupied then
9 |/ _6 b4 m2 P part := @.cont;; J, m% D. [: h- v$ @6 R
@.transpOrder := void;- K( r( r" f$ i8 J$ k- ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* j: C" v# E/ \; E @,root.eventcontroller.simTime);
Q* ^! t- U- ^% n: u6 a3 d @.HasOrder := false;+ s& t" g2 Z# K/ n, e' h
@.DrivingHome := true;: p9 B" O: I9 B# `% W$ Q
rgManager.tryToStartTransOrder;
& J3 q& [( t, y9 X9 ?1 q0 L if @.Destination = void7 k1 X+ V5 s$ p: ~8 b. x) N
then -- no transport order for vehicle @& F) ~/ Q) u# Q9 J+ \! H9 p8 P
@.Destination :=
6 }/ Q% D; i. {8 g rgManager.nearestFreeStation(@,track.~);: O- o/ j4 Z& B h& ?* o$ A
newDirection(@);
0 @1 a& S/ x1 q) m; K6 ~ if @.Destination /= void then
- ` A$ Y4 Z% N1 q5 u% u' V @.Destination.NumReservation :=
. `' S7 J/ g) M3 r5 B D& y @.Destination.NumReservation + 1;/ ~& _1 m* F' J* a2 i E2 A' @- T
end;* r& {8 ? z. N) I8 F+ }
@.CurrIcon := "drivingHome";* l0 \" @& E4 j2 O6 t
@.DrivingHome := true;
L6 L; \. D' r+ V end;
1 W7 c( c' t$ W5 } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 H9 h) [" f. f/ A2 l7 c0 o part := @.transpOrder;* J" U! ~& o3 o6 W5 |. I F
part.move(@);-- load part
6 t3 C; P0 T; U7 r& w+ f- D2 \0 | @.CurrIcon := "load";0 D4 E2 b. s! v7 ^
GlobalDistObj := part.globDestination;4 I7 j( W R5 y( M4 P
assignLObj := rgmanager.rgAssignL;) X& V+ S# r; k1 Z
row := assignLObj.getRowNo(GlobalDistObj);
% q" Y& B, C( u, k4 H4 Z if Row = -1 then -- since 70 G- J% i" B9 z) C( c- S+ {
if lan=1 then
9 |4 Q1 x7 S' g0 ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 u9 I7 l, Q' Y! i% c' [ to_str("in der Andockstation: \"",?.~.name,"\""));: D8 E0 } ?! @) z
else
! P2 U( {% I/ L! S& [, v+ ?& s7 x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 c5 b* e7 I2 q5 h- _ to_str("in docking station: \"",?.~.name,"\""));
: W2 G* f! C6 n& i9 l end;
3 T h" R# q, Y6 ` else9 G8 l/ O/ `* `6 f! p) `7 A) |
@.Destination := assignLObj[1,row];( T7 {4 G' |5 ?% E% \
end; , D. @, U& P1 Q& E3 C; U* r
newDirection(@);
0 j# [5 E) T- c# i$ T5 {1 ^ @.HasOrder := true;5 D+ t, z& Y6 v6 | s& f
end;/ E6 Q/ ]$ J4 c8 c! d! N' A
end;
3 N/ \( h3 a4 _end; -- of the method
4 x0 r; R! ?1 M3 p8 _$ a |