/* called by: entrance ctrl of the object 'track'
4 E+ E# ~3 x& j*/
4 c# v3 G+ Y, z0 V. G' V* N* |3 R, Ois
/ B. G7 ]+ l8 \, h8 w B e part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% b. l6 Z9 q9 Odo! L/ t, Y% k1 D: |. }, B" h
Lan := rootfolder.Internal.Tools.AOLlanguage;
' A( M9 r9 u/ j5 j if current = @.Destination -- else return
2 i% P n+ b. m# A. [ then
, C4 _. u& ~/ u7 [: \. t, C4 W! h @.Destination := void;
7 Z/ ? r( Q/ c) s if @.occupied then3 D( f) N5 L8 z; B1 V) H4 H! o
part := @.cont;
e4 M2 P7 q$ n* y @.transpOrder := void;
5 D4 h- |/ C- y2 m8 Q, Z% q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 n+ W) x, n& C) I
@,root.eventcontroller.simTime);
* E# T2 w: r) I$ Y t @.HasOrder := false;+ T. D! ?7 I8 C, ~, n. y
@.DrivingHome := true;
~- ? ^2 {5 O rgManager.tryToStartTransOrder;
5 r& K7 l5 O" y6 ^0 c/ ` if @.Destination = void
; ~4 P+ y5 ^% Q6 S% f( C then -- no transport order for vehicle @
# G! o, U! [5 i- A& z @.Destination :=
' L8 n+ \ d9 X. z9 {" h rgManager.nearestFreeStation(@,track.~);9 T: g) h. _0 u( `& _& s
newDirection(@);
' Y" Y1 K! X8 [ if @.Destination /= void then
R7 z! o) a0 i @.Destination.NumReservation :=
; p, }/ ^3 Z- X! Z6 ~" R h @.Destination.NumReservation + 1;
5 U0 b; K- r. [! A+ L. H8 c) m end;- q, x5 e; x9 M* m
@.CurrIcon := "drivingHome";' _ n' f% _( z4 c( F4 l
@.DrivingHome := true;
+ j/ @ e0 l" h7 j end;/ P" i* j. e7 \$ U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& y8 [' {) K/ `3 u$ N; B
part := @.transpOrder;. X% _% N. q" g- Q1 {- r( L
part.move(@);-- load part! F$ C6 t1 e# K8 L* t: W! n
@.CurrIcon := "load";* M5 j0 o7 Y2 ^9 ^. i: y
GlobalDistObj := part.globDestination;
5 M# G& h# W5 z& g- y& v1 ? assignLObj := rgmanager.rgAssignL;/ W( {5 h ^- ] `- p, h2 \
row := assignLObj.getRowNo(GlobalDistObj);- X+ I0 j) ]1 s8 ]* ?; H$ h8 u4 g
if Row = -1 then -- since 70
) p2 @) B, M' @5 i if lan=1 then; [9 f# O4 v' e8 v* m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) n$ E" C8 f, I3 _' L) u
to_str("in der Andockstation: \"",?.~.name,"\""));
' m8 S$ [) j+ Q else
/ P. |# A% Y* ^, X9 J/ K- J. L5 r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ j7 j: l, j; ?1 a$ o" z
to_str("in docking station: \"",?.~.name,"\""));
. V. w+ I/ F8 o5 V$ q+ U end;
# z0 O" V' ~2 D" |- A1 G else
! Q ~" Z0 B, Y5 T \, d8 e @.Destination := assignLObj[1,row];
( p' z0 o5 c; H" U. i$ h( A, y end; ' m; W# N9 H! L# _
newDirection(@);
7 ?1 Z. `' D; M4 c( m @.HasOrder := true;
: x$ j3 j) \3 x end;
8 @7 l# ~; l$ G4 G3 B: ~% { end;
6 v" R) a7 {' A/ O; E: I8 Bend; -- of the method Y1 a; [: Z- ^! M9 ]1 S
|