/* called by: entrance ctrl of the object 'track': v6 v6 A7 C, q
*/
& i8 e0 N9 b. N$ J& kis
8 _6 O1 E+ f/ y2 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;% Z/ ~2 O" L" T- c
do/ {& Y% M5 }7 E- f! A5 u; k+ H
Lan := rootfolder.Internal.Tools.AOLlanguage;
, M/ F, U7 l$ ?) f4 o6 Q if current = @.Destination -- else return/ e* K+ x2 a, o1 J7 p8 y2 P: E
then7 q& ^% p0 Z ?
@.Destination := void;3 @( O% ^( U! a8 c- r& Q6 F: E
if @.occupied then
! ~7 f% d2 |; B E8 V/ C part := @.cont;/ h* O/ G) q' C5 A; X
@.transpOrder := void;
- h( j0 n" A; Z+ |. E, u+ _/ \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" R2 ]7 Z) ]( p/ j4 o; h) ~ @,root.eventcontroller.simTime);$ ~0 e% A' i$ v2 \, P7 ]9 b2 a
@.HasOrder := false;
; l! v Q4 d3 C# Q" E/ u @.DrivingHome := true;/ l7 }6 j3 t) w! E& i- u
rgManager.tryToStartTransOrder; H8 Y3 K+ ^3 P
if @.Destination = void
5 V+ ^/ Q" b& w2 ]0 m. A6 S then -- no transport order for vehicle @
+ v) z3 P7 H" h" U8 G3 w @.Destination :=
! D8 l1 }# J# y6 k* H rgManager.nearestFreeStation(@,track.~);" u& |" @6 v8 |
newDirection(@); 1 {: b" c! p/ W7 S# h3 @# Q5 l
if @.Destination /= void then
+ f+ G1 R1 x+ W! h4 A4 t9 P @.Destination.NumReservation :=
% B! D8 [$ G6 P% u8 ~ @.Destination.NumReservation + 1;
! i# p @6 i6 ~& E$ f end;- t( r5 W0 i/ \" w+ |: U% r. b3 S1 Y
@.CurrIcon := "drivingHome";
+ U6 ?- m# n. G0 [" \ @.DrivingHome := true;
2 v9 v' e" @$ _* t) R9 P end;
- _# W! ^- p5 Q4 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ N$ B: k, i8 H part := @.transpOrder;* P9 F, `& n! Q: g
part.move(@);-- load part
6 A& l" R. U8 K4 B B @.CurrIcon := "load";
0 r1 [5 T5 }1 n6 S4 @( X GlobalDistObj := part.globDestination;6 w" ?) b' m- L( F8 H; S
assignLObj := rgmanager.rgAssignL;
* P' c B; E/ b' J4 H row := assignLObj.getRowNo(GlobalDistObj);
; P* M, m. m! j! A/ _ if Row = -1 then -- since 70
; y" [# W! w8 p( q$ X' D4 G if lan=1 then/ `* d* N( H1 h) i4 k/ N- d' F" t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 k! W3 Y7 H1 v! B
to_str("in der Andockstation: \"",?.~.name,"\""));
$ F/ t: {6 y N H( A else
: ~. }! j5 w8 F- i- V. }0 U! h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 R" Z8 S! t5 b3 x to_str("in docking station: \"",?.~.name,"\""));
; S' D7 l" B2 ~/ _ end;
4 `% I2 `$ W& ]1 F8 N else
8 Q$ N# T& k- G% J/ S$ z. ^- C @.Destination := assignLObj[1,row];$ L+ _# N7 [8 \0 Y! R" L
end; , Z" S9 e- Y0 A* E. M1 X
newDirection(@);3 V8 ]$ w6 O0 J( p7 _" ]7 r
@.HasOrder := true;, F4 [/ g: y9 I8 b$ R& L& z+ V
end;/ {! H4 T( O1 n4 v
end;
$ J8 H3 Y5 }* t' d- I6 V3 O( Aend; -- of the method s3 q* \3 k: v/ }% z
|