/* called by: entrance ctrl of the object 'track'4 N% x0 P9 o( Y2 r4 W# N9 y
*/
# |+ P' w3 h2 F zis
+ f6 w' T4 Q2 Y7 \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 i1 b( r$ T5 W! l0 e) [
do
W6 ~0 {% ]+ K& L% D- l6 w& x Lan := rootfolder.Internal.Tools.AOLlanguage; l' |& d- j, I( M
if current = @.Destination -- else return, x$ m' F- i0 c& h
then& x4 u% L0 H. Y" I
@.Destination := void;8 m9 K5 M: O% r+ }7 Z
if @.occupied then
. I# `7 D" ?& z) A5 ^0 ? part := @.cont;4 X2 U/ ^% `, y4 Q
@.transpOrder := void;$ K4 r4 u( h6 @3 N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 m% s$ Z. [& Y% V# |
@,root.eventcontroller.simTime);
! T0 o0 Q G0 e' }7 @/ k @.HasOrder := false;
5 l8 e, K, A0 z5 ~3 f @.DrivingHome := true;
- q5 j! t( Z1 ]4 o% Q4 |: B2 l0 c6 D rgManager.tryToStartTransOrder;# Z4 Z: R/ v6 F2 D. n8 k% f7 u3 A
if @.Destination = void" B3 H3 M0 F, G3 d
then -- no transport order for vehicle @
' G7 Q6 Q% K: N* U Z @.Destination :=
! ?+ g p) ^! c" v rgManager.nearestFreeStation(@,track.~);0 X8 j. l# I. ^1 e. o
newDirection(@); $ b' V3 h. `/ t/ X: y0 \2 }) ^
if @.Destination /= void then
1 ^; x* g5 ^1 I5 o3 m$ M% c @.Destination.NumReservation :=& q7 Q0 J0 K: L
@.Destination.NumReservation + 1;9 ?9 F" U! V9 j5 h/ U
end;" W T' b C2 M3 | D
@.CurrIcon := "drivingHome";
7 h4 H' [9 Q" v- ?0 w @.DrivingHome := true;) a, s9 ^3 W# ^- {) _5 M9 I" }
end;' n* W, o8 b/ R8 b3 ]8 }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station J- U h' u( Q, O' k; Y9 N, m
part := @.transpOrder; _: a5 T& D( D0 D
part.move(@);-- load part" X4 F1 p" P" }: q1 c1 n
@.CurrIcon := "load";
- O1 Y8 s4 N" t! X GlobalDistObj := part.globDestination;
* q2 A# U3 q& T% m, m" } assignLObj := rgmanager.rgAssignL;
9 G2 N) A' \! q) z( M row := assignLObj.getRowNo(GlobalDistObj);
' S- O% S$ k) x9 k" ^8 {6 l$ O" w if Row = -1 then -- since 70
+ e+ Z7 Y- |9 B( s4 O, _ if lan=1 then
8 q. ?9 u d* N J/ i' ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& P7 ]( I4 m; }/ S2 }1 ?, v' ~2 t2 p- w to_str("in der Andockstation: \"",?.~.name,"\""));7 X @. b9 V( U
else0 M1 [; `+ ^3 [# M Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* \, {# i2 M# G' Q5 _" _
to_str("in docking station: \"",?.~.name,"\"")); + z* k- i' u+ ^1 T& L2 F8 o
end;
6 J8 k- C [3 f8 g% A, H else6 K3 s2 G) c0 Z, j, U3 d3 K
@.Destination := assignLObj[1,row];: T* `* g, ]. ^$ |; I
end;
& u. e+ s' c1 U4 U/ @9 F newDirection(@);
, S% ?* B4 C; z: b. { @.HasOrder := true;
) Q$ ]" @7 f2 {+ Q end;
% B1 Z* J8 o" z$ ] end;
! ^- R( X7 \+ i+ {4 a! s* T- z% Eend; -- of the method* i1 |. I* H- _8 W
|