/* called by: entrance ctrl of the object 'track'
6 y/ f7 m5 t+ s4 g*/
' f* j$ T$ i' r Bis7 ~$ i: e3 D# H z( m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ `6 ]/ v i" V9 D! y$ t7 Qdo. h) f2 I* h( H9 B' j
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 s1 t4 L y: R" T/ W if current = @.Destination -- else return
6 L. h6 o' P% b/ Q: ~ then
8 {8 Y, @* n- `" ?) V3 U @.Destination := void;
& b8 I5 L3 L3 t. U. _+ `+ @ if @.occupied then( s; z. q' z1 l3 D+ N
part := @.cont;
$ J: ]% Q- h" k0 @! K3 ~ @.transpOrder := void;: d( j; a+ f4 e0 [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" s2 Z6 d. I" {' V+ q9 j0 H @,root.eventcontroller.simTime);( d5 _4 D, C$ x9 {! ]
@.HasOrder := false;; x! q& {3 o' S& J6 j
@.DrivingHome := true;
6 b# R0 M6 x4 J! M rgManager.tryToStartTransOrder;2 |/ W+ p+ b: R Y8 p! E# m1 e
if @.Destination = void. w% C# s+ v$ k( n0 ?
then -- no transport order for vehicle @
9 `9 ?* F3 V) y& q6 Z. ?- ] @.Destination :=1 w! t% f# g4 q
rgManager.nearestFreeStation(@,track.~);
, }9 [4 p/ J9 T1 j, |9 p newDirection(@);
. E: m4 ? s V4 w* [% J if @.Destination /= void then* m8 n- C2 r/ |8 D: F
@.Destination.NumReservation :=
3 q# e m: r9 F+ r- J! F" u @.Destination.NumReservation + 1;# h z* W8 R$ S( g8 l1 j
end;
! m' ?4 B# K1 [0 K2 E @.CurrIcon := "drivingHome";
7 n: g" n9 V/ c* e4 f @.DrivingHome := true;4 g; m2 P/ Z4 q o3 d* w
end;" l# z* o! H+ ?9 u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 H1 H( c0 L {, ]6 h& L2 w part := @.transpOrder;
/ Z. ^/ K: @1 S) r( P part.move(@);-- load part
. d% o7 }' P# b! b @.CurrIcon := "load";) @$ g C2 r3 H, u
GlobalDistObj := part.globDestination;
1 X5 Y L; v/ s( M8 X+ ~ assignLObj := rgmanager.rgAssignL;
6 [9 U$ W3 I8 E+ T) A9 z8 t3 u r, T row := assignLObj.getRowNo(GlobalDistObj);3 k9 c! D( l2 R1 G' I3 \* h
if Row = -1 then -- since 700 v% G1 a6 T$ u5 h5 Y* `
if lan=1 then: r4 }+ A$ u) }- q/ Y6 U( @0 P7 S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 V8 k9 R; y! u$ b0 D' f7 m to_str("in der Andockstation: \"",?.~.name,"\""));( E( I2 y& A6 c5 Q4 y2 v$ H
else
+ E8 I% f2 U2 U: e6 c' q$ _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 p* |8 b. U5 a' g
to_str("in docking station: \"",?.~.name,"\""));
( E) p5 M, u* k* g- X# | end;
; I; W; \: d* d6 d7 ]. Z7 q else; r2 o3 {5 ~. P
@.Destination := assignLObj[1,row];; e+ w1 D0 g* z5 [ }/ ~2 n
end; 6 J& P) q. p$ V/ H% m
newDirection(@);3 s; i6 t/ }, @6 f. F
@.HasOrder := true;
. D( f8 [2 s. S: |: l$ E5 b end;6 `0 Z# p0 Z) }
end;/ S* j( g: e( O) y1 U1 ?
end; -- of the method
/ x+ g/ s; N0 V" g: W |