/* called by: entrance ctrl of the object 'track'4 p& h& g+ ?+ S0 A3 H Z" q
*/& B, U% `6 b# s) T e
is( z+ {) L: w( P( p! e5 }7 r+ c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& {# l& _* z* i4 g+ H3 ]! d7 }6 y, xdo* f3 [3 y" N! w6 x* ^; s' K
Lan := rootfolder.Internal.Tools.AOLlanguage;. N& w1 }' z9 r6 A" j; w
if current = @.Destination -- else return
/ w) q) l- a8 e/ {+ D. c then: b9 |# K) u, r( x' |
@.Destination := void;. _& n: S8 z- C5 l
if @.occupied then; [+ ~, _% c! h
part := @.cont;
, Y6 m7 i2 c# F1 m* K @.transpOrder := void;+ x; j/ O" G$ I! C8 F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 J+ X+ P8 H6 e- F+ m; k" F0 A
@,root.eventcontroller.simTime);, f& t2 x) h( b, Q" b; U+ C
@.HasOrder := false;
- L- u3 P L4 n/ @ @.DrivingHome := true;+ E) D7 U2 a/ Z' L3 Z& n {
rgManager.tryToStartTransOrder;" V' v) \/ Z% Y0 Z+ d4 w7 F5 ]
if @.Destination = void& K4 W' ?; C% v* }
then -- no transport order for vehicle @
9 D3 x! Y8 l5 H) r3 } @.Destination :=7 G: |; J6 u; T+ m' j4 z
rgManager.nearestFreeStation(@,track.~);
9 w% P2 C& y# K3 l9 s newDirection(@);
: i6 H! r1 y( Z) L if @.Destination /= void then
( Z" I" i+ U; H# [ @.Destination.NumReservation :=
, N# A" _/ \8 h' h" J @.Destination.NumReservation + 1;/ g% z% ?" s9 _* s) Q
end;" ]3 J. }; i2 }( G/ s9 @% @) _; v, D
@.CurrIcon := "drivingHome";) Y, Z/ z( @- d
@.DrivingHome := true;6 x1 L, z |4 V, a" b
end;5 t w, Z l" F. J) z& e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- ? B2 ~, P$ m8 ^6 `* t
part := @.transpOrder;- ?1 {- `0 v5 y, U
part.move(@);-- load part+ P3 f0 g& i0 x
@.CurrIcon := "load";
* A$ e$ R: j9 t9 g" s GlobalDistObj := part.globDestination;
* j6 p/ w9 \! E/ V/ o4 X assignLObj := rgmanager.rgAssignL;5 U0 x# e; c/ S5 Z9 q3 H* p
row := assignLObj.getRowNo(GlobalDistObj);
+ F# S$ O' W @( k. R% q if Row = -1 then -- since 70
+ n K4 E% g7 Y5 E7 J8 ]+ u if lan=1 then. {3 S" W. ^( k2 T& b1 f2 G i0 Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 d- ]0 H' G W- p) ?5 h4 t to_str("in der Andockstation: \"",?.~.name,"\""));
: ~: [# Z+ [6 M4 c- U. h( z else* Y5 ?4 i2 z+ Y0 O9 G! l# R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 x1 t2 l1 o" c ?
to_str("in docking station: \"",?.~.name,"\"")); ) B4 h: Q% v+ u' R
end;
4 @9 o8 t" G: [- F- w6 C+ T else& s- Q* d: d& M+ g% Q
@.Destination := assignLObj[1,row];
@8 f: R# \+ `% ^4 d+ y4 q end;
+ I( G1 V9 Y" `( ` newDirection(@);! |8 E$ }- S) h; ?# d& X
@.HasOrder := true;
8 W2 F$ a- n, K; O4 z) E9 Q0 j end;5 Y* \$ R. |6 B9 B/ S- ?/ z
end;
" G/ l4 }1 ^( e. v- Q$ ?9 Pend; -- of the method9 M3 \: H1 U3 p$ [5 D) `+ D
|