/* called by: entrance ctrl of the object 'track'/ l/ H; F: U& x- z2 d* b
*/
. u7 Y3 F. |( i" l6 o/ n) a7 Z7 xis
, U8 T" N* c4 v0 A1 a" _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;" V7 h5 C0 L2 z- `: O, l
do) H3 @9 T3 \' S$ d8 @7 p
Lan := rootfolder.Internal.Tools.AOLlanguage;4 m, M) c; `6 |7 P" v8 o4 o/ l& \& Q
if current = @.Destination -- else return, B' K# r' ?+ C: D$ ^1 a3 `/ p
then
7 [% G- h6 N* i @.Destination := void;
% @! L( q" B, m( @ if @.occupied then
( k' ?" ?- ^" M, Y+ q1 ] part := @.cont; A, O, Y# i: x; C ^
@.transpOrder := void;
: s5 S+ W# _0 B, G, [+ I# d6 o2 Y8 R& j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 a5 ^' g) \5 e: h# Q' n @,root.eventcontroller.simTime);8 w# ]* V, a% {$ }. y' m
@.HasOrder := false;
& |8 ?7 d% \$ o" @* g2 g% j @.DrivingHome := true;) b6 s( L# f" w
rgManager.tryToStartTransOrder;
8 g! a9 c' _9 ~( X8 V" M2 [' k3 w if @.Destination = void: |, ]1 i, m2 ]- j; D- R* U9 }* e
then -- no transport order for vehicle @+ ~6 M; X! f, q5 O. t: L( c4 a
@.Destination :=4 @! F- Y' ~/ C8 l" a4 g K0 M' l
rgManager.nearestFreeStation(@,track.~);
h$ H d& _% R; k; H" g7 z% u9 V } newDirection(@);
( S) B5 \( |4 T, s3 o if @.Destination /= void then
+ g; |. W; K3 R. x @.Destination.NumReservation :=+ i+ _( ^/ h& Y3 D: I9 X* ^
@.Destination.NumReservation + 1;
( { k: t* O1 {! b& e) Q" B end;
' b% ^0 m) l/ G+ U% [ @.CurrIcon := "drivingHome";
7 B7 V( e) S# k; F; C- J: d @.DrivingHome := true;
" T! {. q* _4 K( p3 e+ f8 j end;! k# d3 F0 @8 S: o) ]8 U2 P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 S5 n3 F6 ^9 D& p+ H" `/ N' M/ [' s
part := @.transpOrder;
1 D/ E! D0 u$ L" A! N* { part.move(@);-- load part/ h2 H1 T4 E8 k' a4 V! b5 j# ?
@.CurrIcon := "load";/ I- Y# \0 z$ B
GlobalDistObj := part.globDestination;
- W* Q& Y' u; C assignLObj := rgmanager.rgAssignL;# q0 ^% u. A2 n2 [( C
row := assignLObj.getRowNo(GlobalDistObj);
5 m! f3 k% h% T7 Y2 Y# s/ h' ]+ } if Row = -1 then -- since 70
4 Q$ D; q& I/ X% H) [ if lan=1 then
g/ p3 G; d$ p' w# Z: i' c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ L/ z4 o+ c8 K" B to_str("in der Andockstation: \"",?.~.name,"\""));
c* [$ G- W2 C else5 {* F l" ]! D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 b9 O/ Y) {" W. N to_str("in docking station: \"",?.~.name,"\""));
+ X! n0 d7 Q* F0 i& t% \ end;4 p ~/ F7 Q6 Y6 N9 ^# b
else1 ^$ |0 ]4 b2 i; J+ t( a7 h
@.Destination := assignLObj[1,row];1 v* L3 G J; A8 P! T' x% ]/ w+ v4 s
end; P* Q7 X, I. z2 a
newDirection(@);7 A, ]& f+ j% _( b. f/ A
@.HasOrder := true;1 _' v F2 z2 j& Q& y ?
end;
$ O+ \' I# e1 G$ l$ k end;
' G1 A) e" ]$ B8 L1 u: V- x# Oend; -- of the method
" `0 k4 n' A9 y+ Q |