/* called by: entrance ctrl of the object 'track'
! K+ t; w$ P1 h! k: N7 Y*/
3 v1 T. Z8 x7 J5 L: m: ~9 V3 Uis5 E- L. u5 F G/ k# M" Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( L. B7 k" U9 H7 ] Xdo
0 K$ x+ Q; } o8 f: `8 h Lan := rootfolder.Internal.Tools.AOLlanguage;7 q5 ?$ q' H1 x. e% q/ [
if current = @.Destination -- else return% L0 h s, L$ o1 H- y
then$ [" \4 d& X4 Z7 @' w
@.Destination := void;
, I; i" K" {" b, ~ if @.occupied then
+ i% I% E ?9 Z. E9 M$ a W- h- H8 ] part := @.cont;
e; k: j6 O9 G" H3 e* r @.transpOrder := void;9 t( x; ^; x) W/ P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( M; I$ W6 \1 |4 P a* Q @,root.eventcontroller.simTime);* X3 h1 r7 S8 t3 ^ ~( y
@.HasOrder := false;
k1 [1 e+ {' L- j5 F7 F H @.DrivingHome := true;* I6 r8 K* _0 o* K& F% m
rgManager.tryToStartTransOrder;
! ?. C7 ^: ?* ~ j if @.Destination = void
- P d4 \# S4 z: N+ Q then -- no transport order for vehicle @2 J+ b& |# }5 Z
@.Destination :=& C& Q5 V, t( k
rgManager.nearestFreeStation(@,track.~);
6 |7 e. z; ?3 A. o5 Z% C$ z/ Q1 O newDirection(@);
- l- h$ l; o# m if @.Destination /= void then
, [1 r1 \. |$ X3 R' t$ c+ A' f @.Destination.NumReservation :=
; w5 A( L O4 ]# `3 O, m @.Destination.NumReservation + 1;% {6 p% N) {3 c5 }# G
end;
" ?/ B7 ?9 s+ r$ N( z) O @.CurrIcon := "drivingHome";
/ e3 r. X1 {. v @.DrivingHome := true;
" C, e, {/ G( E2 @9 N end;
% { H$ O& u: d: b else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 i9 Z/ s$ D- R1 [9 E% d" G; `
part := @.transpOrder;
5 f* N! t, U y- W6 a; r' } part.move(@);-- load part$ E, y! o! P0 W- Y" @8 ]4 I3 H* Z
@.CurrIcon := "load";
6 R7 d2 ?4 _% a0 w3 N GlobalDistObj := part.globDestination;2 N! I# N+ j9 ~- u; T/ R1 J# i
assignLObj := rgmanager.rgAssignL;6 a/ B- V2 o9 h _- W0 {# l" l
row := assignLObj.getRowNo(GlobalDistObj);
) I/ V% i5 S; \ if Row = -1 then -- since 70
0 `+ C; G3 j6 V" S9 F* y, i if lan=1 then
& [( j' t# J0 p' B7 g+ m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! T& V: c$ _1 r0 r
to_str("in der Andockstation: \"",?.~.name,"\""));
! T+ L% ~* [+ s: @) O8 E* q else
& k9 t% I+ M, m% k# ]+ W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- h" {9 f8 V' i b! \; r; y
to_str("in docking station: \"",?.~.name,"\"")); - Q+ `" _$ A# B0 ]; ?! B' ^4 |
end;8 T, G# v& K9 U: e {/ r, O4 W" r" {
else- i s: z7 ~5 p& ]0 P1 e5 x
@.Destination := assignLObj[1,row];
/ d) a. h1 P+ h" ] end;
- k0 x# T: m; R: [0 U newDirection(@);
+ E8 r! v. }3 K @.HasOrder := true;
. x9 g1 }( |3 i5 X) ?" V end;
, q& K& ?- M& Q7 \& I6 }) W end;0 t& B: x4 k5 e% P. g. w# |7 A. |
end; -- of the method" c: N$ y5 J' C8 R
|