/* called by: entrance ctrl of the object 'track'
$ L0 r: F+ a( ]8 J*/
1 o7 z5 A3 b4 l5 lis8 W( n7 p9 B3 Q' u7 d4 G5 J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
y0 r. d5 o4 ~do
1 f' L w" W; d3 a, M8 L5 c! c& s Lan := rootfolder.Internal.Tools.AOLlanguage;
0 Z8 \' T$ o0 s8 {( x+ A8 e8 I% x+ r: Q if current = @.Destination -- else return
, ^: m. g5 I) y# a4 ?& w6 A then
/ G1 @2 q" j9 x |/ S# @$ o @.Destination := void;! G9 Y& S! Q# |
if @.occupied then! X( O% K# y4 _7 r( z# [+ Z
part := @.cont;8 p& e7 O2 g _& U1 v) z" i; o
@.transpOrder := void;4 ` u5 T' X& c' Q/ v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 v( u# x: {# W5 f( k
@,root.eventcontroller.simTime);
# M8 M4 [) _9 b) `3 ^- K @.HasOrder := false;
* S7 Z# M# x) o3 V% Y1 r6 X7 q @.DrivingHome := true;
3 q+ C% s2 d* w4 f/ J rgManager.tryToStartTransOrder;
0 Z' y) {# D4 C* ] q2 h if @.Destination = void5 v9 N& `* L& ?1 U# P
then -- no transport order for vehicle @
& I- ~* S' o# y( |: j$ ? @.Destination :=! f3 x: B0 b' b( y, q# J
rgManager.nearestFreeStation(@,track.~);" i4 b" L# N& Z, [' k- o2 t/ m
newDirection(@);
) f4 C4 ^6 O; B2 R3 l0 Z4 | if @.Destination /= void then
% ~7 o7 Y: n0 l1 q( X @.Destination.NumReservation :=
" ~4 ]4 T- `: r* _ @.Destination.NumReservation + 1;
2 v0 [& Z* e2 H5 X9 C2 {+ N7 j P end;, _6 ]$ T4 g) i T/ w
@.CurrIcon := "drivingHome";
% i- L) X; T) b8 [4 U. K) W @.DrivingHome := true;5 d l: e3 U" L* r- d
end;! w( p2 [$ U0 h; j9 l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 m, W2 R K& x3 r
part := @.transpOrder;
8 h$ i- T4 z( M b1 |' R+ @) D part.move(@);-- load part
5 T5 Y$ U; L0 y4 ~! T' V0 h5 b @.CurrIcon := "load";
8 A# f! X8 x* K, M- N GlobalDistObj := part.globDestination;! _1 O, O# n! C& Q, T2 u1 z
assignLObj := rgmanager.rgAssignL;* Q h& F: r; N6 J$ W0 H
row := assignLObj.getRowNo(GlobalDistObj);! g; t3 p0 N' k! ?2 _
if Row = -1 then -- since 70' `- @1 ?% ]3 h/ k' ~7 ]
if lan=1 then" O7 E$ }# f% U, V" P- m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 G6 r h9 [' R" j to_str("in der Andockstation: \"",?.~.name,"\""));; n$ F" {: P6 `1 g- H5 P; Q
else
! I8 A# s |# l: q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 t$ O) T% v2 |9 N% |
to_str("in docking station: \"",?.~.name,"\"")); 5 W: Y4 V5 H& H
end;
; y K" M8 i0 j- k$ X else* f0 k* v% L* C3 E
@.Destination := assignLObj[1,row];
! a6 u* j! C8 f% k; { end; 6 h/ s" }/ S n7 h; f9 U' a( X8 w
newDirection(@);/ X, I$ T5 e, h6 B- n' G
@.HasOrder := true;
; f2 s& |+ G% v end;
0 S: g2 G6 F( N' ?+ K end;
# Y1 J! {" f( ^# t" J Rend; -- of the method6 R0 ~& C2 a% T$ R/ n7 Y' m, @; T
|