/* called by: entrance ctrl of the object 'track'
8 Y7 F1 D3 M, i5 ]) u- c*/7 k( r7 r8 b8 K. [+ c; ~6 e' p
is6 y0 ? N6 e7 [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: `5 }5 b: _* Vdo8 w5 I8 F6 y# G" I! s
Lan := rootfolder.Internal.Tools.AOLlanguage;3 \$ i1 f* v; j2 Z7 j6 |
if current = @.Destination -- else return
8 @+ u3 y! N4 J; E then
% m4 w, u. L, f9 b5 L9 p3 L @.Destination := void;/ B& |8 y8 v w* O6 J( T: X& P; q
if @.occupied then$ V4 H0 M* D y& q$ [
part := @.cont;
. t) S# @5 I, M! t2 \5 m @.transpOrder := void;$ ~6 I* i* T2 g( f0 t% Y$ G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, z: G( R* z$ P0 @
@,root.eventcontroller.simTime);
0 `# K7 x0 W/ W+ z$ ~4 f6 R+ W @.HasOrder := false;
) b* X- \' [4 _9 V' X& ^ @.DrivingHome := true;7 _; @3 s' m; a2 q4 H$ d( {7 }+ x
rgManager.tryToStartTransOrder;& k& R; | {) n+ d4 @3 i- Z
if @.Destination = void7 d- E/ `7 _& s8 B
then -- no transport order for vehicle @, _) L& L+ V. Z1 u8 L0 D0 ?' v1 {
@.Destination :=9 v+ m/ j& O8 T/ d
rgManager.nearestFreeStation(@,track.~);
2 [, y7 G4 o. a newDirection(@);
9 C* l# M4 @$ r0 N8 ~6 e) Z! J if @.Destination /= void then
5 t {2 t" W, [6 `+ }: X @.Destination.NumReservation :=
d& H/ l) |( l @.Destination.NumReservation + 1;% |7 V1 q2 q3 g9 W9 ^( k
end;7 M. R4 T9 I# s+ E- a+ I& O
@.CurrIcon := "drivingHome";
+ J+ M$ e+ k% G) I0 ?+ l @.DrivingHome := true;8 \1 U( N2 n! z; X# N6 f
end;
- F& [" ^. Q( L1 _9 P2 O3 D9 q& v else -- the vehicle @ is empty, both vehicle and part are in the same dock station, U. B# c4 O0 S4 ]+ `* D
part := @.transpOrder;/ f/ }! @; L# G* x5 }& R' R* G
part.move(@);-- load part
& q* W& Y) Z8 ?$ y6 h* m7 f: n; T; ~ @.CurrIcon := "load";& t7 i) J. A2 K1 V8 C
GlobalDistObj := part.globDestination;8 N* R* E! u! k; i6 D' {
assignLObj := rgmanager.rgAssignL;' F! W: g& b7 ?4 u
row := assignLObj.getRowNo(GlobalDistObj);* k- @. [( G0 z$ P
if Row = -1 then -- since 70
F9 R0 u, a; [ if lan=1 then
" P$ E( p7 _# ?- X/ M# e1 F9 T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ M) z5 }! L7 O: W* P4 i3 o* O
to_str("in der Andockstation: \"",?.~.name,"\""));1 R0 `7 d w2 m8 x% M, }9 j
else
; i- A6 f- n8 [# ?* @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' P* V! ~0 P. R! g' ^
to_str("in docking station: \"",?.~.name,"\""));
1 y4 `! J" T" N+ U5 d: y0 U end;
0 H* x! Q5 o$ q0 i else
/ v4 f4 U) J5 |8 j2 A9 _ @.Destination := assignLObj[1,row];
: n% Z8 m0 x9 Z8 X* ? end; 0 K) U. ?8 {! H* ^+ x- H3 T
newDirection(@);* l C1 C' [. e6 `( P4 Q
@.HasOrder := true; [9 w) M# t, e; n2 l
end;1 ~0 O( V; u5 x f" U1 A
end;+ B5 b" _( H8 R5 ^9 ~8 X; h' D, X
end; -- of the method
7 ?; ]/ M; d4 r' O- U- Q- n |