/* called by: entrance ctrl of the object 'track'
4 l% \* ?( t1 H+ e7 i*/
5 |% M1 T1 b, l+ dis2 S2 M: g: ]6 P6 C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 @9 L$ u t& u& q- w1 Jdo
( E2 h1 U) [) C4 K Lan := rootfolder.Internal.Tools.AOLlanguage;
! _2 J# f$ \ m! b- { if current = @.Destination -- else return
$ I( u: d1 O& e, n+ |: `! ^ then
+ D7 ^# F$ I4 h1 j3 f7 V" E @.Destination := void;
+ r5 B* [, \; E/ W& ?- Q2 r if @.occupied then" H% |- m+ O' E% n, H
part := @.cont;
, c; Y5 m% B0 ]3 x4 g3 G9 u @.transpOrder := void;' ~& u5 D& g& c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' z: N$ f# n; l7 w @,root.eventcontroller.simTime);
8 C- l& \3 {5 ~" R @.HasOrder := false;
9 t% s9 \$ e& M; b8 c @.DrivingHome := true;
) f( C9 E9 X/ D k8 S* w) Q# N7 Z rgManager.tryToStartTransOrder;
( ]) o9 Q' t) b p* ^ if @.Destination = void
# _% z( {6 C4 L" m then -- no transport order for vehicle @
7 J1 ]9 E" W" ~. E" B @.Destination :=/ E6 z. n* t j, i
rgManager.nearestFreeStation(@,track.~);
* X/ A' M+ B/ S1 l newDirection(@); B; a a" D6 g! X: z
if @.Destination /= void then- C3 c d+ a1 j. C
@.Destination.NumReservation :=* {# h0 ~. o, X; Z9 s5 p6 K
@.Destination.NumReservation + 1;) @; ]; e/ f2 a/ ?3 v) m" T: _9 s
end;
9 S) H4 s/ Q& t/ J0 f @.CurrIcon := "drivingHome";# t5 r, V; `/ [) l4 U/ s
@.DrivingHome := true;, L5 t) c$ P9 M
end;' }/ J( g" Z5 X6 L* Y" z$ Y3 @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ | C, g" q7 q# ] part := @.transpOrder; `* y& ]. U/ |0 {
part.move(@);-- load part- S: c% q5 `2 [* Y. K
@.CurrIcon := "load";
, ^6 ~" {: F; Y1 K; Z GlobalDistObj := part.globDestination;, C5 M, ?# t% H5 T+ E' F$ E
assignLObj := rgmanager.rgAssignL;. N. X# g/ X! n( [
row := assignLObj.getRowNo(GlobalDistObj);% s7 g: X8 r. S5 a
if Row = -1 then -- since 70 y5 t& H% x5 p1 L- r8 G
if lan=1 then
% F Y2 k3 {8 J+ f0 u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 ?) A/ R5 i! H) x6 o
to_str("in der Andockstation: \"",?.~.name,"\""));
! ^" R. o! m6 U else. A1 s6 g! I. d; r! W" H( _5 Q" U2 c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 e) q% ~1 {4 Q1 n
to_str("in docking station: \"",?.~.name,"\""));
( l- j3 b7 j. K6 q, _2 U( T: Z4 Y/ V end;
9 _% N# G5 P% O$ o% k$ v2 ^ else0 l5 o2 j; d; b: \ C
@.Destination := assignLObj[1,row];* f3 Q! i! x5 ? k
end;
' \8 l+ f$ g# j4 x8 P newDirection(@);
. C: X2 s$ ]9 Z- `+ W @.HasOrder := true;
; r5 c( _2 }" \7 x end;
( e/ [. U/ |% `' E O end;/ v w$ ^; q! G2 s. C% k6 x
end; -- of the method) r* c+ P- t& p
|