/* called by: entrance ctrl of the object 'track'% _" u4 t+ ~& F5 l# h; k
*/7 \4 H* V2 [4 Q, u* n/ r
is/ |5 O4 F6 n& f" ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 L* W- Y& W2 a r
do D& T" q! b2 K, ^/ d3 I7 l7 t; D
Lan := rootfolder.Internal.Tools.AOLlanguage;8 z4 f/ r& g+ w5 d
if current = @.Destination -- else return; l2 l7 d) F7 n, k1 N
then
4 P* q, F6 c* ? @.Destination := void;
; s: ~" T- V; K# L8 _' o( Q if @.occupied then! q) u7 E9 k! N8 c6 ?" q5 N
part := @.cont;+ u8 N# [/ }' ^. I7 Q( Q
@.transpOrder := void;3 D, {: r. D+ d3 S4 V6 F5 H8 d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 Z5 Q c3 f6 y& c3 K
@,root.eventcontroller.simTime);
6 Z; Z0 Q7 e- }0 S+ A; [4 l) W @.HasOrder := false;) e- w$ C7 ?( _* Q# h
@.DrivingHome := true;
' W+ z+ Q/ F" t: _8 c rgManager.tryToStartTransOrder;
3 s: a# h' D6 W" u if @.Destination = void/ j) {. C. i2 t
then -- no transport order for vehicle @
/ X. F% i V9 \* ]6 z3 { @.Destination :=
. k$ K8 P8 Z* Z5 @$ I$ n9 j/ u! Y rgManager.nearestFreeStation(@,track.~);9 Q, I1 Z# b" B& B* f/ Z k& r/ s
newDirection(@); 7 o; ?. z% d$ A- k! z2 o6 `
if @.Destination /= void then
" m/ _ x5 I+ Q @.Destination.NumReservation :=2 d* A" r8 I3 q7 @7 Y# ?
@.Destination.NumReservation + 1;
% w/ T3 R& b9 c% B- f! J8 Z, k, v end;4 D# M- Z, `5 L' ~ L' p
@.CurrIcon := "drivingHome";
6 W( S' V+ l- s @.DrivingHome := true;2 J; V' U l r) d1 C% p$ b# d& S
end;
$ U. [+ D( C# c7 N: @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" s3 A- b* P0 w& p! j: H" N part := @.transpOrder;
9 s" i/ c# T6 |! |- f part.move(@);-- load part
t5 F* t5 u% b- U& n @.CurrIcon := "load";
' D# N5 h% B" E: s4 D GlobalDistObj := part.globDestination;4 N' E2 Q, t; s* }
assignLObj := rgmanager.rgAssignL;
* Y0 M% Q/ s& i! @, R row := assignLObj.getRowNo(GlobalDistObj);4 C0 ?' c( p; r" f! I6 c) W3 Y
if Row = -1 then -- since 708 p: ?& @3 n4 `3 w2 w' d
if lan=1 then
& ~0 u8 y5 Z- u0 M3 J; V+ c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 W- ^7 J/ x: b) U9 E* @
to_str("in der Andockstation: \"",?.~.name,"\""));
# z7 w9 [4 K# ^& x( ~ w. s& a else, Y+ D# L T" c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 E/ F. f) k5 u9 x, w to_str("in docking station: \"",?.~.name,"\""));
3 Z: ` z. n4 Y* [$ a( b0 `0 }: p: V end;+ X9 ^1 l( q: N7 {0 e
else
5 g" \, H4 Y' ^ @.Destination := assignLObj[1,row];" u1 {+ b% g3 l8 ]4 M
end; ; [5 @& ]4 ?5 X" w# y6 e. d: F
newDirection(@);
* O! M4 c9 I$ x, [" ?0 ^ @.HasOrder := true;
s4 ~0 N5 H; I. @; [1 \) h7 E end;
3 [ m" J; o3 F- c; z end;
& u* r3 O( O1 o) M2 W- n( Aend; -- of the method: w5 `7 m7 A/ ]+ }
|