/* called by: entrance ctrl of the object 'track'# t! [; Z) G; ]8 j _
*// A7 j; F% u, X3 Y
is
! L: S; K. c, _# Y$ [. `4 c part, GlobalDistObj, assignLObj:object;row,Lan:integer;( f/ P! c/ Z# e; D* X! C' r
do
4 N( y' K; A( ]4 b5 w Lan := rootfolder.Internal.Tools.AOLlanguage;
& }# s, F0 e. ]9 ^) C if current = @.Destination -- else return
. q# B) D- B) L$ h' `. E$ b then
. l( p# ^" C+ J6 V. b' r @.Destination := void;2 D- Y% X. Z8 \0 D5 a6 I
if @.occupied then2 Z3 e# u' H8 @! h) `* r
part := @.cont;
! z- Q* W: p% M k @.transpOrder := void;: T6 t' ~/ F9 \/ M4 F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 @& L3 K: r7 r' U! N) T
@,root.eventcontroller.simTime);
- }! A. E3 }9 I }# G. ?2 S @.HasOrder := false;7 ~" @. k3 L7 q# Q
@.DrivingHome := true;
& t4 G5 J3 H% z5 g+ Z3 E rgManager.tryToStartTransOrder;3 J! O7 v6 @5 Z+ a) H% a7 c" @# [8 A% v
if @.Destination = void* _. d" M! {& }7 x5 Z
then -- no transport order for vehicle @
e8 j* b4 ~; }9 a& P7 m/ g @.Destination :=
3 k3 N) m6 t$ `+ X4 C( A- B rgManager.nearestFreeStation(@,track.~);8 v; D0 u( h' `" }
newDirection(@); ; U3 W: B* h5 Z% ^& L0 |. f5 B+ x7 L8 m
if @.Destination /= void then" \# S n' I+ N! y- n
@.Destination.NumReservation :=9 g: y J4 R2 U
@.Destination.NumReservation + 1;* Y% Z& j! n' {7 s9 K- B3 Y
end;
8 l& c- w2 ~* M: X7 O) ? @.CurrIcon := "drivingHome";
+ l# j# k5 L$ U: | @.DrivingHome := true;
+ K1 w) F8 _- ]! k0 b& z: Q, X end;
& T" Q4 r* v' _, O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& K5 A0 V: r! p$ L1 \" a% v* E5 \ part := @.transpOrder;4 R1 M8 K2 D, L
part.move(@);-- load part
* I9 {8 D/ [8 C3 R- f: | @.CurrIcon := "load";
2 r2 r" e. g# v. z: F GlobalDistObj := part.globDestination;- O+ } @8 r/ R. [0 J9 T% u5 B
assignLObj := rgmanager.rgAssignL;
9 _4 ]5 n4 X8 z U2 X2 ? row := assignLObj.getRowNo(GlobalDistObj);
; _/ c( |& ~+ C. ~% e8 H if Row = -1 then -- since 70
% J! N& D' n' {" f- |% B0 [ if lan=1 then% B* K9 b* C8 K3 T! }( Q5 n2 ]7 V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ N x# q. O8 H& s/ { }! {
to_str("in der Andockstation: \"",?.~.name,"\""));
& l( ?/ @% Q l else8 y* W/ v9 W3 m' y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' X9 h8 }+ Y a% M b8 w& k' d3 l to_str("in docking station: \"",?.~.name,"\""));
% G) J0 k0 E- ?) a/ u: u end;8 Y3 y9 e; L9 N: |
else
; u' R; c$ l, S4 F* U6 Y- k% [ @.Destination := assignLObj[1,row];
% W: q( j$ o7 d& X9 o end; ' @/ p* M- ]" }. M! `
newDirection(@);
5 D3 t3 ?6 {) D! j! B6 a @.HasOrder := true;
! a4 _( @8 M; F( ^ end;8 a9 ]) ]) O8 ~
end;
0 B: l( _0 |/ {) f; Vend; -- of the method
" v4 Z$ m3 a- v |