/* called by: entrance ctrl of the object 'track'
0 ~$ C( I& ~$ S2 G8 I*/' {* |& I- w4 v
is( N/ N0 M' ^& ?- `0 `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 _2 }9 p% t6 l0 d, J8 `do
+ p# m: I- j. _% t& L/ z A2 t+ c Lan := rootfolder.Internal.Tools.AOLlanguage;
# K& B# p# R7 _. H( D; n; `6 @! } if current = @.Destination -- else return" k/ \% D, @$ v7 o: v P
then4 m. Z' e" s& R: W% l# F
@.Destination := void;; w5 I3 r2 s% s& z' y
if @.occupied then
) I% K: ?: k, n3 G! `+ B4 g( h part := @.cont;& V9 i. V" c; r) d2 v
@.transpOrder := void;, C. l5 W; k( n8 P4 z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' ? t! n8 k( k$ x
@,root.eventcontroller.simTime);
# g Z9 E" ~& p @.HasOrder := false;
( ?7 B; n0 e: f8 r2 O; h8 J @.DrivingHome := true; X. b% ]* Q; _9 i7 K5 {; p
rgManager.tryToStartTransOrder;
5 `; F5 j4 i; e9 H$ @7 f if @.Destination = void
8 t" q% ~8 W8 }( Z. ] then -- no transport order for vehicle @. Z/ f0 n1 w7 i
@.Destination :=/ K) Q( L, M a
rgManager.nearestFreeStation(@,track.~);, ^" S2 T" ^8 P4 P
newDirection(@);
6 X3 ?6 |* P% z! {' j if @.Destination /= void then
w8 M! B' X/ z3 ~; \ @.Destination.NumReservation :=
$ K. o9 ~: M1 f: g4 b5 k @.Destination.NumReservation + 1;1 Q' t+ F! U& A' e
end;
7 ^8 W, x j- l+ z6 [2 d @.CurrIcon := "drivingHome";) ~( ^2 E: x6 l3 F
@.DrivingHome := true;
2 u5 P" i' P1 q" e! K6 Y end;
- e) n8 W9 B- m v D' P else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 g" q5 {" W4 c0 D& U8 {4 C part := @.transpOrder;) a4 q4 u2 V6 w4 j2 n- G; f1 s! W
part.move(@);-- load part
R/ X2 Y4 z/ t( X8 n6 Z3 h @.CurrIcon := "load";2 c" ^9 O3 B# L& W$ I. @1 n* ^9 F
GlobalDistObj := part.globDestination;. S9 s; t; X4 M$ q* p+ W& |
assignLObj := rgmanager.rgAssignL;" Q! h4 T8 o# J' J: w$ Y
row := assignLObj.getRowNo(GlobalDistObj);
+ K" O+ Z" v2 P) M7 Y) I if Row = -1 then -- since 70! ^0 I8 O4 @' Q% P; Q# j2 o
if lan=1 then4 N4 m% q- ]4 S( f) C' r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' N* } R" _0 a to_str("in der Andockstation: \"",?.~.name,"\""));; w9 J) `' K; m2 r; y/ k8 u4 k
else4 s6 b0 u8 F- u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: b9 q% A. w) a3 }8 y
to_str("in docking station: \"",?.~.name,"\"")); 8 ~; J% E3 J( ]
end;
9 a: F% T- S: m5 E) t- S( K+ q else
. M" t. J0 i% q' U% ] @.Destination := assignLObj[1,row];
$ Y( W" m$ i% o* [! \, G end;
8 E$ r) j' b# p9 I( D% | newDirection(@);( h+ B, X; b7 O* ]" A2 C
@.HasOrder := true;6 k) k! ^4 P6 \+ E/ n
end;0 I9 d3 k3 k2 o
end;
$ S) ~7 \# u7 W, Kend; -- of the method. a0 q/ c& p) l D& w+ X( A* a
|