/* called by: entrance ctrl of the object 'track'8 m) C( q; h; H$ }7 H+ Z$ F' C: j
*/
9 C+ }# J- g' ?8 I+ S) g% Xis
4 w5 Q1 x% H% B. N1 T7 a# D1 G$ l part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# ]- n; n) v" c4 d4 I# N8 }& Ddo
8 n8 R. l% f$ [" G- v2 d/ y Lan := rootfolder.Internal.Tools.AOLlanguage;1 q8 @ a3 Z7 F
if current = @.Destination -- else return0 F6 A0 _4 a4 P/ @, u$ v
then% V" z$ l1 I1 W! ^& H4 @
@.Destination := void;
4 u3 V9 f% R$ j% J; P- S( s2 l if @.occupied then4 m+ F% V8 x+ K/ l% D3 y- g
part := @.cont;9 X9 I5 O) y/ D$ O
@.transpOrder := void;2 b( @$ N2 Q# c+ n1 G- R% `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 W5 c. h3 E4 ^ @,root.eventcontroller.simTime);8 B: L2 P, P1 c# [7 E$ w
@.HasOrder := false;- S# c/ C8 e$ B( J& r
@.DrivingHome := true;* O2 [$ n( c* U. ] r- r
rgManager.tryToStartTransOrder;
, a: s, C3 `6 R% W if @.Destination = void
& D6 D% m% U& B then -- no transport order for vehicle @) T7 f* ~1 G1 B3 A' l2 V
@.Destination :=% H" {- D7 a) N7 d S$ b: ]
rgManager.nearestFreeStation(@,track.~);
/ d [$ x( X/ X; ], A newDirection(@);
4 Z% q- s) i( Z: r9 p" d if @.Destination /= void then* p8 y- F) y9 ?5 u3 h( a: v, w5 |
@.Destination.NumReservation :=
; K% K \$ h( j# [4 ]9 | @.Destination.NumReservation + 1;+ T. {( p6 k" t& d
end;9 g, w* A& B4 V+ ?4 Q
@.CurrIcon := "drivingHome";3 P! F3 O4 F! [) _4 g
@.DrivingHome := true;% C+ |( A$ \# h" E0 X s; L4 O
end;4 X7 p: Q- Z' b6 H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 ?7 U; ]4 K# Z% T3 ] part := @.transpOrder;1 M5 R& K2 r5 ~4 r! q% m. l2 ?- p
part.move(@);-- load part6 c2 g) J. Z$ V1 Z
@.CurrIcon := "load";0 L, R/ D2 V& f3 M9 G
GlobalDistObj := part.globDestination;$ m$ u) j9 O. t! d6 F1 {, Z
assignLObj := rgmanager.rgAssignL;& D6 n1 V X8 v7 u2 @/ M) J
row := assignLObj.getRowNo(GlobalDistObj);- u9 l! e+ ^8 _ i& ]
if Row = -1 then -- since 703 J; Y7 @& L7 H
if lan=1 then
' u) O b& h8 b4 Y1 U) E$ ^* _3 o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 r) a% |" z8 m" j$ S to_str("in der Andockstation: \"",?.~.name,"\""));
/ Q7 m( q2 e5 L. r% \, ~. H" v else
- q. R; q+ d! J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ Z) X" b( V1 j n# p/ P8 x
to_str("in docking station: \"",?.~.name,"\"")); : J& o8 l w' T) k5 U4 R: |
end;
/ q" J! H- x1 \! N X% w else+ ?: n8 X. r" L7 t2 T5 I8 P( Z
@.Destination := assignLObj[1,row];0 B1 Q% B8 Z: W, ]2 F; T
end;
' F% ?8 h4 |0 _% b, S: e% S newDirection(@);8 x Q- W1 D1 `% A# ]6 t
@.HasOrder := true;
: }0 \% y& B) ~: r end;- }8 p4 q+ K7 N
end;* N* |8 D9 y1 B% D
end; -- of the method/ z# Q6 k1 y9 X" b% {
|