/* called by: entrance ctrl of the object 'track'
1 J& X7 a# z9 b( @; H. m*// l3 k S" i8 S' n4 w, C+ _
is2 M- i4 h) l$ c& ` P. {) I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 M: W- c" e. K! M3 d
do
9 M" ?& F" b& L1 G. Z Lan := rootfolder.Internal.Tools.AOLlanguage;) ^/ U) i7 Z) j% T6 L- A" P
if current = @.Destination -- else return' V) |5 i! c% y; _& Q- E
then5 N5 d& w4 a* p' g) }6 C
@.Destination := void;9 Q5 u8 _- @3 [( w- D3 k6 {
if @.occupied then0 b% Y$ E8 u7 W: f0 G2 G
part := @.cont;
! P, G7 k- y3 G# m @.transpOrder := void;
: p: {8 d. o9 R7 c' R$ E0 [. G; \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. j g; E& ], [! q @,root.eventcontroller.simTime);
' N1 ]+ k! k# \: l @.HasOrder := false;
9 v X' T* P7 M: U4 { @.DrivingHome := true;
: @# P: w7 O0 S' e5 x: T e rgManager.tryToStartTransOrder;
$ t2 j3 _. j* K) q2 n6 \ if @.Destination = void. H9 \5 `# g* _
then -- no transport order for vehicle @% A* T1 B" }# R' r
@.Destination :=
3 v& q7 m5 i; G( }! M7 O# p+ P rgManager.nearestFreeStation(@,track.~);
( A: }4 I6 Y9 L8 o9 i! V/ ]" z newDirection(@);
2 c; H# y( d" ~2 s( L% L, s if @.Destination /= void then, b, O5 V% i& L: ?+ t5 @7 R
@.Destination.NumReservation :=3 D' t. g; H. F3 X; p1 m
@.Destination.NumReservation + 1;. x% V% T8 z7 H1 w
end;
& L, @- H+ X8 X* U$ ]: s @.CurrIcon := "drivingHome";) C9 K$ F; l( F% W0 c0 T* B
@.DrivingHome := true;. H7 j3 o% |0 z# }8 y+ p' M
end;
# b0 [/ c# J( V7 t% E4 h% B. n else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ {" w/ ^, V' s5 U' C6 p0 O
part := @.transpOrder;
, V' Q6 g8 [( R' x part.move(@);-- load part* G3 _# ~( v1 P9 q
@.CurrIcon := "load";. q$ L" P# P6 V3 v. N3 q5 D, R
GlobalDistObj := part.globDestination;
. K; k' w/ i" A8 X- L assignLObj := rgmanager.rgAssignL;, h: _3 [5 k/ w9 D' @
row := assignLObj.getRowNo(GlobalDistObj);' p0 B9 |+ c3 F7 u7 {- `7 p+ U$ @# _
if Row = -1 then -- since 70) e* I) T( _# r3 G8 m4 ?
if lan=1 then
" H8 o: `3 v2 z6 x, J. P6 _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- y9 b. U/ D9 g to_str("in der Andockstation: \"",?.~.name,"\""));& f9 z8 K' V% J# n1 I* U
else
( N& f# V4 b- @# B) T% g* x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 L" ~! h# h: A/ } to_str("in docking station: \"",?.~.name,"\"")); 3 V; B8 ~) w5 s5 K
end;
0 [6 u# M, {2 m) V- i# m else
; q& |# G, \" S! j9 t W @.Destination := assignLObj[1,row];7 m5 R0 y- T* e" A* v m
end; 3 f* q# A) N6 G' p4 Q$ b. @7 {
newDirection(@);( ~ B" Z& m: j- o: D
@.HasOrder := true;
5 _7 c# c5 E, m0 b" J end;
+ t! v' H- q! f! N w end;
3 G8 \3 A0 D! y, M( A1 m; l+ Lend; -- of the method0 `5 T v; j2 _2 ?+ c l0 W
|