/* called by: entrance ctrl of the object 'track'
. R5 n7 P: g% X" m2 Z, P*/( c+ a% U( h, y4 q; |) q
is' X5 B+ f, ] q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% ^9 ]/ F ^0 e8 Z8 T6 |, Z1 @0 Vdo
5 Z+ a" v/ J0 B/ {7 [) S+ [ U Lan := rootfolder.Internal.Tools.AOLlanguage;; o! e5 ~. P5 T ]( [& F
if current = @.Destination -- else return
" X8 T, x7 r I7 P3 Z1 l6 s then: e6 V: g& |0 q* B
@.Destination := void;$ p6 V4 Y8 s2 O' l9 ^. ]
if @.occupied then
5 D- W7 B& C$ _# C. A part := @.cont;) P6 b* }1 i }# l! @3 g7 x& [* c
@.transpOrder := void;
/ P# N" |- Z& g' F, d4 d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 T0 h+ P L! W r @,root.eventcontroller.simTime);
' d: z* P7 C! a$ V7 S5 u @.HasOrder := false;
* P) \% r4 d( Y! }) U2 k2 s. e @.DrivingHome := true;/ b1 f, O! B# o% H
rgManager.tryToStartTransOrder;
* Q; w: K& F' T |. o! r if @.Destination = void
* B& J$ L J1 X l# N then -- no transport order for vehicle @
+ I" @ A+ r, ~ @.Destination :=
, u8 h( X6 F# F0 I rgManager.nearestFreeStation(@,track.~);! ?- r; V$ J3 `
newDirection(@); 8 c! i4 x" q" B* r# l6 O7 l
if @.Destination /= void then
8 e3 E3 }7 V8 P( V* \" W1 p @.Destination.NumReservation :=
5 C" G8 C7 H# ~+ m9 }. B @.Destination.NumReservation + 1;- a6 ]6 j; z' ~& ~: Q$ o+ ?7 G" M
end;
+ \! e4 g8 m! T/ i( a5 h/ y @.CurrIcon := "drivingHome";2 S7 y* b- `4 e! M
@.DrivingHome := true;" I( u( a- T5 V5 o$ K
end;
$ X+ y, b6 {0 t) ?5 Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 G( `6 N/ A9 c. _
part := @.transpOrder;
! L5 h+ g$ I; M" J, |; G part.move(@);-- load part2 \3 ^6 a6 q0 R! a
@.CurrIcon := "load";1 M! N. x* r9 u0 e
GlobalDistObj := part.globDestination;3 w' v. _- Y4 r/ b; u- k' Y2 `, `
assignLObj := rgmanager.rgAssignL;2 ^( s6 x. T7 j: p
row := assignLObj.getRowNo(GlobalDistObj);
, G b; [8 `3 N9 r+ o8 L$ s' m if Row = -1 then -- since 70
5 k9 d' {! r% `0 }' c& P; D if lan=1 then- c" c% @" F4 S+ E: e2 u/ f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; _ X |8 I' {) q( C to_str("in der Andockstation: \"",?.~.name,"\""));
) [) N8 u3 W. _- \7 U, H! h else
' F" C' L5 U F U. g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* t/ O6 r2 l9 b, F6 w1 n4 V
to_str("in docking station: \"",?.~.name,"\""));
# J: q+ L# t( M9 m" n end;% q% w8 _$ \! S0 W$ n9 H; |6 }$ J
else
6 a! T2 E o, X6 n2 u @.Destination := assignLObj[1,row];
' V3 N1 Z- J: w1 }# Y; A end; # @( E/ g; n$ b3 k- [* M
newDirection(@);: S, g5 M6 X. s
@.HasOrder := true;6 ]" R4 N; m { n
end;
6 L3 w: i% |8 u end;% y9 b/ R/ j7 j- B* P* R$ o6 [
end; -- of the method
3 c* ^& g. i* n |