/* called by: entrance ctrl of the object 'track'
9 f; P( a- h3 `4 v8 l*/, J* j- n) {% E$ n, a
is3 Z* _' ?+ m4 s, P& q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ ?( G; {. F6 f# o9 G! Qdo
+ R, E+ q1 t D5 o. a) t Lan := rootfolder.Internal.Tools.AOLlanguage;5 M4 K3 H, U% ?. c) s
if current = @.Destination -- else return7 Z' _9 x4 N C; A; e7 b
then" Y; K5 {& d8 z# v: Z' a# j
@.Destination := void;
+ O. d2 i' h2 E: D2 i if @.occupied then
! w$ n8 h# w) d part := @.cont;
8 W) L( h0 O t: q4 A+ P4 v @.transpOrder := void;
% y3 l8 y2 @0 W: \# k, @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; ]% m* [: R2 `6 U( V& q
@,root.eventcontroller.simTime);
% O- M6 Z7 }$ { @.HasOrder := false;: w# G& Y8 b5 l
@.DrivingHome := true;
3 W$ Z7 h1 y6 q9 q# a1 N" D rgManager.tryToStartTransOrder;
( m. q P) f6 l5 |: a0 F! D if @.Destination = void
4 c8 ~! d) _' Y- x- d then -- no transport order for vehicle @
1 p# d# o( g. Z3 `, d: s; i8 i @.Destination :=
! I9 |7 H8 ?# C8 c3 f rgManager.nearestFreeStation(@,track.~);, R( |, x0 U% P2 V5 y9 k$ P
newDirection(@);
1 ^! O$ Q& E0 a/ P j0 g if @.Destination /= void then* n2 A) y' T C) l; e
@.Destination.NumReservation :=. P! G R5 G( r/ V
@.Destination.NumReservation + 1;( y/ s1 C5 f, v, T# ]& o
end;4 p7 d0 E' {6 X* E& v. H! W
@.CurrIcon := "drivingHome";
9 |0 u2 ?6 a/ ` N7 J( P: g9 } @.DrivingHome := true;3 z+ K: R5 x. j) Z: n$ P2 `
end;; ?0 K3 d; k4 G* C5 e- k$ k" W1 G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 l4 {, h# d+ z" V: m part := @.transpOrder; O0 Q8 |9 q! X; E, C: f& J
part.move(@);-- load part8 T- A% K) Q8 h- |+ H6 B$ }
@.CurrIcon := "load";5 }+ \8 n+ W2 p- ^1 c0 ^9 P8 w
GlobalDistObj := part.globDestination;( ] c! J+ N% f }+ _3 g$ m. d
assignLObj := rgmanager.rgAssignL;
, t7 {' s3 ~+ Y7 o/ Z% L; w0 T row := assignLObj.getRowNo(GlobalDistObj);9 |2 n5 V3 u" W6 c# R# }9 H
if Row = -1 then -- since 70
, y3 Y1 X, u* Z3 N$ L) W if lan=1 then U5 l. x7 Z: A+ d, F6 I6 I2 v' n3 E5 _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, [9 |, L9 r. t) F( E) }& m, U
to_str("in der Andockstation: \"",?.~.name,"\""));
7 W6 U3 e; c2 J5 E: p+ a" \ else
' P8 D* \2 S8 {/ `" z/ f9 ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% U _0 d. M) J2 w+ ^4 @
to_str("in docking station: \"",?.~.name,"\"")); $ H1 p/ z1 B, b, J1 N
end;7 l: I/ D: @0 I& J* }. n, @
else
" f7 o/ b& A9 F$ b3 n c" z @.Destination := assignLObj[1,row];- _0 W' c* @- V
end;
5 ~0 [6 M9 a% [) H8 r0 f* i7 r newDirection(@);# f7 X; C6 b9 g
@.HasOrder := true;5 X6 S G: _- d- L5 u; e
end;3 }3 l8 m9 s3 T7 w
end;& {4 P+ }7 L9 M7 ^* H2 ?
end; -- of the method- Q; U. g9 N0 P4 x
|