/* called by: entrance ctrl of the object 'track'4 f, c6 C! I# X
*/$ L9 S0 Y$ e) H% D" p
is8 |4 b: l5 ~) R3 Z5 L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& @, p6 m1 r2 A. s
do6 Z* Y1 C* ]2 @( A: T4 O% A
Lan := rootfolder.Internal.Tools.AOLlanguage;6 `1 j0 n* h& F2 P4 o7 O# U! _- J
if current = @.Destination -- else return' P" f3 C6 V; ]9 \+ s6 Q' m6 U$ s5 T
then
' S Z' q$ F D @.Destination := void;. G, f# O% W8 S2 }( r
if @.occupied then+ R; l. T7 O! O: @% F4 z, c, _2 M
part := @.cont; k' T4 X' s( f
@.transpOrder := void;
! ]( P7 c0 K5 [# |( y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- E# e, g% W: x. z( P$ a- A9 A @,root.eventcontroller.simTime);; z' ?2 z: g. K; V( ~: x, Q1 J
@.HasOrder := false;) C6 l, H0 C2 U A' Z
@.DrivingHome := true;0 A q6 p2 |) [. [% G0 u. k3 {
rgManager.tryToStartTransOrder;. y K6 w4 @' t+ X$ J# }
if @.Destination = void5 [4 N9 \. [- H C0 Q4 Z+ Y1 x
then -- no transport order for vehicle @ {+ |2 X" r/ K* ^" u
@.Destination :=3 i5 O, m N2 W+ m1 R5 W
rgManager.nearestFreeStation(@,track.~);1 T# D$ i* ?# _
newDirection(@); ! M) ~0 l8 a& e6 P6 Y; c3 Z+ h5 X
if @.Destination /= void then
, i' T/ _- w' J) R @.Destination.NumReservation :=* E0 S+ B6 e% _5 ]5 G
@.Destination.NumReservation + 1;
* p# b3 X; f5 R0 c6 ^ end;
) J3 \# `3 R/ [. x- S6 ]; L& w+ Z% k @.CurrIcon := "drivingHome";& w3 W. ^/ z0 j1 h7 r! x
@.DrivingHome := true;: z! s0 p6 ^: w" [1 I
end;
$ X* f/ x' }1 N' l else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% t$ Z8 n' ], T# `. { part := @.transpOrder;+ g' G9 u& u( d; H0 S& Y0 p
part.move(@);-- load part/ Q6 c& ?# W/ W
@.CurrIcon := "load";
; g% {; Z! n; ~. Q1 r' S. F, a GlobalDistObj := part.globDestination;" w, d0 X* w9 L7 F7 Y* t" Y
assignLObj := rgmanager.rgAssignL;2 f! ?; K. V: O2 B( k: d v2 h
row := assignLObj.getRowNo(GlobalDistObj);9 g7 q1 h* T) W K, M Q: H; n
if Row = -1 then -- since 70
& U# u/ e& l2 l, e7 r/ y if lan=1 then% d* o5 J5 J2 t9 F, ?, _) V( E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; T7 \ X' j i1 I) S
to_str("in der Andockstation: \"",?.~.name,"\""));
9 P! d8 t9 z, ^1 l$ Y6 k2 o2 I6 I else
8 f% n2 }: F& k( S/ t2 n6 h- m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* {; g3 u/ T1 V! f6 o+ @
to_str("in docking station: \"",?.~.name,"\"")); & G* m% j/ s( j% R6 }
end;
5 |' W5 B/ J* ~; K" A- _ else& F, F" P% e& H. a4 E) H% Y$ H
@.Destination := assignLObj[1,row];" m0 @3 D! T: L8 r" W7 u& d: Z
end; 1 d2 T6 P. z' D$ n4 l! |7 ^- \9 D
newDirection(@);* r) {2 m6 m8 [7 X5 E2 f
@.HasOrder := true;0 C3 O! H1 q( _
end;' u+ `; e/ s A
end;( X% V( X: z, i2 H
end; -- of the method3 F# F8 n8 ]% A1 ~8 _
|