/* called by: entrance ctrl of the object 'track'; q2 p: k2 o$ H) D: O4 c; u
*/' S+ q C- x1 E- m- _
is
T* l3 p) R: f7 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;' B" u4 Y: u" u1 R* H* A3 O
do0 J2 D2 z4 l6 t" x
Lan := rootfolder.Internal.Tools.AOLlanguage;8 H8 b% S9 }$ U$ {, h
if current = @.Destination -- else return
" C5 B1 C7 d9 b% y1 { then
' ^/ E* N) H9 u/ _" s1 W @.Destination := void;
& q, A5 S" t+ S9 r if @.occupied then
8 J' f6 \3 D5 k part := @.cont; O: N( }3 m& n0 u7 f8 p
@.transpOrder := void;
) A3 g* Z. [1 G part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 @( z2 ?) Z& {3 @ @,root.eventcontroller.simTime);3 k3 U* _; R, \7 \- L* V
@.HasOrder := false;
( T* T! `5 e7 _! Q% U- p @.DrivingHome := true;0 B" A$ q0 _0 h4 G+ \
rgManager.tryToStartTransOrder;
3 I+ d) |* B0 Y if @.Destination = void( w1 ~# h/ z" ]/ P9 z! M
then -- no transport order for vehicle @
# ?, I( X z( q5 I$ u7 |) P @.Destination :=" ? R4 x) H' {+ I% E4 d3 A
rgManager.nearestFreeStation(@,track.~);
8 Q1 e: [; u' l6 J0 l3 d8 M' Q, ~ newDirection(@); . S2 w( O& _# p! L) X
if @.Destination /= void then
3 A$ O* [3 d9 m @.Destination.NumReservation :=
+ f% W# G1 a- {$ ]/ V& y* h: W @.Destination.NumReservation + 1;
- [' H+ d7 t4 {( a+ Z1 O# x end;
- h- M4 |) q& `1 J ] @.CurrIcon := "drivingHome";" F, m+ Q0 q" E# s2 Z/ K
@.DrivingHome := true;4 r, H8 b- f! \/ f% }$ b0 y5 S
end;
9 w2 s% g* e1 Z1 a5 s else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 B, |8 ]- h1 c
part := @.transpOrder;
& E; X" H- ^6 m5 g2 E part.move(@);-- load part* \9 t1 g) n6 e8 N
@.CurrIcon := "load";( g/ L3 V# O8 ]
GlobalDistObj := part.globDestination;
7 z/ M0 `1 g2 j3 \# J3 w) H assignLObj := rgmanager.rgAssignL;* y, m a( e( Y- v! q
row := assignLObj.getRowNo(GlobalDistObj);
" V! f( B6 n' @& c9 \. s, L if Row = -1 then -- since 70
' {. T; \6 z1 K0 h: d if lan=1 then8 }& y" p0 Z$ L" c0 ?. m- I/ v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: ]) b, c' D& l% P H
to_str("in der Andockstation: \"",?.~.name,"\""));1 R7 b2 P5 C' l( a
else! L+ q+ G& |& Z" E8 {6 D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ S9 [+ U: V. M0 j) B
to_str("in docking station: \"",?.~.name,"\""));
# b) t0 Y0 h' @# @2 @% S end;
+ i0 l) \2 a; h$ W# _' o; i else
1 P: _) v) o( G, P/ _# w @.Destination := assignLObj[1,row];
! X# d6 H4 m, b9 U( J end; : W. p- l& _# n
newDirection(@);
4 h( y5 A2 G2 d$ |) O @.HasOrder := true;
) r( Y1 f9 P; |7 B0 y! J end;
# n3 q& U6 V8 e! E end;7 H/ g7 W: K: h3 h* t0 L0 k. b
end; -- of the method% v+ L" @( `7 [3 c# K
|