/* called by: entrance ctrl of the object 'track': D& T, N- @( L
*/
7 r6 R# u. p1 b6 L$ o7 T& yis3 M6 z/ Y0 h& i9 Y- ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" Y! m7 E$ f) h
do
+ S9 `/ F( W! H3 u7 Z* j: ~, F7 j Lan := rootfolder.Internal.Tools.AOLlanguage;
' x% y! ~3 f5 j5 F) @' b' f' V if current = @.Destination -- else return
$ ^/ Q9 v) \* ?; M0 |" i, u# W then0 v3 P. t5 E: O* o
@.Destination := void;$ C: S0 g' @# H4 R8 G
if @.occupied then2 @" C+ M. M4 I( B5 j7 { b
part := @.cont;, q7 y# Q( r: T1 e( }
@.transpOrder := void;8 n7 w( O" X$ T j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 B/ m3 t2 \ N8 y& k6 M/ z
@,root.eventcontroller.simTime);: ]( m% r# f' n7 m5 _+ U* M# [
@.HasOrder := false;0 R$ X |9 w* |+ L
@.DrivingHome := true;, j% V& E$ p: u9 U1 p1 @8 x
rgManager.tryToStartTransOrder;- O5 t. W$ A/ F: v$ x+ a$ N
if @.Destination = void
- B2 l% n& g6 w then -- no transport order for vehicle @' n! n. z; v" S* L+ V# M$ b5 y" j* `
@.Destination :=
& D' P2 m2 M" h3 ~( I \: |. V rgManager.nearestFreeStation(@,track.~);. i9 v: }3 h+ a: ^: L1 q$ {, M+ W
newDirection(@);
# s/ _9 z( ]7 e. _) R# w- Z$ d0 E if @.Destination /= void then2 \ T& ?8 ?5 ]2 o, H
@.Destination.NumReservation :=
5 x" S% ^- c8 X' X0 S0 F: H @.Destination.NumReservation + 1;8 J# u' ?2 F: ~; h
end;
8 E9 B! R1 r y/ t; m! } @.CurrIcon := "drivingHome";9 ]4 B& r" A$ C- K# \9 b
@.DrivingHome := true;4 n& M9 d, O7 T1 g/ A
end;
" c% H4 `9 S' D& D* }% J else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- f1 ~) B: f% K, j4 a part := @.transpOrder;
9 w/ o+ I4 |7 V& u9 k) p$ p part.move(@);-- load part
) R! k' u! K# F6 z, t% | @.CurrIcon := "load";
0 t& H6 @' l0 j7 | GlobalDistObj := part.globDestination;
4 b# F7 w" G; R& R% y5 X3 t( y assignLObj := rgmanager.rgAssignL;5 e5 u0 \6 t a0 T4 K
row := assignLObj.getRowNo(GlobalDistObj);2 ^% e4 D: o, m5 W2 z0 A6 a6 e
if Row = -1 then -- since 70
4 T7 \3 i! w. V4 ^! ` if lan=1 then( }% O! o4 I: l2 f! I- J8 n- p- Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 Y L$ D f' ]
to_str("in der Andockstation: \"",?.~.name,"\""));$ d! {1 T y# i S$ [
else
/ [" d$ J, G% C7 ?/ I* ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 D# I7 m8 l1 |' U2 ^' [8 E
to_str("in docking station: \"",?.~.name,"\""));
~* p2 y- l' X: q Z3 m end;
! R8 p/ s7 d; P9 n& W! U! Y else' n( B9 B T4 N
@.Destination := assignLObj[1,row];
! n+ C# _. A/ _5 \5 i3 @ end;
|- v0 ~7 Y9 i7 R0 L" d% h, B newDirection(@);
! e9 G" J/ k: d* V/ @, ?* e @.HasOrder := true;/ Y" c) n" ~ t* j1 P
end;
4 I/ s K% B! t9 r1 v end;
8 t3 |! \$ v' y& G% T: ?8 J; |end; -- of the method( R1 l( x4 J9 z: W; u' D* N
|