/* called by: entrance ctrl of the object 'track'3 D2 b" s/ ?) ^4 Z
*/
7 y! Z/ q( }9 c+ {+ t3 Vis
/ F: J4 }; L& Z) L2 ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 @1 T. p* h. r9 p+ f5 k
do+ w6 h# [7 b3 K( r' o6 d9 u3 I) z, F
Lan := rootfolder.Internal.Tools.AOLlanguage;3 g7 z w' z) F6 R, I
if current = @.Destination -- else return4 v/ {0 [. b. \% C$ m' g
then
# f9 ~& f+ w1 w3 w+ F- v- | @.Destination := void;
4 m( n/ q$ W. x4 ]" R9 M if @.occupied then
) ?0 E% i* o8 Q1 _% T$ j part := @.cont;
. l* Y! J! v) O0 }: ^3 a @.transpOrder := void;0 q$ M5 y3 u* O; T+ j# p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 @, W: E0 Y j2 l @,root.eventcontroller.simTime);
$ N2 T0 k1 K0 o @.HasOrder := false;
+ f2 R0 D! a4 e& N# V+ o, S* F7 F @.DrivingHome := true;; U% h- k& L8 ]: J. p4 G* i
rgManager.tryToStartTransOrder;) v2 Q8 S H. Y0 R4 |9 E7 b% \
if @.Destination = void6 B$ J$ K# A: K3 k
then -- no transport order for vehicle @1 Z: k2 g& n; Y& E5 M
@.Destination :=
/ n5 L* \, E" x% N rgManager.nearestFreeStation(@,track.~);; x% U- d+ J4 { C; V
newDirection(@);
3 O/ a" P+ K; `4 B0 `0 i if @.Destination /= void then
* A: _" f* G8 I" N8 | @.Destination.NumReservation :=% |' c# m: b4 T+ y* N
@.Destination.NumReservation + 1;. y# y6 q; }1 d9 q7 K' n
end;
( x& L/ B! z' @( D @.CurrIcon := "drivingHome";
6 \8 N' T# ^ v+ l @.DrivingHome := true;/ V9 E0 H& l0 |" o! M# n. X, |
end;
! t/ i) x( B6 I" r+ r else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 b. H9 f& |5 {" y! c7 f part := @.transpOrder;
$ A: ?! ?4 I8 X* m part.move(@);-- load part
h0 R$ S7 Y/ F6 v* C8 U" | @.CurrIcon := "load";
- M8 Q: X9 G% B8 V+ s GlobalDistObj := part.globDestination;
! q8 Q' F/ T6 H, |4 [ assignLObj := rgmanager.rgAssignL;
0 H5 Y V5 g- N1 u% ^: _4 z row := assignLObj.getRowNo(GlobalDistObj);" j; D, y9 R Y5 i
if Row = -1 then -- since 701 W: \) d' ]6 M D
if lan=1 then
6 K7 L% T1 w' i; a4 ^7 I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" T, X! o8 Q3 p* x4 ^ d to_str("in der Andockstation: \"",?.~.name,"\""));! q% s& @: U6 l$ s0 w% V K
else
3 ~/ I$ l- U- t" S% C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! X3 g6 j) p8 e4 B# o* U
to_str("in docking station: \"",?.~.name,"\"")); ( W) J0 ^! c# O3 j- `# J
end;! k$ k7 o7 h2 E! n
else
+ d0 _- {; G% U! j+ n @.Destination := assignLObj[1,row];' R* _8 x6 V; Z8 Y% I
end; , u- Y n# F* Q
newDirection(@);) Z1 H) F- `. X& W: N
@.HasOrder := true;
5 D' L: r0 |! t! h end;
- A7 R s" p: B" S$ x end;
/ N4 _5 z0 z: i# e! E3 \end; -- of the method
: r& g- S4 n& Q- R8 o, ^ |