/* called by: entrance ctrl of the object 'track'
( \8 j- J9 o; s7 P' H*/3 \# T0 }. F# g+ H6 w: I3 A6 {. o' Z
is
4 w6 D: o" r3 R. y* g4 O part, GlobalDistObj, assignLObj:object;row,Lan:integer;- M& b7 Q4 m8 W- j; \- @& V$ r, P
do- E# |/ e+ J7 o5 Z$ y: n
Lan := rootfolder.Internal.Tools.AOLlanguage;, m- X6 a% G, U6 @$ p" {/ C# ~
if current = @.Destination -- else return% F+ S% F7 f$ ^4 u# O; S) Y
then3 P. V0 q8 i. q9 g# ~6 e' h
@.Destination := void;7 T# O8 |4 N" k- d9 c- l( w0 h( g
if @.occupied then
: g) B! T% A2 u5 g+ D part := @.cont;) w$ t' V9 u6 @ Z, K
@.transpOrder := void;0 k- v+ \* v7 \% F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 R9 `5 a6 S2 N6 ^; ]+ A+ T6 p7 q( M$ m @,root.eventcontroller.simTime);' K6 g: [' R# {* b9 g* T) y, P ~1 d
@.HasOrder := false;
* J) n8 N: V# D; N7 h @.DrivingHome := true;8 ~* U3 g) e+ d( K
rgManager.tryToStartTransOrder;
# [5 z" }9 m# Y8 V0 @ if @.Destination = void: g- M% @2 |( j5 x
then -- no transport order for vehicle @
) Y; y9 G0 V2 L4 T9 y @.Destination :=
/ }3 d2 O r% s3 G rgManager.nearestFreeStation(@,track.~);
# n) u5 B" ?: ]% d newDirection(@); 9 |7 Z8 J. [( o% |" B3 y \3 s
if @.Destination /= void then
% a5 r( H8 O% {8 \& K0 u @.Destination.NumReservation :=' A( O) m. A; e C& b4 b& @
@.Destination.NumReservation + 1;5 w1 V2 p: c+ M. o# S
end;7 G2 G3 V2 z! x5 r2 I9 x& l+ u
@.CurrIcon := "drivingHome";* g. D/ _ }: N
@.DrivingHome := true;# e# V8 l% _3 x+ \
end;
$ @: a4 |6 v6 c; X$ I. N: K3 S else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 g# E7 @, x; a0 _ }% C% T; E4 x V
part := @.transpOrder;/ U# h& a" w' b1 s' ?+ D
part.move(@);-- load part$ j# S* N, R# [2 ]2 M% d; y
@.CurrIcon := "load";
m+ G) G p$ G. Q& J GlobalDistObj := part.globDestination;
4 L6 }5 a3 o4 s9 c* I8 M4 p assignLObj := rgmanager.rgAssignL;" s$ N5 g: w5 @
row := assignLObj.getRowNo(GlobalDistObj);
2 ~3 w0 W0 A" @) r; @: U if Row = -1 then -- since 70
! t4 h0 L! h) f0 i, Q if lan=1 then7 t" u3 D7 n7 G P6 o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: o4 @3 Y5 W0 Q0 S `' \/ i
to_str("in der Andockstation: \"",?.~.name,"\""));
- ?" @* a' [0 z; @ else
+ j" i' C6 E$ y" E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, P" _" E7 Y) J to_str("in docking station: \"",?.~.name,"\""));
" B9 ?! Q7 ~7 Y3 [+ g+ m' | end;+ x" o1 k) a7 n! ^
else
& {" |9 X4 a2 v @.Destination := assignLObj[1,row];# g$ T* R: R" A L# `5 f" G3 n
end; 7 d) v4 n, }, y; r1 J+ x/ G
newDirection(@);
6 C8 P1 H& D4 M( [$ x% z @.HasOrder := true;: J! r- C+ I0 |/ J; e4 p9 s
end;, j; Q1 O- T- P
end;
8 U c* g5 Q$ z6 t6 w, ]4 T* i/ xend; -- of the method
. I# i/ D% E' w& D7 s2 g |