/* called by: entrance ctrl of the object 'track'
9 b9 {2 J9 y' \) s1 S*/
G- B1 K0 L6 c$ Eis
( B, P& w! O: ]% O( I/ n) @" S( C8 ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;, k1 F% e9 l% q# h0 {: K7 Z
do! j6 Q% I0 g% y; M
Lan := rootfolder.Internal.Tools.AOLlanguage;* ]8 J# N. H8 E% J, Z9 a' }& Z. G# ~
if current = @.Destination -- else return) r/ ]7 v8 T: A6 i
then
* @6 i% V! N: I8 i, k, x: p4 m5 U @.Destination := void;6 j) _0 x* `) S- h
if @.occupied then
+ [0 p+ j* K2 ?! u part := @.cont;
9 p; [" t) @8 ~ @.transpOrder := void;
. S; g+ ]7 p& S5 r4 w1 I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" `7 o( b' t0 b2 I! e0 M @,root.eventcontroller.simTime);2 Z2 G0 K" @+ J/ R/ w* j
@.HasOrder := false;
W% P9 X3 h8 u9 M, i @.DrivingHome := true;
; J5 o2 o8 n/ \ rgManager.tryToStartTransOrder;# A; b& H! k1 O1 M8 ]5 \! y
if @.Destination = void
: u$ }3 x$ v) k! W then -- no transport order for vehicle @, T7 `1 Q3 X- V! L9 ^- F3 I$ u
@.Destination :=
, X; Z- [8 q. N* i# I v* y [$ T, Y rgManager.nearestFreeStation(@,track.~);
$ k5 P$ H1 W* H; z& W0 E newDirection(@); 1 ?5 ] ^3 E4 p$ j: S7 p9 }
if @.Destination /= void then
3 R8 }$ O. m. W: B9 ] @.Destination.NumReservation :=
2 v; K8 p8 b$ O! B& V0 t: J1 m; E @.Destination.NumReservation + 1;
: Y7 K% s, [+ E8 s* d- ~" B end;
3 b$ q: R& |+ Z8 Y" f @.CurrIcon := "drivingHome";
9 A' F" V$ A2 e1 Q" [' ~9 S @.DrivingHome := true;
- x7 s, H* v1 ~+ I+ b end;
1 P3 G* T' s( D else -- the vehicle @ is empty, both vehicle and part are in the same dock station: O, K O. N9 W9 n2 M
part := @.transpOrder;' D. F' F$ g) Z3 `% L
part.move(@);-- load part
: s: Y( k! }8 W- d9 D4 [: e @.CurrIcon := "load";
! i* Y) a+ V/ m+ Q GlobalDistObj := part.globDestination;
+ |5 } N$ w8 R assignLObj := rgmanager.rgAssignL;# R7 Q( x( C) d% F- D, ]5 |
row := assignLObj.getRowNo(GlobalDistObj);
2 X3 V9 b; Y: p if Row = -1 then -- since 70
/ Y2 O8 t- T1 D* w# t' A. y if lan=1 then
$ u5 M: q0 ~# D9 W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# X: [7 ^6 ?# e$ S4 _' X to_str("in der Andockstation: \"",?.~.name,"\""));
0 r- [# ]% T1 B7 _ else
. ^2 _, X9 V: ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' R7 B' j) y# }. ~- L, a& h. `: K
to_str("in docking station: \"",?.~.name,"\"")); 6 j5 I8 b j& v' ~5 i6 J, x
end;
( a, x+ C, m$ E) ~5 E$ c else
( w! _0 J6 ^# o0 o @.Destination := assignLObj[1,row];
/ |' t& o; `, b) m w: i0 t end; 6 I2 ~& [# w. p: g: V' x8 |8 X
newDirection(@);& t' w& t; z6 A8 w
@.HasOrder := true;+ ^: O/ v0 B' G3 E
end;; \8 D& V1 b3 v
end;
9 Y% C ]. ]* p! N) W3 l4 a Oend; -- of the method
0 p2 f/ o- H p8 \$ H M7 w |