/* called by: entrance ctrl of the object 'track'0 p- X4 S: u' N2 y- D& w8 P
*/: z: |& D! `# }& d; [
is1 M' l M; \% i& Q; X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 d7 N5 _: X9 `1 K7 j
do2 Y; Y- h' n5 C
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ k" W6 _' L9 Y' U if current = @.Destination -- else return
) x6 ?$ R3 _* C: C then Q4 |; ^1 M- `8 k( L+ U8 Z' `
@.Destination := void;
+ ]* x( [$ o$ F3 o4 n: D5 _: Y6 E1 m if @.occupied then6 O" z+ Q, X% R
part := @.cont;
' |: z( @5 N: m1 ] @.transpOrder := void;
6 T0 D0 z: h. r# c* a- \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 [, [. H+ T# }5 F7 w1 ~# _# M' j @,root.eventcontroller.simTime);8 i; l, s7 n) a# \6 z, ]6 b
@.HasOrder := false;
9 U# |& b8 A+ P- f" V8 i @.DrivingHome := true;
, A$ C: ?. w+ M) [ rgManager.tryToStartTransOrder;
3 o- E* [) _+ V. W! {2 O( [ if @.Destination = void
! t% L8 I: P! m p9 @! g" | then -- no transport order for vehicle @
! @* B' v- Y: m4 m" i @.Destination :=
. ^( m# X$ W6 k. a rgManager.nearestFreeStation(@,track.~);
' E: g9 A& @- l" A) }# P newDirection(@); 1 a5 R& ~, f7 E" K' l9 [
if @.Destination /= void then5 m; A6 U W3 q5 p
@.Destination.NumReservation :=
# N0 |2 F( K9 Y7 t! k @.Destination.NumReservation + 1;: V: Y, g4 j3 l/ |8 [
end;5 N! M( G3 @4 u9 D( N
@.CurrIcon := "drivingHome";! ]- ?+ e) N% K$ d3 @! i# _. X
@.DrivingHome := true;/ q. R# N8 u: P7 g" ~
end;
# {4 S7 {4 K ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% g) W. `1 q" N' Y, H: s4 D part := @.transpOrder;9 U/ Y% h1 S9 `, ~
part.move(@);-- load part& t7 e" r5 h. O" t, w) ]) s
@.CurrIcon := "load";
0 K7 n- X/ a( T- f4 `' ]& p GlobalDistObj := part.globDestination;
% g% `8 q/ Y0 N( p/ n! `9 N assignLObj := rgmanager.rgAssignL;
* `/ p# E8 `. T- \% { row := assignLObj.getRowNo(GlobalDistObj);# X; G, i& ?8 {/ n4 y* Y0 N( x" L
if Row = -1 then -- since 70
7 m# q/ \! B3 |$ c if lan=1 then- i: x9 f! V3 F% G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# s. z" O. V |2 S7 X
to_str("in der Andockstation: \"",?.~.name,"\""));- M- `7 b- B! X7 V
else% x* \2 t9 j! ?) i6 U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 F; O f5 \5 {/ {+ h( c% N5 F to_str("in docking station: \"",?.~.name,"\"")); 5 S w- A" G( E/ C
end;4 V) z, T8 U4 F9 W) J
else8 W# i1 i$ B0 D2 a4 K- t
@.Destination := assignLObj[1,row];
a/ X9 Y9 L) U8 ?/ q" @' _& y end;
/ `4 S* J" D: d0 y newDirection(@);. s9 J/ y3 s$ Z
@.HasOrder := true;1 h: j8 Z. Q# D; H8 E' s
end;, Q, P! F% t- j$ {
end;
9 a! A6 y; O2 e/ R# Lend; -- of the method
3 D( M* D6 B$ D* F5 A- F |