/* called by: entrance ctrl of the object 'track'/ T* S7 K# P i2 K* A
*/- |9 \$ Z8 _% z/ L, F) B
is9 `$ n5 O; Y/ _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ v0 Z+ V6 x" v" k6 c/ f
do
( r* b/ j5 {2 H/ ?! e Lan := rootfolder.Internal.Tools.AOLlanguage;
9 H' O/ a( n$ r: j# } if current = @.Destination -- else return
, j5 [& C! i" c. L( J; j then
/ X" v8 v! c+ u: F9 U; {# @9 ^1 q @.Destination := void;
* }; @" \3 t7 U! b if @.occupied then1 w8 J% o! |# K- y
part := @.cont;! y- `6 C4 a) ~
@.transpOrder := void;3 [4 p# ]' v- T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' R' L2 V' c) T$ J$ ^, ] @,root.eventcontroller.simTime);
0 Y- `2 j3 I* n$ r: ~6 Z) d0 I2 b @.HasOrder := false;' p# }" {& N$ J/ r6 d% ^; g
@.DrivingHome := true;% d S* R' J; a( u
rgManager.tryToStartTransOrder;
$ V0 c% e, T9 K7 u( {% Z& n9 ~. \ if @.Destination = void( F# M' I L/ [( u, n- h b
then -- no transport order for vehicle @
( O4 k' X# u: G% C @.Destination :=
/ G% T6 Z. i8 I: \ rgManager.nearestFreeStation(@,track.~);
$ C0 c% Q7 |3 C, T, w. _1 [ newDirection(@);
' A9 r3 K* j, k( r' I if @.Destination /= void then
, L; w2 H8 U( A1 f$ X9 K& O @.Destination.NumReservation :=
+ L/ }5 O* x% V' J# ~. x" F# c @.Destination.NumReservation + 1;: |& D5 {- g6 ^
end;. _' @+ g: y: r. y) ?) D
@.CurrIcon := "drivingHome";
; {9 M/ k) X4 G) Y. M- V, } @.DrivingHome := true;
3 q) Q5 G3 ~$ L ?9 W end;
! y9 I. K9 y- _+ a1 { else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 j3 k! X- Q m7 }$ N$ v; [' i
part := @.transpOrder;7 t+ P) F- {) z
part.move(@);-- load part: F6 y2 v4 h+ |* d. y
@.CurrIcon := "load";3 ]* [. a6 X8 D/ A7 b
GlobalDistObj := part.globDestination;# b1 B! I" C' Z' N% w# f' c
assignLObj := rgmanager.rgAssignL;. o( x8 n0 ]9 t4 a/ X0 U) X, ]
row := assignLObj.getRowNo(GlobalDistObj);4 w( I, g7 \ |; U6 K9 x7 A
if Row = -1 then -- since 70+ _7 D8 P3 |! ]" D, Z
if lan=1 then" L3 M* C) y- y& g* M3 n% z7 a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# H8 R- B6 q0 C- \. ~
to_str("in der Andockstation: \"",?.~.name,"\""));/ V3 ]3 l1 L2 l" x# r
else
+ k) V0 m: G- | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, G* n' s7 `$ a, ?1 ` to_str("in docking station: \"",?.~.name,"\""));
5 ~2 R$ w9 j2 D% T' P7 C end;3 R0 E" ~( y/ [* l; l! {. ?' g
else
5 F# A; h, `: r @.Destination := assignLObj[1,row];1 E6 W. X) R' J i5 }- ~! A6 B9 ?- [
end; & p7 K( |2 x% r5 t+ o. M) A# p, Z
newDirection(@);1 g' W% t9 T* D3 y! D) P( x# W; {1 m. W
@.HasOrder := true;
( b4 b6 ~9 w; u- X end;
: L8 |( g u; C: ~3 f end; j# [ Z9 l7 k0 {1 _# N
end; -- of the method5 C' k2 F( W, K& w
|