/* called by: entrance ctrl of the object 'track'4 f9 E# @. C% b
*/
; E2 k A* s$ i8 N- `5 kis9 v) S" @- }" x- @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* r* W6 [5 |2 W H$ C" W
do
# G9 T& H+ i9 |( Z3 }5 [ Lan := rootfolder.Internal.Tools.AOLlanguage;
. a$ l, v: G$ z, u( h! ^, r- s if current = @.Destination -- else return$ r/ S$ m4 d. H. I1 p) v# w! N) ]
then% P; i W K8 {2 C% g& v
@.Destination := void;, {" T$ L/ I1 G+ E7 l; D: F
if @.occupied then9 Z& l3 h* d$ {. Y, o
part := @.cont;
' Q% z: I5 m' \4 Q* C7 U9 u0 I5 v @.transpOrder := void;
; g$ ~2 t0 @* S+ \* m6 L# b! P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% [6 j; e: Z+ b8 j5 ^
@,root.eventcontroller.simTime);
4 b R2 S& d& ~+ Z# q @.HasOrder := false;
* z2 h v u2 K- Z4 ~ ? @.DrivingHome := true;/ A. }, w( T! {, s+ ?8 Y
rgManager.tryToStartTransOrder;6 ]1 r( y0 Y" A; u' x
if @.Destination = void
' j3 f& s- |) M5 [3 ]2 T: m3 j" u1 j then -- no transport order for vehicle @
( s* H$ }/ `2 q4 f2 f @.Destination :=# p7 \8 x! {9 d6 p1 t- P% b8 M7 C4 j
rgManager.nearestFreeStation(@,track.~);
3 _/ J5 o; A3 I+ L6 B. v3 W" p) N: [6 S newDirection(@);
% u J3 P. g8 D9 V5 d9 ~( X if @.Destination /= void then
$ ^" J2 e8 G. L( X @.Destination.NumReservation :=
; h9 V5 O2 z- [- Y @.Destination.NumReservation + 1;
3 x* j6 J U. J8 v* G2 w end;
0 V0 K! h) ~# |7 w1 u5 x @.CurrIcon := "drivingHome";/ F8 T% Z, D; P; C7 D7 s
@.DrivingHome := true;: P# E5 Y% p1 G$ K- V
end;
: T: e0 [/ g0 p else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 Q% z, Y$ u, {1 D3 I! B
part := @.transpOrder;$ m. [) }/ L2 r, S+ Z/ p, X
part.move(@);-- load part3 O+ H6 @; L9 r
@.CurrIcon := "load";
; K, I$ N$ D, a/ s( L GlobalDistObj := part.globDestination;" x8 P. k# T7 y J& ~
assignLObj := rgmanager.rgAssignL;' {4 A( @! c8 a) ~7 m2 I2 |
row := assignLObj.getRowNo(GlobalDistObj);% C" {; L8 H5 j
if Row = -1 then -- since 70
- ?7 z; {: l8 `8 v: Q# [- f if lan=1 then, Y3 S) o3 Q t' I7 V- T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- s( P* R0 v5 C! F0 ]* \! J to_str("in der Andockstation: \"",?.~.name,"\""));# ?- x" U# O+ |7 N2 X
else' l: O, r) s1 K5 ^* t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ ?2 [* S5 n; o/ D& {
to_str("in docking station: \"",?.~.name,"\""));
3 q6 i+ v! k8 M X( T% h end;- R+ C9 C) q: v5 t
else" ~. A$ B. ~7 m# d c m0 N7 k
@.Destination := assignLObj[1,row];
1 k: [ ~& D( w& t! A7 E end; 2 `( g" E9 T: {( R$ L5 ~% V
newDirection(@);
2 N# d" z6 K# a, ]; O. R$ r @.HasOrder := true;
* _2 E1 r p5 g6 V& W+ `, q end;* y# i. A9 p6 Q. t- B
end;2 e' C& k1 H5 x- m: X
end; -- of the method; ^& P! B I' q
|