/* called by: entrance ctrl of the object 'track'
2 U# `+ k, h- S' Q8 |% X! Q) h*/
% r/ `! ~- ?" Q+ K7 ~6 Cis" J+ j# v4 K" j7 M/ C# o. y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 Q( j2 E! y/ [8 S
do
# O' I/ E6 U) q/ i" b+ [ Lan := rootfolder.Internal.Tools.AOLlanguage;
1 C1 C- d' o" [$ { if current = @.Destination -- else return
g; G# ]* t) c then
$ W4 r7 ^1 ?- h$ C @.Destination := void;
% {6 R- q$ [8 P if @.occupied then
1 U+ v! k. {. [- P9 d part := @.cont;
4 N) I* r3 ^4 H& e2 Y5 z. o+ _ @.transpOrder := void;
; O% n- Q; d4 I! b9 y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 m _5 q. Q0 j2 p @,root.eventcontroller.simTime);
7 z# B+ Y! Z) r: _9 X( {: p @.HasOrder := false;
5 ^, }1 l; k7 W' R) k1 q6 W$ {7 f @.DrivingHome := true;
& h; ^ j2 J. ^* p rgManager.tryToStartTransOrder;
$ v3 N3 J/ Y3 {( S6 Y3 I- a) V if @.Destination = void( E2 W; g7 A, ?) ]
then -- no transport order for vehicle @; D j0 c5 y5 N* G
@.Destination :=; q6 J$ z& Q" L, n
rgManager.nearestFreeStation(@,track.~);
* X c$ m2 I2 d- c newDirection(@); . Y3 q9 N, C7 r
if @.Destination /= void then I7 [7 R* i* {9 b
@.Destination.NumReservation :=
- {5 w2 z+ ^$ ^6 [$ }# B @.Destination.NumReservation + 1;
8 d: }+ |9 @2 b/ I8 d3 d. f end;6 D+ @% [) \/ n7 S+ b& t
@.CurrIcon := "drivingHome"; N$ q; ~" \: g2 ~! ]
@.DrivingHome := true;
2 C" a* Z& W( B: d. [$ N: C end;
8 L D( l/ \$ W: T/ g3 X else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 U+ k3 J5 K7 W/ s6 t' _2 h
part := @.transpOrder;
. ~9 t" i m7 z# G* V8 h# z9 P# B part.move(@);-- load part
" m' k# v" x& n9 c- K s$ d @.CurrIcon := "load";% t$ f4 V* @. o* d! W! C
GlobalDistObj := part.globDestination; m2 P1 ?; L; |" W5 t9 O6 d
assignLObj := rgmanager.rgAssignL;
% ^- ]( v E" L2 c2 ^5 Y row := assignLObj.getRowNo(GlobalDistObj);
2 x( S( \! n% E0 J2 X if Row = -1 then -- since 70
, ?' w. ` J/ w5 k5 z if lan=1 then
9 A! V* r( Z3 A. t# K \, @. s8 P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 b+ h: {) t- \5 J to_str("in der Andockstation: \"",?.~.name,"\""));; l, f% S: [; h U, A
else
5 s& O9 m3 R4 B8 r- `; _1 G+ b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! B f- C# W; z+ _. i, ^
to_str("in docking station: \"",?.~.name,"\"")); , W2 x/ n- \, R( q1 o. r3 H- b: f
end;; e" {; E8 q+ W: e9 |& ^$ p
else
+ a. U" T) X5 j1 u4 V( e2 X @.Destination := assignLObj[1,row];5 A+ ]! A6 Y% O1 p! K r) m- |
end;
t( x* |) j3 \( z1 S newDirection(@);, I+ [/ w* x7 e4 t, J
@.HasOrder := true;
8 D4 T, j/ F/ g, ^ end;- I2 r+ ]3 `! h5 m9 n
end;6 f% x! C/ B2 G6 R6 [, V6 T# t
end; -- of the method5 B z( P. B" I' [; K; U
|