/* called by: entrance ctrl of the object 'track'
# x- a) ~4 X" F( _*/3 ?& p: Z- p8 e
is# a# O: N% e% {2 ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* q2 ~% j g, H$ O+ P4 c# q
do l4 K" D$ P5 m) k" u
Lan := rootfolder.Internal.Tools.AOLlanguage;
: `3 D4 e1 _& r8 o$ U3 H( Z8 I' I5 z if current = @.Destination -- else return
* T8 I/ m9 O1 k; W! D4 |% c1 m! | then" R: F1 x! |7 ^8 V' A2 B
@.Destination := void;6 t: H$ A# _- Q2 S( t
if @.occupied then' { g' z: V/ K! n" } u
part := @.cont;
- C. o: r$ O/ k @.transpOrder := void;
2 ^8 _- y2 w. @, T; @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 p/ C/ K) B( k5 G. w! q+ ] @,root.eventcontroller.simTime);/ e. S. E, K) \* K6 S
@.HasOrder := false;4 L6 z. C [ g v
@.DrivingHome := true;6 P% m8 j* l9 Q8 K$ {9 J
rgManager.tryToStartTransOrder;
8 S1 d0 {3 ~+ L! `: r- _5 W' M; u9 h/ p if @.Destination = void7 |/ e J/ m3 ?, Z F9 n6 A9 M, ^
then -- no transport order for vehicle @; \/ k% S/ s2 h, V$ I1 h- [9 \
@.Destination :=# C! j( u, v) S+ F4 w! e& [
rgManager.nearestFreeStation(@,track.~);9 B% M5 H$ b( O* n) g) K
newDirection(@); 3 X& N# t* A1 T( q
if @.Destination /= void then
/ p. V7 [( i. O; [# v @.Destination.NumReservation :=
5 ]2 h. h( j+ j+ T @.Destination.NumReservation + 1;2 t2 _; i' V5 B& |
end;, [! Y0 K+ u& _) f3 j2 C( w
@.CurrIcon := "drivingHome";
: n8 Z2 `* s( _, H& [8 p) e) H @.DrivingHome := true;1 p: N. r3 d* j4 {% j. @
end;
$ Q$ g- U& U% X8 v" b else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. V( k3 _1 f z5 y5 F9 y part := @.transpOrder;
6 ^% v7 S2 w: X2 j part.move(@);-- load part
. v* x) u$ ]7 n @.CurrIcon := "load";$ \% e. c/ R! N
GlobalDistObj := part.globDestination;% G* p- m4 _8 U
assignLObj := rgmanager.rgAssignL;$ y: J8 ^5 D* n& o; N; C
row := assignLObj.getRowNo(GlobalDistObj);
# o! D% s0 O$ z" ] if Row = -1 then -- since 70
; p; P6 q" x- L/ K: { if lan=1 then: D8 v* f' x% D. o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# [# c4 x2 }* p+ H! }( n
to_str("in der Andockstation: \"",?.~.name,"\""));
! _0 w, C* L" S% D8 W7 T' t else& Q' o7 |/ `" M6 K# N7 M+ Q8 f O+ |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 F9 u V8 b/ U; o to_str("in docking station: \"",?.~.name,"\"")); ' [7 u& k$ t# e
end;
$ Q* P7 e' k" F5 Q1 x) ~ else
6 \2 [+ A+ N& l$ }+ u; W* o @.Destination := assignLObj[1,row];" L2 J4 u( |$ g5 U
end;
6 k1 _0 [& r+ X4 a5 w newDirection(@);
% A* f8 K$ S3 \9 N @.HasOrder := true;
* M1 R; t7 _" h4 A& r+ ^9 N. E end;' f3 b0 y* k6 U4 M+ u
end;
; F& t/ f# s. e( j% d3 U- Wend; -- of the method5 z% X/ \& C j4 Z; F
|