/* called by: entrance ctrl of the object 'track'
6 u% w& U5 z& G9 ], Q* n*/
h' k, N3 v: b% G/ M$ q9 b N, ~is
' j; W+ L! u3 J# A part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 ^5 n/ N* M2 y) Y, L o
do* l; i; d" n4 P" ^ E
Lan := rootfolder.Internal.Tools.AOLlanguage;
% ?7 h3 r& L Y if current = @.Destination -- else return" h" H/ k6 d) C6 W5 E3 b3 Z4 d
then; L6 c$ T: @* ?/ p7 e% ?
@.Destination := void;
- T7 [/ H. n- ]; T7 r if @.occupied then8 Q+ ^1 A( @4 p& d7 I7 G/ `5 P: P
part := @.cont;
8 W; D3 u" x q @.transpOrder := void;0 a+ D Q/ q# U0 n! ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* E) d4 G5 _/ M" z" p
@,root.eventcontroller.simTime);. l; n0 T# u$ C! q7 A7 f
@.HasOrder := false;2 s6 ^6 m# O9 H$ n- {
@.DrivingHome := true;
W7 X3 j& `6 n) l( }9 A! ` rgManager.tryToStartTransOrder;+ e) G% p! ]9 F
if @.Destination = void, r9 L! G" S3 O; v7 y8 p3 D, I3 m
then -- no transport order for vehicle @
$ a! J m& ^3 T3 z$ V4 N9 R( \ @.Destination :=
: x+ ~0 r8 d$ {0 e7 x8 A rgManager.nearestFreeStation(@,track.~);8 Q2 z4 L8 i; o+ O0 [
newDirection(@); 9 P) w- S: ~1 J# ~$ G
if @.Destination /= void then
) o# x; Y' S2 r/ g' k& m @.Destination.NumReservation :=% Y8 O' Q+ a0 A9 ~
@.Destination.NumReservation + 1;) E) u3 G0 |4 }2 P; |- |
end;( b( t5 k `. i" e& R
@.CurrIcon := "drivingHome";( H, A9 [- R, N5 U" M; l
@.DrivingHome := true;, p+ H5 F1 ` M, g% m
end;
6 Y2 K& M' H4 m+ K2 T H else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ J& {6 i/ e8 S- G ^& c& Z5 Z
part := @.transpOrder;
! }& _ N s$ l4 R part.move(@);-- load part
4 d' g R; i8 ]5 ?" _ @.CurrIcon := "load";# B9 [) y( D0 P0 I9 U; @' X
GlobalDistObj := part.globDestination;6 f7 C; n9 G$ D4 X7 O. Z& C0 ^
assignLObj := rgmanager.rgAssignL;
9 e2 B8 O9 _; c1 `+ l row := assignLObj.getRowNo(GlobalDistObj);, N6 {; L$ |; Z2 e* V/ Q
if Row = -1 then -- since 70
" x4 \8 k1 p9 j, ]! } if lan=1 then
, Z7 a/ ?4 ^; c" u+ f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," |' D" P9 g/ j' T
to_str("in der Andockstation: \"",?.~.name,"\""));! q6 H& T. `, z( C6 q& H
else3 e4 L6 ?* b8 g2 K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 H* x- w6 ?* O0 t! a, @0 P
to_str("in docking station: \"",?.~.name,"\"")); , M+ ^5 z" {( r5 _# e
end;8 ]3 k0 G% p6 C$ U
else$ U9 C$ u. [4 |: Q+ \
@.Destination := assignLObj[1,row];, a1 j3 Q0 w8 o S' x3 ~
end;
* A/ E( f. [. S# y( S newDirection(@);
3 s( h: ^# w+ m! ~( } @.HasOrder := true;1 m1 u6 T& O; x* J
end;
0 ^7 g1 W/ u% ^. o9 X+ I end;
* ~4 F# j; o- B4 yend; -- of the method' I8 y) y; k, n/ K
|