/* called by: entrance ctrl of the object 'track'9 A$ \- u9 v& ], \% M' d% k V, `
*/8 Z* H$ W/ A6 u3 R/ g8 p
is
- A7 N, [0 c+ J) d/ P" g part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ a- Y- Q+ A7 S
do
: X1 N+ U: \: y1 R Lan := rootfolder.Internal.Tools.AOLlanguage;8 ]) V# z# Y1 X* N& E
if current = @.Destination -- else return
4 k" a1 O6 ~! V3 V ` then
5 Y' v# h+ c+ n @.Destination := void;
" {+ b6 v7 @8 ^/ M5 v( | if @.occupied then8 ]) v/ H2 E; U( H. K8 I. v
part := @.cont;# ?+ i O6 z! J) @
@.transpOrder := void;
* O" @$ q' r4 @# {8 V9 e6 z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," C& Y+ B' r; b# I' x; Z
@,root.eventcontroller.simTime);( j; e( b* {, i7 d
@.HasOrder := false;
' {* |3 L z; e, | @.DrivingHome := true;4 ~, x. L/ L' n# z, i% t
rgManager.tryToStartTransOrder;0 w0 m2 T4 x& g5 A) p/ f: h
if @.Destination = void
; \! B: t I% r( t* [( H; r% d6 ?" O then -- no transport order for vehicle @
8 u/ d' N; Z7 y- u/ N; g @.Destination :=4 t7 t3 W; D& C+ P6 G# e ]7 Q
rgManager.nearestFreeStation(@,track.~);9 H8 b5 \2 R* c4 e2 m; C
newDirection(@); 5 h' H$ A* |& m! J
if @.Destination /= void then
, s) T5 }" n& f9 ?- D' z" G+ Q' ? @.Destination.NumReservation :=
0 h% t( l# }" p+ ^' F2 Y/ ~! e @.Destination.NumReservation + 1;" \, O- T) K: J* e( X5 p
end;$ f3 l4 E- I/ q$ q4 }6 Q% w; m
@.CurrIcon := "drivingHome";0 S% p' U- r. z- F( K, n- Z6 l
@.DrivingHome := true;7 Q( j& d P0 }% W/ Z
end;
7 o2 [ t6 j, P7 u" A/ Z+ T V else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" N" |8 R1 k9 ]- d3 E5 b part := @.transpOrder;
2 C. V2 }7 @. H8 @) x part.move(@);-- load part: c, O* y& {& G9 Z
@.CurrIcon := "load";1 c! Y! P8 P0 [
GlobalDistObj := part.globDestination;
! c D5 ~5 N+ K5 c; S# } assignLObj := rgmanager.rgAssignL;
! q* a4 j6 x; S8 ~4 Q row := assignLObj.getRowNo(GlobalDistObj);
) a# X; x+ X+ e( G5 \4 \% A" G/ J if Row = -1 then -- since 70
7 c) ?/ I! A" c0 D4 m if lan=1 then
/ M' s8 }# l, j. p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ q* [4 P6 ?$ G! o( U# ^ to_str("in der Andockstation: \"",?.~.name,"\""));( L4 `# Z1 ]. g3 U
else
* P. _$ l1 y. [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 n' v+ f- h* n. S1 r3 \) F
to_str("in docking station: \"",?.~.name,"\"")); ( W" W! p) H0 n
end;
2 A6 y& q% g( v$ A8 i else
5 U, b* X+ I. o( ^( e7 N @.Destination := assignLObj[1,row];; z2 j9 @( S w3 W6 p2 t
end;
5 o$ g" ]% A, O! G newDirection(@);
+ c7 b8 [0 A3 d- u! r; T$ F% h @.HasOrder := true;
9 _, V; n- ^8 D5 F0 } end;7 a1 Y& p. p& b
end;
7 n3 B& S) ~, z H9 N; tend; -- of the method, F, k/ `6 [; Y* ?6 G* g
|