/* called by: entrance ctrl of the object 'track'
! Z& a6 @3 q* m. f! M/ c* N8 q% o; H*/7 H4 w9 p, n9 z/ G, U& r6 ~9 L% H0 T. W
is
% f4 n2 \8 q; ~5 y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 P' i ^$ P, j& Zdo
- S& ]2 @: S/ Z i0 S8 r( @ Lan := rootfolder.Internal.Tools.AOLlanguage;1 [4 u9 m3 [ x. ]6 f6 j& {
if current = @.Destination -- else return) c9 j3 n4 o; q' M0 z+ U
then
5 u" m( b3 k1 L0 E5 z# f @.Destination := void;4 `4 j( u1 K f. R7 E0 ~
if @.occupied then# M! }& [* O* ^; |, Q- D
part := @.cont;
8 O7 d* \9 B m$ x4 I @.transpOrder := void;
# i2 P( T1 S4 v" B; q: _; T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 i3 X+ \* ?. d9 i- e$ Q0 L1 S @,root.eventcontroller.simTime);; W( a6 s i: ]8 N0 C
@.HasOrder := false;5 b0 L5 r$ t5 s6 ]: A
@.DrivingHome := true;
_3 f% i! u8 \5 _4 q! A' Y3 ~ L rgManager.tryToStartTransOrder;/ K* h) }: K S4 s& t2 {) K
if @.Destination = void7 w0 ^4 O' L }( u) H
then -- no transport order for vehicle @* y* P' t' j% b1 P% m: I$ u
@.Destination :=9 x9 Z) Z' Z6 \% V
rgManager.nearestFreeStation(@,track.~);
; z$ w6 S9 m" \3 i: `$ Y y: G" } newDirection(@); 1 ]( i/ q$ }# J1 K: {& N A) F! U
if @.Destination /= void then
# e9 q+ F. G$ R7 ], r6 V; h @.Destination.NumReservation :=9 g( M: e4 T8 G- R& U4 |: i* l
@.Destination.NumReservation + 1;
- n. w7 C5 Q/ a' U, i/ m end;
% V, @/ @6 Y1 O0 [ @.CurrIcon := "drivingHome";
9 H+ R8 g0 q- _ @.DrivingHome := true;
2 d9 ?2 T/ D! f5 b6 A/ b. i end;, B* @6 S8 K/ Y" s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% w5 \6 t- @! J' n; I! t+ a1 Z part := @.transpOrder;& A1 {: n X8 p
part.move(@);-- load part
6 s& D7 t9 ~, ?$ F, y' ^ @.CurrIcon := "load";% D! S. X8 Z0 n! P8 L
GlobalDistObj := part.globDestination;# X/ a4 k7 T5 \. _
assignLObj := rgmanager.rgAssignL;
/ T n0 b% ?9 P row := assignLObj.getRowNo(GlobalDistObj);
6 K t0 e9 ^, o if Row = -1 then -- since 70
; V. I" Q; a, C! F/ |+ y if lan=1 then
3 ~! N1 m# g) t, W5 {6 O0 T* w# ]8 M: [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- X5 e' {9 j0 T& E2 f8 r
to_str("in der Andockstation: \"",?.~.name,"\""));: N' G, ~2 F. X( W
else
& M& ~" P: t% c1 m ?0 e1 q; Y6 a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ T. O/ Y; S" [. X% N4 ^/ }
to_str("in docking station: \"",?.~.name,"\"")); / r1 P, ]% g7 Q; Y8 @
end;
% Y2 A0 S3 }& y) h; N else o$ ^6 H4 r# O% A0 k6 ~
@.Destination := assignLObj[1,row];/ x/ c2 l- _; O, V9 m6 W! s
end;
" O' \: F; v$ M3 ? newDirection(@);
, D4 _5 T5 s# e* B @.HasOrder := true;5 U, l8 R1 N9 A0 i' g
end;
5 ^! q8 M- v9 [3 Q* B( j `% P end;
! }) e, b) \: p K# rend; -- of the method
& D4 |% h' q; \( e, }. F% M |