/* called by: entrance ctrl of the object 'track'0 z' L G( v1 X7 F! q8 e
*/
( r, F+ |) n, U* D6 ]) ?0 z% Mis
5 u8 I$ h5 K& Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! F% j5 K8 C* l1 ]& |: n/ k# [& h. fdo) S7 s( W- A8 f
Lan := rootfolder.Internal.Tools.AOLlanguage;# ]( n: |' P5 j$ ~
if current = @.Destination -- else return
! p) D. P; U) r2 E then3 |# [0 J* ~$ R+ c
@.Destination := void;5 Y& |! {$ ^' x3 f5 {
if @.occupied then
+ Z! x M5 l: Z* j) ?3 W5 G* ? part := @.cont;
% O3 M( J! O5 h @.transpOrder := void;; ?3 a( [- C2 W% x0 n N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; `& G, j! ^5 z( d: D: n
@,root.eventcontroller.simTime);/ ~9 r6 k0 u. r5 p" l8 S( R
@.HasOrder := false;4 P+ H: @* R9 O0 d4 u6 M4 e# H6 E
@.DrivingHome := true;' t \% q9 ]- }1 p5 w, [, R
rgManager.tryToStartTransOrder;* v1 z9 C8 |$ G$ ]2 {9 s: V
if @.Destination = void
2 \3 T' W9 c6 z then -- no transport order for vehicle @; l3 J: L0 d& g* E% \" ?+ K
@.Destination :=
; p& Y9 b" R4 q, C% e0 }- X! b rgManager.nearestFreeStation(@,track.~);$ Y( F3 H- ^5 s6 \) K7 ]
newDirection(@); 6 O) Y0 ^% X! h" s% \
if @.Destination /= void then
% V& j8 x" r- ]6 P }! M# F @.Destination.NumReservation :=
' @9 O* i& x5 q1 k- M0 N @.Destination.NumReservation + 1;
, |) l" t! K/ [0 s% h' B end;( Q7 [, I" _! T8 V L
@.CurrIcon := "drivingHome";
- N# U7 m3 E7 t) ?6 t* J4 l @.DrivingHome := true;7 K- L1 a; M0 Y. |& R2 Y6 x
end;
4 E5 q' e% z$ G; o7 \( M else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 @; ?# _( d" y* a4 B part := @.transpOrder;
1 c2 V* T5 u. U8 E part.move(@);-- load part& n7 _' _! K+ l
@.CurrIcon := "load";
3 g% p8 F1 N) O3 s" S. d GlobalDistObj := part.globDestination;$ o& B0 E; L3 [( F5 z p7 X
assignLObj := rgmanager.rgAssignL;
, `. V# a8 H/ j# w' e# S7 ]& q row := assignLObj.getRowNo(GlobalDistObj);1 q+ c4 H5 H' _
if Row = -1 then -- since 706 D' A# \& I* h$ W- M+ u$ ?" w
if lan=1 then5 H# l% @5 ~9 ?( F2 S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ {$ L' m5 j8 t. c
to_str("in der Andockstation: \"",?.~.name,"\""));
4 d) I, V* g9 l% w8 L else5 _# w: `) c7 A! j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ h9 O2 M/ x6 T" |" h+ h2 G2 j
to_str("in docking station: \"",?.~.name,"\"")); 5 m- z- h% v- D3 \/ S7 u2 O) {; S
end;
8 S0 ?) a5 K. c0 v else! f7 M8 |3 o# N7 J5 [
@.Destination := assignLObj[1,row];+ q8 K* e7 s, i4 Y
end;
' _4 @/ L0 `/ y; g' g2 f newDirection(@);( y. i: @ d! w" d/ O- B
@.HasOrder := true;
6 M3 \0 w# I5 ]. B end;
0 K( e: W I- H; z1 w end;
( Z( O- o9 e: K$ \end; -- of the method- |$ Q% L, g7 t+ e9 P
|