/* called by: entrance ctrl of the object 'track'/ y, N6 l7 R0 r
*/" { D" B& K7 @8 v- L/ v C6 c- ]9 a
is! T' \ t1 D) v E7 t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
r z3 K3 E" M& E) z4 m- }1 Mdo
* g* A' F- h9 u+ @9 Z Lan := rootfolder.Internal.Tools.AOLlanguage;3 S+ K. r3 x* o* U1 v- g) b/ ]$ W
if current = @.Destination -- else return! y! L: N% i+ B! z# I" K4 I" x8 {9 f
then
3 Y% m0 l- p" J" i @.Destination := void;
. R" y; S9 f7 R) R8 z if @.occupied then9 i4 ^/ I: o1 ^6 G' F) P
part := @.cont;0 ~3 F( \1 ?, @, Q' F4 ?
@.transpOrder := void;1 K4 ^& f; f2 t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 T/ o7 o1 @: o7 F$ F7 w @,root.eventcontroller.simTime);
5 @2 @$ B9 z' U% _3 H @.HasOrder := false;
8 e2 v- d4 O' k- i/ ^ @.DrivingHome := true;
% {2 S5 o/ i) g rgManager.tryToStartTransOrder; ?7 C- Y3 g; m. S. [/ Z
if @.Destination = void
0 V- S( @6 e1 k" g6 G then -- no transport order for vehicle @! M- m( ?" F3 e; {
@.Destination :=6 P; [+ s/ _. ?
rgManager.nearestFreeStation(@,track.~);
5 x9 l2 z6 m2 ~, Y; t& U2 [ newDirection(@);
# X, G0 e4 W# R+ t* C! Y' ~ if @.Destination /= void then
' O0 j/ o8 T+ B8 z/ Y( ? w( U @.Destination.NumReservation :=
" b) M/ ]9 H7 A/ w1 n) x2 z @.Destination.NumReservation + 1;
; K6 L# t. |1 t" q' ^ end;! V( j0 u# ?8 K! h; H6 T
@.CurrIcon := "drivingHome";
4 w/ j+ g& I1 K$ x/ k7 m9 } @.DrivingHome := true;
' V; K+ o% D9 ^/ ]6 Y end;
+ K: ~8 H, m! K else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 I4 B- Z4 n& ?; Q% j part := @.transpOrder;% z+ k7 R$ R, V+ r
part.move(@);-- load part
3 J* d8 R! m! u6 t2 S+ M @.CurrIcon := "load"; u- d! y6 W6 \* W. {; d; z- p
GlobalDistObj := part.globDestination;2 K: u: c0 `$ `: m$ P# k# c
assignLObj := rgmanager.rgAssignL;
* ^2 ~. y) o( L( \ Q row := assignLObj.getRowNo(GlobalDistObj);
$ V0 [& ~* F" P+ @ if Row = -1 then -- since 70
b) D6 |* P7 C- n0 h& w if lan=1 then' K8 J7 Y4 e- M3 Q/ c
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' ^- Z5 v" C# \9 {: k
to_str("in der Andockstation: \"",?.~.name,"\""));2 O4 w ~" @3 q3 L o
else
; [# @- Y O) v* p1 F1 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 ~1 g; V0 W; ]$ k$ Y7 l+ v2 c to_str("in docking station: \"",?.~.name,"\"")); 7 ?- _, m: }8 u) t" Y- R' m
end;
5 D W! c. T# }" }4 q else
1 Y7 N/ d @" E S7 \ @.Destination := assignLObj[1,row];6 _% A. A* p# `5 R2 o3 B6 `3 s
end; E% b! R! S3 C$ E' D
newDirection(@);
9 W# {* p9 K- P( h1 y @.HasOrder := true;
5 K0 Q |, v; c9 V8 R; x end;: _/ X5 r$ }8 T2 t. Z
end;+ ^: [: f' c5 I, a8 D( P% f5 }
end; -- of the method, c. r. L7 l/ e* `2 s8 H
|