/* called by: entrance ctrl of the object 'track'3 A) T; Y9 Q6 a U+ Z) D' q( k
*/- _% l0 j! |- V
is
: W: u( }0 k, N- ?; C/ e) H! O part, GlobalDistObj, assignLObj:object;row,Lan:integer;. w7 G3 d1 z( h8 `: K9 T' d
do
, D1 X: Z! z* l8 h" a) ] Lan := rootfolder.Internal.Tools.AOLlanguage;9 U* A" t, E; M N( m
if current = @.Destination -- else return
7 Q, M$ N. s( J2 _4 C( J1 v* f then
4 [& w: ?/ q0 D @.Destination := void;2 ?) @0 g- c; j! w9 K, c! v
if @.occupied then7 o. q- }, I# K& w# [! E
part := @.cont;
& m# M1 [- B# n8 l! U. [$ o @.transpOrder := void;) Q% _3 h& L9 X6 ?: z) \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% Y: h1 x0 a6 r' k. b @,root.eventcontroller.simTime);
& [! R4 H! t$ J6 s* ^ @.HasOrder := false;
- Q8 G* D; w& b+ m! L9 q& ~. j* p @.DrivingHome := true;/ a6 v9 q9 N7 K3 @/ I! d* V7 z
rgManager.tryToStartTransOrder;" \: D; C- R. ^, t0 |; F Z X
if @.Destination = void
6 m; D! X, J9 @* C then -- no transport order for vehicle @
/ h0 P) f( Y5 b4 @1 ?- i C @.Destination :=
$ ?$ m+ L' ^7 W" [: f* e0 r rgManager.nearestFreeStation(@,track.~);/ z$ m% ~# d+ N* w3 `, f
newDirection(@); ; h- u" _) r! P1 R& z9 V1 O
if @.Destination /= void then1 {, Z# O7 \) h
@.Destination.NumReservation :=$ p" H R+ Z6 ^! G
@.Destination.NumReservation + 1;
) A. R# v4 T8 k/ T9 ] end;; g! Q0 k9 y& `7 O }
@.CurrIcon := "drivingHome";
4 c$ y# `* v% m$ @+ N @.DrivingHome := true; [1 u: N0 D7 b6 }) I
end;8 ]$ e/ [2 E: U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 G4 K9 `6 A+ v5 n P part := @.transpOrder;
) v* p& b# r, ]' a! e. o part.move(@);-- load part4 W$ D) Y$ I9 F# a# z; G
@.CurrIcon := "load";% G% q9 M7 g2 A! k9 s/ }( O
GlobalDistObj := part.globDestination;" i. T( g7 ^2 M
assignLObj := rgmanager.rgAssignL;: n' l! l' E" C) N* a
row := assignLObj.getRowNo(GlobalDistObj);
, A2 L3 m( s; e) X: d$ E" m if Row = -1 then -- since 70
- L6 v9 L* S% K if lan=1 then4 Z% R* n5 c2 k |" G" L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 [% y7 L, c* x$ V
to_str("in der Andockstation: \"",?.~.name,"\""));* C" F0 z2 K1 F
else
3 l9 k7 }8 ]1 y4 c; C) @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' T$ I/ o8 h' c& [8 ~
to_str("in docking station: \"",?.~.name,"\""));
9 ]& \# [2 ~/ C4 p$ p) D* ^ end;- K Q( i+ |. n0 s/ m( d
else
/ |( C6 E( K& m' f @.Destination := assignLObj[1,row];' s* I4 \6 n+ A C1 @( k
end; # b1 m5 g; L P2 A' E
newDirection(@);$ n6 @$ Q3 `3 ^* M
@.HasOrder := true;
# v. Y& E. z, P( A4 P; ? end;
# d, e2 n" `% K% Q9 R! |' P end;
. o1 w# T8 ?) N' O! xend; -- of the method0 [4 ^6 w& r2 U" q1 o
|