/* called by: entrance ctrl of the object 'track'
. G! e$ r( s* Q0 G+ ^# ~0 a*/
& s c4 N8 D6 P, \is2 |% t) c+ ]3 V4 a7 Z8 L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: D( p$ T2 D6 n4 T/ X# ]" {) ^do& [5 ^' u9 G1 b. `
Lan := rootfolder.Internal.Tools.AOLlanguage;, X p' L2 W3 b4 Q- ~, m
if current = @.Destination -- else return1 |- O. C* i( b" ~
then+ L; O5 \- c0 r/ N6 T% k' A( w
@.Destination := void;* i. A2 h7 r. |
if @.occupied then
% G! c( C" J& p part := @.cont;* N# w# z8 l6 {9 W7 g) g" N& J; v
@.transpOrder := void;3 r* c# E( T& F, r' i0 b6 K1 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 y4 ]7 Z/ G. m" ?
@,root.eventcontroller.simTime);
* O) ~) |4 H3 [0 ] @.HasOrder := false;! @) r5 D0 \4 `# i/ O5 K
@.DrivingHome := true;- C/ {2 I# \- V8 ` u) J* ~
rgManager.tryToStartTransOrder;: v" X% A4 g# O+ Q, O3 R
if @.Destination = void' V: T) R- s: a7 Y7 w; }
then -- no transport order for vehicle @, ?/ D$ A9 n+ [& z. Y4 T
@.Destination :=
4 U4 ]2 d* G* A; A! }9 `( R rgManager.nearestFreeStation(@,track.~);
3 f: Z, J8 K2 `* Y0 [4 l' L. E newDirection(@);
1 O: B4 C9 |4 B+ R if @.Destination /= void then
7 [9 r! Z6 ~3 { @.Destination.NumReservation :=% j8 C* e- H! ^
@.Destination.NumReservation + 1;1 F1 g7 X5 m/ P; n
end;( o1 M1 o# M8 h* Q6 j* j7 a
@.CurrIcon := "drivingHome";
# G/ L& ?7 s* N% \" @+ d @.DrivingHome := true;
/ {1 L6 t, T3 Z d: A; L* Y( v i end;
* [6 X( v' O% x9 o% k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" }! B: B$ P O% d part := @.transpOrder;; U7 m8 |% |. ]! n, J" e2 P
part.move(@);-- load part* ]' o; D8 W) O9 Q* k
@.CurrIcon := "load";
3 f4 ?9 k* ~2 s" `4 ?4 v) Q GlobalDistObj := part.globDestination;0 X: l, v6 f2 E* X5 I( ^+ G, i
assignLObj := rgmanager.rgAssignL;" d& `) B8 i: X* c
row := assignLObj.getRowNo(GlobalDistObj);
, r0 s" ~, ~: u/ j" l3 J2 J0 {. [1 ~ if Row = -1 then -- since 70
6 u# }# S8 G+ U* |# n0 l1 W" q if lan=1 then
. b9 A9 ]+ @( ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# c1 g: M( |- c& a to_str("in der Andockstation: \"",?.~.name,"\""));: d2 P2 q# p; u$ {2 C) A
else5 D6 M5 K& Z! H! l0 K; @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 a% [+ f$ h, J: o, x+ n to_str("in docking station: \"",?.~.name,"\""));
' d$ Y! \! ?( v end;
3 S9 U. d- h7 [. i" T+ L else$ F9 Y& O J9 f2 L1 L2 v3 K7 X
@.Destination := assignLObj[1,row];
- c6 b0 t( `7 @ end;
7 T* [; j+ K6 C; K newDirection(@);2 m/ f( ]& g7 I6 s) |
@.HasOrder := true;9 b( K( P7 C0 x( K
end;. X1 g. d; O4 z# d
end;
" L3 u6 I' _) d; d/ eend; -- of the method1 u8 h9 b$ Y1 Y! @. }
|