/* called by: entrance ctrl of the object 'track'
5 j% H4 v9 y, q* h' E*/
! U% S" A* R, D; \1 G( ]is
s/ t. ]: f. \: w part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 S- s; {- B$ C, x0 e0 e- f$ e
do c/ @& v- h% M$ y, W0 O; w
Lan := rootfolder.Internal.Tools.AOLlanguage;
@' h$ @1 G5 c if current = @.Destination -- else return
( ?- H- |! j9 V7 q then
; N; S5 \+ y) ^: D+ i @.Destination := void;
+ K8 s/ |6 T: }( ` if @.occupied then
, r9 U$ I1 `: y2 o: L# c2 q part := @.cont;; D# c" U: j: V
@.transpOrder := void;! Q$ z1 n. O& }# Y% Q, j! h( w$ |9 b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, t n" l& X! Z2 P
@,root.eventcontroller.simTime);
; F: s. ~9 c7 t, Z# L @.HasOrder := false;
- z5 e( O' W' D6 j0 K u6 m, `# w @.DrivingHome := true;+ K: V4 D' Q% Y6 n8 [# b& `
rgManager.tryToStartTransOrder;
- N$ M" @% {4 ]1 [4 f if @.Destination = void
4 Z1 i6 g/ P7 \( q+ z& |0 H then -- no transport order for vehicle @
- w5 s" q U3 \' [ @.Destination :=
" s1 a+ D7 `5 S6 v( b( C rgManager.nearestFreeStation(@,track.~);
" c% G% b& f5 W3 F( m9 h newDirection(@); . Z/ f; d3 Z6 G8 C3 Z+ s
if @.Destination /= void then$ H! \; n1 b3 Q( G
@.Destination.NumReservation :=
; o" n; F3 T P3 G# a, @% M @.Destination.NumReservation + 1;1 P8 x8 S$ z p- ?: W& Y$ j$ {
end;
2 `4 c: b' z& C5 m# V, E @.CurrIcon := "drivingHome";$ @* t8 w- ]2 O
@.DrivingHome := true;4 ?( Z; a) b m1 ^* \2 h
end;
4 T+ v6 n9 v/ P' w, V" R else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ a8 m5 Y6 r5 t% Z part := @.transpOrder;5 t$ \0 |( t- I& f" _( ^
part.move(@);-- load part
0 A' N% u: ~, v4 ~1 f. I @.CurrIcon := "load";
; r0 X- A5 }& Q2 L/ q) o GlobalDistObj := part.globDestination;& Z! {4 F1 Z; ]# h( V
assignLObj := rgmanager.rgAssignL;
, \" G' T# u0 D: J8 x8 s row := assignLObj.getRowNo(GlobalDistObj);
) J' T" ~+ i8 U# m E$ T- j if Row = -1 then -- since 700 d0 K' M- z2 h0 `& l0 `5 ?6 D8 f
if lan=1 then4 p4 y( V" m4 {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, b) I! ?5 m$ t0 G
to_str("in der Andockstation: \"",?.~.name,"\"")); R* u- \. _: m- O5 Q; F1 o
else- {6 S2 E, Y8 Z! K5 q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 A1 C5 ^' ?# |/ Y to_str("in docking station: \"",?.~.name,"\""));
' V$ U1 `, f! V E4 }- w; F! W! q end;
4 B6 z' I! ^& J! f! \) J1 T else
: R$ `( G! A: s; ~' @ @.Destination := assignLObj[1,row];0 Z1 w5 K0 u/ d- m
end;
3 T& U7 Q4 [$ @: l9 f" H9 D newDirection(@);: H* s. Q) E) B/ V
@.HasOrder := true;
$ e* m: |5 Q. t; h @% V+ c end;
* y0 w) ~& ^' H$ {% d- h; y end;
" M) G L2 A8 |! Bend; -- of the method
) ]! ~. J0 ?3 s; A; @* L$ @ |