/* called by: entrance ctrl of the object 'track'
$ N& n. c* d: h*/- \0 i+ v$ b7 E8 p# _3 I W" d* Z
is' x$ V% }; y) r% X3 v8 x& d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" n2 s8 P+ R, W: _do2 l, ]" L' z+ U; Z. X. f$ e a. y
Lan := rootfolder.Internal.Tools.AOLlanguage;+ m4 M+ _' M, T) V
if current = @.Destination -- else return9 V# k+ s8 A. F
then
( i6 i/ ^& `8 _2 S @.Destination := void;
* e$ `& }2 X9 X1 K0 R$ D if @.occupied then# Z ^- D( ^* M1 M# G
part := @.cont;) J, J, K* Q* {4 x. s* r
@.transpOrder := void;# O! j7 l6 D j0 l& h+ j& n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
q* Q* V0 {% Q @,root.eventcontroller.simTime);
3 s" w# D3 k% A* U @.HasOrder := false;
( ?* ^8 V5 |, b. I @.DrivingHome := true;
- z! q1 Y) G( x1 K' ]9 u/ x6 p rgManager.tryToStartTransOrder;" d A- B+ k; l! e
if @.Destination = void
) P x; C8 ] g/ V: }# k3 B then -- no transport order for vehicle @
5 f3 E! q. V8 ?, S; e7 u7 j/ E @.Destination :=
" U' t: }# K5 h. a+ b" `" R! F& X8 q rgManager.nearestFreeStation(@,track.~);4 x8 y6 `8 y! \; f9 |
newDirection(@);
5 M; U$ o% ~6 `% l if @.Destination /= void then% Q# C/ j2 a( @( f7 E
@.Destination.NumReservation :=
" M+ G- H1 I. {3 \. k* {, J @.Destination.NumReservation + 1;, x5 n1 T4 l( P, C+ R1 Y1 _! i
end;
O( i+ a. z8 S; ^8 G% C @.CurrIcon := "drivingHome";: x: `4 f7 [+ h: |; N/ d
@.DrivingHome := true;
9 V7 f: D. h5 T6 V1 T$ V2 P3 d end;
7 _# G1 E' U* h$ h else -- the vehicle @ is empty, both vehicle and part are in the same dock station' T9 O3 P+ K) W2 `& X
part := @.transpOrder;
( N! }/ L+ i6 \ part.move(@);-- load part, D! F% a4 h$ D
@.CurrIcon := "load";) R+ m5 \3 m. T) c6 I9 ~5 X
GlobalDistObj := part.globDestination;# Y( c, V$ u4 V/ s) _; t
assignLObj := rgmanager.rgAssignL;/ G& U' b7 O _7 {
row := assignLObj.getRowNo(GlobalDistObj);! n2 ~7 n2 w3 C2 ^% }/ u& q
if Row = -1 then -- since 70' v& c# F8 j3 f# _9 c$ S0 r
if lan=1 then
( J& D+ P! k% [& H( w' U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( q8 D. ]1 o$ l9 H+ L' R6 t
to_str("in der Andockstation: \"",?.~.name,"\""));) I5 ]+ C7 N9 Z) Y: o- p: M
else, s- g# N! ]% \2 A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
d/ V0 q/ s' f8 r6 ~3 K2 D- v to_str("in docking station: \"",?.~.name,"\""));
! l' \ Q& p' D( d end;9 J& e _( O: ]* v
else L- U8 g7 O$ ` G I' y0 m# g7 a
@.Destination := assignLObj[1,row];
8 D2 k) D; F) d end;
' _0 h P! M2 n4 d8 V0 h6 H newDirection(@);
) U3 H! l0 p' ~+ ]' l h& `0 c @.HasOrder := true;4 k0 h7 E8 x s2 }1 R
end;7 _# l# Y4 Z8 v1 y- [
end;1 g' x; k' e# d& Y2 y6 ?( t
end; -- of the method
0 v" y! c; F g, d3 H |