/* called by: entrance ctrl of the object 'track'
. { I w4 p- ?$ K*/+ _2 I) ? ^, |! b; @+ G7 k; a
is: R1 b- z+ K) E7 n2 U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# C8 \0 d" K" e Q* Vdo ~. f4 q: M/ O! S4 V2 r. \
Lan := rootfolder.Internal.Tools.AOLlanguage;5 B8 J* O s* n7 d4 i
if current = @.Destination -- else return
: @4 f1 U% {9 `6 n/ o* J then
& O/ U. w) J: j3 i+ ^ @.Destination := void; G( l. e& P# f% V' t$ t
if @.occupied then7 M( Z! |6 C6 Z7 z
part := @.cont;. K' w: ]5 {$ h7 D( Y) o
@.transpOrder := void;
0 A, B$ M0 q" @4 |% _$ t! g q' w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 I3 G/ h# U' b" U; Z @,root.eventcontroller.simTime);
" \7 r, M0 O1 \; r @.HasOrder := false;( ^% m5 b$ Y: |% k: O! |
@.DrivingHome := true;
* X+ k" J( @8 F$ \4 O rgManager.tryToStartTransOrder;, b* r# F$ ? @9 h0 C
if @.Destination = void
* ^+ k/ f, J ~! s, [ then -- no transport order for vehicle @
. j- E6 q: u# ?9 |# [- c @.Destination :=& C8 q- J8 l7 P6 A5 D# |; z; j2 K
rgManager.nearestFreeStation(@,track.~); b0 w; c6 O7 A) K
newDirection(@); 1 s( W9 Z; o; w4 ?9 S0 d
if @.Destination /= void then1 h" n! _* p1 b6 ?: E
@.Destination.NumReservation :=
( O) B* |$ J2 K @.Destination.NumReservation + 1;
0 r$ x# S G* U) ]/ t% [ end;
4 h" n& J; e* j* R& B @.CurrIcon := "drivingHome";
1 f+ M# r- b3 b$ \) h @.DrivingHome := true;" e1 q( m( k3 j7 b. N/ G, l
end;
, M+ r6 T, o- ] } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! P8 U/ L$ R: W part := @.transpOrder;0 s0 j$ j+ b+ F Z V: A8 b
part.move(@);-- load part7 p- Q8 m* W9 t2 N- L/ W
@.CurrIcon := "load";3 q& s6 g' s) @# A G/ V; F+ \
GlobalDistObj := part.globDestination;" u7 _8 H- c9 s, g
assignLObj := rgmanager.rgAssignL;
2 P' l3 x# L" ~' l, h row := assignLObj.getRowNo(GlobalDistObj);
, G. X. l) _% ~5 z# O0 H% d5 u if Row = -1 then -- since 70' E8 k- v1 g+ Z6 U, }* r4 Y/ k
if lan=1 then
. F3 J# \+ l3 K' Z( O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), J2 O4 D( |7 T1 k, H! P
to_str("in der Andockstation: \"",?.~.name,"\""));
- T, v8 t, b4 F' u7 K else' }3 }" A/ x6 }8 R' y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ ~& z0 [( }- r$ P' b to_str("in docking station: \"",?.~.name,"\"")); + G7 d5 p( @: x
end;! u' }- |9 P! k* F Z
else# K1 L3 g! \' o2 `
@.Destination := assignLObj[1,row];* \* F6 `6 s- t! y/ J) E8 O" v
end; % E R: W# c8 m( e8 G! p
newDirection(@);
, V, L% U# B, R5 P9 i: k) f @.HasOrder := true;0 f+ m7 x6 g+ n7 f$ S8 j9 S& u
end; _4 I' L2 j+ B) Y i
end;* {: t: I9 p; N( c+ i L
end; -- of the method$ m; l; C# E; C. c& f3 E
|