/* called by: entrance ctrl of the object 'track'
& {8 W5 }1 w/ [7 ^*/ h/ O' Q L$ q: [# i
is
3 Q* ?5 }2 f/ l# X+ Y N1 b) k; i part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 t2 ?4 u" m! A" m. J/ u3 ` ado
9 h% C A1 ^+ ]' A Lan := rootfolder.Internal.Tools.AOLlanguage; l# S& A0 ~0 A U
if current = @.Destination -- else return4 u$ a7 ]% _ {; v8 Y" Q
then1 p3 \1 `6 q" o; {( z
@.Destination := void;. T- a: G' [; ~
if @.occupied then3 E& g* K' l! |3 q1 X& I" I
part := @.cont;6 Q- k* t) V; }
@.transpOrder := void; L/ ~9 i* W4 K ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 @8 n+ H& a' ^8 ]- {$ p/ Q
@,root.eventcontroller.simTime);
4 q i( B1 r6 X# B; P, p @.HasOrder := false;
' q: a: Q* n# i% H @.DrivingHome := true;+ K5 Y% p i" T# ~5 G2 \
rgManager.tryToStartTransOrder;$ F$ }1 c" N9 U. F0 ^' M9 ^* ^, A& R
if @.Destination = void: m j, P% a& q" C, |' F5 m3 Y; P M
then -- no transport order for vehicle @
- W6 D9 K0 Q! J: n @.Destination :=
9 i. G I$ O+ ~3 V rgManager.nearestFreeStation(@,track.~);, E2 ]3 Q7 r$ [- z* j
newDirection(@); ! F, x' Z# [' q% Z! i. q7 _
if @.Destination /= void then5 _1 `, E% ]0 q5 Z1 K! w6 E
@.Destination.NumReservation :=
" F8 v E F& Y; j @.Destination.NumReservation + 1;
9 p1 n- U7 f0 s7 y" Y8 o end;
1 v" b/ l9 F) l' l) [% ^4 B9 M @.CurrIcon := "drivingHome";
- n5 C0 R# Y; L5 Y @.DrivingHome := true;
+ M$ c# `! C# k7 E- V* V8 Y7 W end;! c9 V4 [+ ^7 B9 K. U5 l4 W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 W1 K: D4 i; R0 l: Q
part := @.transpOrder;5 Y5 t2 n9 o3 |+ [" u+ X% A
part.move(@);-- load part
% v; U& ^+ G( F& ^: \- n @.CurrIcon := "load";8 l9 M0 S4 u' g3 Y# X2 h2 c6 K R4 e- `
GlobalDistObj := part.globDestination;
1 v/ C% w3 {; g5 t q3 C" f assignLObj := rgmanager.rgAssignL;
! o: l) R; }2 x2 m3 ^1 L* P row := assignLObj.getRowNo(GlobalDistObj);' Z$ p8 G/ u! R% ]( p
if Row = -1 then -- since 70
8 P; B6 q& ~; y- B8 F if lan=1 then
+ S& }1 n, L3 f8 h: ~( m6 l- ], P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% P" u- {8 }, D5 Z. P* d to_str("in der Andockstation: \"",?.~.name,"\""));
- I7 ^7 e: @1 f4 v( I n& z else2 C7 Z% A; h- N6 N" c7 ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) y9 i+ R: T3 }$ N: I4 }2 w
to_str("in docking station: \"",?.~.name,"\""));
% G! O4 b1 y- D/ ?) N end;1 }( i. A! z' S4 I* [% f
else! |& i- D D: n* w% T4 L
@.Destination := assignLObj[1,row];4 ~) z; h* r5 E
end; 1 J! l2 w" y7 L' L) g0 X
newDirection(@);" _% }( k. Z* R K" e
@.HasOrder := true;
- ]+ K% c& c, a* e end;
3 J4 x# o: G" ^/ Z2 I end;; ]0 ~% b9 k4 l/ N* d( Q( W
end; -- of the method
k% q* q; x p: L2 y, j |