/* called by: entrance ctrl of the object 'track'
" {& Q, H- q+ p) h# G*/
& ^9 K( m5 n' m$ ]/ Uis7 k5 F0 g+ F- d8 T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ d2 e. ]9 x) V: i" P' k
do6 y# y, y8 e/ h U9 |
Lan := rootfolder.Internal.Tools.AOLlanguage;, D) h$ \1 ?! }0 a
if current = @.Destination -- else return9 j, c- \5 H* n4 w. } r7 X ^7 u- Y
then8 [* A/ c# q8 x- ?. ^% N$ f
@.Destination := void;# y! L/ j: f: `6 v2 P8 y3 b( o1 b
if @.occupied then. s9 D# Q6 \- h* o; r
part := @.cont;) d* m3 ]* g! Y- u1 a
@.transpOrder := void;
8 N/ m# N4 G7 n1 Z) Q! I; j2 @) ~+ v, a7 N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
D3 J5 b9 Q+ s* N) o* U @,root.eventcontroller.simTime);
! z6 s% N! y7 j5 b/ A( q7 i& j# ]5 I: ` @.HasOrder := false;
Y4 S/ ~' ~- Q+ X @.DrivingHome := true;" J: F& |. S; z% [) W/ j- X
rgManager.tryToStartTransOrder;
4 G# |7 [4 C) T7 P0 _, R- E9 Z: a if @.Destination = void5 W) f/ A. }' ~3 _" `% I
then -- no transport order for vehicle @2 k% r: e9 l' ?; C' e/ a' W# H
@.Destination :=9 B/ i4 G3 A' i' f" m. ~4 N
rgManager.nearestFreeStation(@,track.~);2 y' U1 e0 X p# s+ C' B0 j
newDirection(@); 0 I1 F) [; t6 y
if @.Destination /= void then
; }" x, Z0 Q0 p6 [ @.Destination.NumReservation :=! `5 h. s! T1 B, x% t w
@.Destination.NumReservation + 1;
" S$ _! l: v: n, h5 l end;
1 A* _* u6 p# @ N @.CurrIcon := "drivingHome";
: v& Y8 ]4 k$ T# D# l {$ g& c @.DrivingHome := true;% p- u' z7 ~! S6 l" O
end;
8 G/ ]5 w. j1 z2 b7 s' G9 X* Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ a* ^5 ]) f) m% u part := @.transpOrder;
* E9 \ l0 y4 R2 N: M1 G part.move(@);-- load part$ \# L8 p6 k6 h( n# V4 e4 H; y' Z
@.CurrIcon := "load";" U; e! Y3 `6 M r
GlobalDistObj := part.globDestination;/ u n7 j4 o7 Z* R
assignLObj := rgmanager.rgAssignL;3 K; t( G6 h1 {; y# p. U8 E
row := assignLObj.getRowNo(GlobalDistObj);2 A" n: @7 f, f; v! u/ m( V
if Row = -1 then -- since 70
* k z' L0 Q/ C# g3 c% d if lan=1 then/ K" j5 X/ m g: E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; D; a# |9 N1 ]/ P3 U9 ]& H8 E
to_str("in der Andockstation: \"",?.~.name,"\""));: i) [, u$ ^( l3 r5 I* a
else
2 ?% o$ V8 S! E' K3 } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 A' ]! p) u+ W- E" } to_str("in docking station: \"",?.~.name,"\"")); * I5 m- o0 ^4 p6 }4 Z
end;
) {, S/ V/ X3 I0 B9 G/ ]; J else
& ?% K* M, g: Q# ^ @.Destination := assignLObj[1,row];: o E% a* n5 o3 b
end;
O/ g1 ^: m: b) V; d% W) @. P. W6 t newDirection(@);' c; m1 o: r/ V1 | C6 \* A6 \+ s6 S+ F
@.HasOrder := true;
/ X: R w0 o* j+ m end;9 l/ I" B! m0 S2 i2 d# R
end;
7 c4 [" N4 p% ~* }( s# Mend; -- of the method
1 ^; ~& {- F1 d1 N, V# J. ?3 } Y |