/* called by: entrance ctrl of the object 'track'
8 x. q* m9 f+ k' L*/7 n! ^+ ]" l! t/ o
is/ L+ ~2 g7 ?# j
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 W% w7 f+ C' @1 M* \' ydo' k4 X5 [0 k4 M* Z+ h4 Z- x+ L6 G
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 V5 z0 L$ v5 O: p, S' r if current = @.Destination -- else return
* o; J/ p% ]: L% L8 a- I" N then
% c$ K5 s. j* c. V1 P% J5 c$ J @.Destination := void;4 \" \! e) j- I' R- u
if @.occupied then- l4 s# s* _7 E' r
part := @.cont;
2 b; m2 v, S p# q) b @.transpOrder := void;" }% o# C% B4 Q/ {& `7 X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- z' o( Q& b! ? @,root.eventcontroller.simTime);
% e6 R0 j, O7 M; f3 o5 Z0 I @.HasOrder := false;
% K' {: t; _5 R; W @.DrivingHome := true;3 a7 m9 f) E+ v) ]
rgManager.tryToStartTransOrder;
% I1 a, y$ B1 V; ~ i1 d if @.Destination = void
; ]2 {* I, p# d then -- no transport order for vehicle @1 _$ ]; h( i+ p z2 S5 S: Q# c; K6 S! H
@.Destination :=
" K5 f I5 b0 `* w' A* r rgManager.nearestFreeStation(@,track.~);% F1 I3 u; `3 X& D6 J- \/ ]
newDirection(@);
% {( |8 P( d( ~9 s e if @.Destination /= void then
8 X6 N' W: m+ Z; m; w& m @.Destination.NumReservation :=
) B; D4 Z5 r. l @.Destination.NumReservation + 1;
) C' X4 t* G% m; D3 J end;: I% R% D2 S, B& T: F: I B
@.CurrIcon := "drivingHome";! g( o' K% O4 ^5 I0 d6 P: _
@.DrivingHome := true;! W1 Q* R( K+ r4 `9 m
end;
. g9 l0 f/ a. m8 {6 `6 {. } else -- the vehicle @ is empty, both vehicle and part are in the same dock station }" N2 w5 X* l
part := @.transpOrder;5 X7 }0 s. }, J
part.move(@);-- load part4 U8 K1 D$ g! l, R( P( ]# D
@.CurrIcon := "load";* G+ Q: C7 U3 z+ O
GlobalDistObj := part.globDestination;
9 k1 }$ j+ |. Y1 t4 c& y assignLObj := rgmanager.rgAssignL;/ l) O# n% z$ p+ g# k2 W2 c7 t
row := assignLObj.getRowNo(GlobalDistObj);! u9 o) D9 m0 h/ L
if Row = -1 then -- since 70
, {7 X* a3 a8 t if lan=1 then
: Z" [- v* v4 F6 x0 c' G" ~* K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 X9 X9 Y7 {! v6 L6 D
to_str("in der Andockstation: \"",?.~.name,"\""));" p$ L5 t# a# y. N, q% V4 G$ I
else
% o2 @% l, G5 M; W, i9 k( g+ \2 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 U9 d4 n+ i2 K9 B" J: k% l
to_str("in docking station: \"",?.~.name,"\""));
, ~- ?; |! I2 q/ k7 w- a; D end;. U3 g( A# V! s
else
8 I% [; o0 \8 g4 y) Z9 m @.Destination := assignLObj[1,row];( d3 w0 N+ G/ E' A
end;
} \7 f4 @ V2 _: F8 R4 V newDirection(@);
7 K( V3 g$ B# k* [ @.HasOrder := true;
; y2 N1 @6 W/ _9 _2 n7 m; a; l end;/ O& \0 Q7 y: }6 k! ^+ S) [3 C! U8 W; F
end;
: I& h9 U1 U7 h$ T( Dend; -- of the method0 D, U; B Y. E
|