/* called by: entrance ctrl of the object 'track'
* O8 a# `) K! h* _* D- O*/" q& i1 ^" W1 m/ J$ c
is; @6 E7 J+ f# g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; {+ R; S6 c4 w4 L1 edo: Z9 H7 ?7 N3 C
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ a3 `* W7 t, ?( H9 V7 L: f if current = @.Destination -- else return
! C; t z+ g0 V S6 c5 O5 P! U- b then& Q. ]) V6 N7 R5 ?- H
@.Destination := void;5 j9 h6 E. h: w# i
if @.occupied then. c+ |7 P1 C) s$ ~
part := @.cont;
6 T/ o) w) `! x5 }& z @.transpOrder := void;
& r. j8 W( \' _+ R$ v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 [6 J- I4 G- h9 r: o
@,root.eventcontroller.simTime);/ u5 f% C, F+ o. l6 W
@.HasOrder := false;
' W% J! |# ] [' ?! {' x( I+ W @.DrivingHome := true;( u8 y9 `+ r: G2 L4 ~! X4 o
rgManager.tryToStartTransOrder;# \$ Y! V: v# k& ^ i7 A( L
if @.Destination = void: f2 u$ [) q% Q
then -- no transport order for vehicle @
7 D) _. A7 A: L9 J/ v8 | @.Destination :=
- {2 W$ P$ U7 ^. [ rgManager.nearestFreeStation(@,track.~);
( r* ]- b0 H H% H4 d newDirection(@); $ m3 k% H8 Q5 S1 K
if @.Destination /= void then
" x$ F; C$ P% S3 d+ P @.Destination.NumReservation :=
* b7 k3 j0 l F9 h @.Destination.NumReservation + 1;( K( P5 ]6 O$ N1 L( _+ |
end;; _( W6 T W, P
@.CurrIcon := "drivingHome";
7 ]3 r, a3 R& G @.DrivingHome := true;+ S8 } z: F$ j, t! p1 S/ g% ]
end;$ [$ n( M& r! r/ O5 z M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; t2 _' [, _6 e part := @.transpOrder;4 `7 B# [% I; G7 p' x
part.move(@);-- load part
3 J1 \4 }# Y% T+ k: F- @) L3 V @.CurrIcon := "load";# {8 k$ u' d& C: m C
GlobalDistObj := part.globDestination;' K8 l* V8 @9 ^+ E
assignLObj := rgmanager.rgAssignL;
! `' c" I& k/ z row := assignLObj.getRowNo(GlobalDistObj);3 P4 U& E- R7 Z! S
if Row = -1 then -- since 70
, ^' z1 e% k4 H, s/ f3 {* u if lan=1 then
3 g! v0 b: ]3 J& j8 w" X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! Y: U" q/ {. T- A1 `
to_str("in der Andockstation: \"",?.~.name,"\""));
! p3 j! ]5 k% [2 G9 o else
. ?9 ~: q9 x ~6 P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# z, ]5 S+ Q9 ~( s
to_str("in docking station: \"",?.~.name,"\""));
' v$ C7 t$ s' ~0 q# E4 u end;
3 ^ q' c; Q) }- P' U else2 u; k% k; A; r; Y* v
@.Destination := assignLObj[1,row];8 q. |1 W% x+ {7 }/ L0 g
end; 1 w" j# u2 N# t7 n
newDirection(@);
L: d9 d5 J7 A0 Y2 B- { @.HasOrder := true;
3 |; |9 w4 ~, T$ g* e7 o end;- a3 o Z6 V+ h6 n# X9 R
end;4 L5 [, M6 n4 K# i7 r9 c- t* ~8 c# _
end; -- of the method
- [2 ]5 m7 j: q |