/* called by: entrance ctrl of the object 'track'
& I/ M- V% C+ l1 G% L8 d*/+ D: |# X9 v5 j. Y1 K0 K" m# J
is
' z9 A8 A+ O3 g9 h part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% f+ |! [ J" `( k2 M( mdo
" ?' U0 ^# w( E. x) | Lan := rootfolder.Internal.Tools.AOLlanguage;; L( p" h) F9 e2 F+ ?
if current = @.Destination -- else return3 R+ K( p& [3 I( F4 h$ `+ f% d
then
! l6 B: P+ ?. i0 y @.Destination := void;
$ F5 t2 m( e2 M8 D6 F2 f+ O$ ` if @.occupied then
: J$ \% K0 m' \5 l5 [. U9 { part := @.cont;
K. y5 n& F9 `6 Z# ?0 r @.transpOrder := void;+ ]/ s+ A; y' {$ w4 p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 C1 ~7 S5 Q/ @% K7 t% D' D' B( k
@,root.eventcontroller.simTime);
# i- T$ h+ \* i5 E9 n C. L @.HasOrder := false;2 |6 C/ ^& e+ ?6 |3 o ^
@.DrivingHome := true;
* r2 O; B$ M3 A rgManager.tryToStartTransOrder;+ X, Q8 S# l- |! A' D |/ X
if @.Destination = void' F( i& c( E% e) C( x
then -- no transport order for vehicle @/ }/ Q2 {$ K" B3 H% v+ |
@.Destination :=+ d' i- E2 N1 V2 R
rgManager.nearestFreeStation(@,track.~);/ i; A* F& A- `2 y! r) B5 H1 u
newDirection(@); 8 f P6 z- ^4 V& \" G2 S
if @.Destination /= void then
) g5 k3 h' [6 i$ C g @.Destination.NumReservation :=! R; f, F/ r' I3 ]4 F
@.Destination.NumReservation + 1;7 ?0 g, ?" U4 n0 Y$ K. ?
end;
3 R& ?$ }2 a% R+ O8 z( P0 } @.CurrIcon := "drivingHome";5 F1 v0 \' Z+ d4 ]* i- s9 N9 a
@.DrivingHome := true;4 ^" l& G5 W1 O* C' X0 n, S( K
end; i: k0 V8 f. U3 R# [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 [1 G$ ^: A! ^2 Z) I$ d% M
part := @.transpOrder;6 v5 Y8 m' b$ i3 @6 k
part.move(@);-- load part! [6 S* R+ P \
@.CurrIcon := "load";2 u, \' F; a2 d1 N+ b" o9 R
GlobalDistObj := part.globDestination;
+ g1 {) `# V z: g6 p0 [/ U. c- x0 G Z assignLObj := rgmanager.rgAssignL;
# {$ J# H4 D* u8 O: C row := assignLObj.getRowNo(GlobalDistObj);
2 _4 h8 e7 Z+ u4 S O if Row = -1 then -- since 70
+ G8 L8 a4 R3 ?5 G# B: L if lan=1 then
9 J* `6 g$ D; R- u* N7 V v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 X$ G# c. T/ k, _* p
to_str("in der Andockstation: \"",?.~.name,"\""));
k9 ^; S, \2 U; ] else9 n1 Q, [' `1 j G3 v, [. r8 r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# {* Y3 `$ t8 {; |' P to_str("in docking station: \"",?.~.name,"\""));
% V& [+ i4 e$ _' b! @ end;/ Z! C0 W+ i' X M% b
else
5 K4 ^0 w$ ?- Q$ d% u" O @.Destination := assignLObj[1,row];
5 \7 E+ c' J1 ?2 ^. j y2 a6 J end;
: g+ w% w& n& A4 C4 u3 u newDirection(@);
; F: |! d7 N, ~9 J, m' ] @.HasOrder := true;* x, G2 u; P- y" c
end;
& {7 Q p, l ^0 z7 A4 b: f end;
0 u- M; }( y! O7 f- Dend; -- of the method6 J' N: U6 F/ _" |
|